From cfb335821ffde6625a6285c24f8a7dd0c47ffaa1 Mon Sep 17 00:00:00 2001 From: Horilla Date: Tue, 28 Oct 2025 10:01:49 +0530 Subject: [PATCH] [UPDT] PMS: Assignees list is updated --- pms/templates/okr/okr_list.html | 107 ++++++++++++++++++++++---------- pms/templatetags/pmsfilters.py | 27 ++++++++ pms/views.py | 69 +++++++++++++++----- 3 files changed, 157 insertions(+), 46 deletions(-) diff --git a/pms/templates/okr/okr_list.html b/pms/templates/okr/okr_list.html index aa962ba11..c199bb5f8 100644 --- a/pms/templates/okr/okr_list.html +++ b/pms/templates/okr/okr_list.html @@ -68,7 +68,7 @@ {{own_objectives.paginator.count}} - {% if perms.pms.view_objective or manager %} + {% if perms.pms.view_objective or manager or reporting_manager %}
  • {% trans "All Objective" %}
    @@ -132,9 +132,11 @@
    {% trans "Key Results" %}
    -
    {% trans "Assignees" %}
    + {% if perms.pms.view_objective or manager or reporting_manager %} +
    {% trans "Assignees" %}
    + {% endif %}
    {% trans "Duration" %}
    @@ -228,35 +230,76 @@ {% endfor %} {{objective.key_result_id.all|length}} {% trans "Key results" %}
    -
    - {% for emp_objective in objective.employee_objective.all %} -
    - -
    -
    - Baby C. + {% if perms.pms.view_objective or manager or reporting_manager %} +
    + {% for emp_objective in objective.employee_objective.all %} + {% if request.user.employee_get not in objective.managers.all and reporting_manager %} + {% if emp_objective.employee_id in subordinates %} +
    + +
    +
    + {{ emp_objective.employee_id.get_full_name }} +
    + + {{ emp_objective.employee_id|truncatechars:15 }} + +
    + + + +
    - {{emp_objective.employee_id|truncatechars:15}} + {% endif %} + {% else %} +
    + +
    +
    + {{ emp_objective.employee_id.get_full_name }} +
    + + {{ emp_objective.employee_id|truncatechars:15 }} + +
    + + + +
    - - - - -
    - {% endfor %} - {{ objective.employee_objective.all|length}} {% trans "Assignees" %} -
    + {% endif %} + {% endfor %} + + {{ objective|assignees_count:request }} {% trans "Assignees" %} + +
    + + + {% endif %}
    {{objective.duration}} {{objective.get_duration_unit_display}}
    @@ -471,7 +514,7 @@ Baby C.