From a6a48ebf3fdebcc252f9a39c90457bd1eb7c0522 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Thu, 30 Apr 2015 22:47:56 +0700 Subject: [PATCH] improve report --- netforce_clinic/models/visit_board.py | 7 ++++--- netforce_clinic/templates/visit_board.hbs | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/netforce_clinic/models/visit_board.py b/netforce_clinic/models/visit_board.py index de85027..5c2de28 100644 --- a/netforce_clinic/models/visit_board.py +++ b/netforce_clinic/models/visit_board.py @@ -75,8 +75,6 @@ class VisitBoard(Model): department_id=defaults.get("department_id",None) branch_id=defaults.get("branch_id",None) print('defaults ', defaults) - #user_id=get_active_user() - #set_active_user(1) #FIXME to allow user to see doctor different department if ids: obj=self.browse(ids)[0] date_from=obj.date_from @@ -106,6 +104,7 @@ class VisitBoard(Model): 'no': '', 'number': '', 'visit_id': None, + 'visit_state': '', 'cycle_name': '', 'cycle_color': '', 'department_id': None, @@ -171,7 +170,9 @@ class VisitBoard(Model): elif hd_case_state=='in_progress': #visit_color='#f9e37d' visit_color='' - pass + elif hd_case_state=='cancelled': + visit_color='#dbdbdb', + hd_case_number="Cancelled" number=visit.number if number=='/': number='Waiting' diff --git a/netforce_clinic/templates/visit_board.hbs b/netforce_clinic/templates/visit_board.hbs index c430063..b4759d8 100644 --- a/netforce_clinic/templates/visit_board.hbs +++ b/netforce_clinic/templates/visit_board.hbs @@ -31,12 +31,16 @@ {{else}}
{{cycle_name}}
{{no}} - + {{#ifeq number "Waiting"}}  {{number}} {{else}} - {{number}} + {{#ifeq number "Cancelled"}} +  {{number}} + {{else}} +  {{number}} + {{/ifeq}} {{/ifeq}} @@ -67,7 +71,7 @@ {{else}} {{#ifeq hd_case_state "cancelled"}} - + {{else}} {{/ifeq}}