Fix HUD display when toggling employee status in profile view
This commit is contained in:
parent
8a6fdb5ea5
commit
c5bd40793b
|
@ -906,12 +906,14 @@ class PersonView(MasterView):
|
||||||
return self.profile_start_employee_result(employee, start_date)
|
return self.profile_start_employee_result(employee, start_date)
|
||||||
|
|
||||||
def profile_start_employee_result(self, employee, start_date):
|
def profile_start_employee_result(self, employee, start_date):
|
||||||
|
person = employee.person
|
||||||
return {
|
return {
|
||||||
'success': True,
|
'success': True,
|
||||||
'employee': self.get_context_employee(employee),
|
'employee': self.get_context_employee(employee),
|
||||||
'employee_view_url': self.request.route_url('employees.view', uuid=employee.uuid),
|
'employee_view_url': self.request.route_url('employees.view', uuid=employee.uuid),
|
||||||
'start_date': six.text_type(start_date),
|
'start_date': six.text_type(start_date),
|
||||||
'employee_history_data': self.get_context_employee_history(employee),
|
'employee_history_data': self.get_context_employee_history(employee),
|
||||||
|
'dynamic_content_title': self.get_context_content_title(person),
|
||||||
}
|
}
|
||||||
|
|
||||||
def profile_end_employee(self):
|
def profile_end_employee(self):
|
||||||
|
@ -935,12 +937,14 @@ class PersonView(MasterView):
|
||||||
return self.profile_end_employee_result(employee, end_date)
|
return self.profile_end_employee_result(employee, end_date)
|
||||||
|
|
||||||
def profile_end_employee_result(self, employee, end_date):
|
def profile_end_employee_result(self, employee, end_date):
|
||||||
|
person = employee.person
|
||||||
return {
|
return {
|
||||||
'success': True,
|
'success': True,
|
||||||
'employee': self.get_context_employee(employee),
|
'employee': self.get_context_employee(employee),
|
||||||
'employee_view_url': self.request.route_url('employees.view', uuid=employee.uuid),
|
'employee_view_url': self.request.route_url('employees.view', uuid=employee.uuid),
|
||||||
'end_date': six.text_type(end_date),
|
'end_date': six.text_type(end_date),
|
||||||
'employee_history_data': self.get_context_employee_history(employee),
|
'employee_history_data': self.get_context_employee_history(employee),
|
||||||
|
'dynamic_content_title': self.get_context_content_title(person),
|
||||||
}
|
}
|
||||||
|
|
||||||
def profile_edit_employee_history(self):
|
def profile_edit_employee_history(self):
|
||||||
|
|
Loading…
Reference in a new issue