diff --git a/offboarding/cbv/exit_process.py b/offboarding/cbv/exit_process.py index b8c014f13..df669e5c5 100644 --- a/offboarding/cbv/exit_process.py +++ b/offboarding/cbv/exit_process.py @@ -804,6 +804,7 @@ class DashboardTaskListview(HorillaListView): filter_class = PipelineEmployeeFilter bulk_select_option = False view_id = "dashboard_task_status" + show_toggle_form = False def get_queryset(self): """ @@ -834,12 +835,13 @@ if apps.is_installed("asset"): bulk_select_option = False view_id = "dashboard_task_status" + show_toggle_form = False def __init__(self, *args, **kwargs): - self.AssetAssignment = get_horilla_model_class( + AssetAssignment = get_horilla_model_class( app_label="asset", model="assetassignment" ) - self.model = self.AssetAssignment # 809 + self.model = AssetAssignment # 809 super().__init__(*args, **kwargs) def get_queryset(self): @@ -889,6 +891,8 @@ if apps.is_installed("pms"): bulk_select_option = False view_id = "dashboard_task_status" + show_toggle_form = False + columns = [ ("Employee", "employee_id__get_full_name", "employee_id__get_avatar"), ("Feedback", "review_cycle"), diff --git a/offboarding/templates/cbv/resignation/actions.html b/offboarding/templates/cbv/resignation/actions.html index b4389f8bb..c9771e3ee 100644 --- a/offboarding/templates/cbv/resignation/actions.html +++ b/offboarding/templates/cbv/resignation/actions.html @@ -1,5 +1,11 @@ {% load i18n %} -
+ + +
{% if perms.offboarding.change_resignationletter %}
@@ -16,7 +22,7 @@ role="img" aria-label="checkmark" > - {% trans "Approve" %} + {% trans "Approve" %} {% else %} {% endif %} {% if instance.status == 'rejected' %} @@ -44,7 +50,7 @@ role="img" aria-label="close" > - {% trans "Reject" %} + {% trans "Reject" %} {% else %} - {% endif %} + {% endif %}
+ + - - {% endif %} - +
diff --git a/offboarding/templates/cbv/resignation/options.html b/offboarding/templates/cbv/resignation/options.html index 730692d03..0e5a876ac 100644 --- a/offboarding/templates/cbv/resignation/options.html +++ b/offboarding/templates/cbv/resignation/options.html @@ -1,26 +1,78 @@ {% load i18n %} -
-
- {% if perms.offboarding.change_resignationletter %} - - {% endif %} +
+
+ {% if perms.offboarding.change_resignationletter %} + + {% endif %} - - {% if perms.offboarding.delete_resignationletter %} - - - {% endif %} - -
+ {% if instance.status == "approved" %} + + {% if perms.offboarding.delete_resignationletter %} + + + {% endif %} + {% else %} + + {% if perms.offboarding.delete_resignationletter %} + + + {% endif %} + {% endif %} +