From f9677df794cdf945a8760853c260bac3233fd0bb Mon Sep 17 00:00:00 2001 From: Horilla Date: Thu, 19 Oct 2023 12:39:13 +0530 Subject: [PATCH] [ADD] PMS: Quick filter into objective view --- pms/models.py | 4 +++ pms/static/css/pms.css | 2 +- .../okr/key_result/key_result_view.html | 29 ++++++++++++------- pms/templates/okr/objective_list.html | 26 +++++++++++++++-- pms/views.py | 1 + 5 files changed, 49 insertions(+), 13 deletions(-) diff --git a/pms/models.py b/pms/models.py index f246fa813..1d72997cf 100644 --- a/pms/models.py +++ b/pms/models.py @@ -138,6 +138,10 @@ class EmployeeKeyResult(models.Model): def __str__(self): return f"{self.key_result} " + def save(self, *args, **kwargs): + if self.employee_id is None: + self.employee_id = self.employee_objective_id.employee_id + super().save(*args, **kwargs) """360degree feedback section""" diff --git a/pms/static/css/pms.css b/pms/static/css/pms.css index cd8f0bb46..d370f261a 100644 --- a/pms/static/css/pms.css +++ b/pms/static/css/pms.css @@ -1,6 +1,6 @@ .oh-dot--colorOn { - background-color: hsl(148deg, 71%, 44%) + background-color: yellowgreen } .oh-dot--colorBehind { background-color: hsl(40deg, 91%, 60%) diff --git a/pms/templates/okr/key_result/key_result_view.html b/pms/templates/okr/key_result/key_result_view.html index 7dfad6730..713a064db 100644 --- a/pms/templates/okr/key_result/key_result_view.html +++ b/pms/templates/okr/key_result/key_result_view.html @@ -3,6 +3,7 @@ {% load widget_tweaks %} {% block content %} {% load basefilters %} +
@@ -34,7 +35,8 @@ data-toggle="oh-modal-toggle" hx-get="{% url 'key-result-update' id=employee_key_result.id %}" hx-target="#ObjectiveModalFormTarget" - data-target="#objectiveModalpopup" > + data-target="#objectiveModalpopup" + onclick="$('#objectiveModalpopup').toggleClass('oh-modal--show')"> {% trans "Edit" %} @@ -63,13 +65,13 @@ {% trans "Current Value" %} + hx-target="#ObjectiveModalFormTarget" + name="current_value" /> @@ -91,9 +93,9 @@ @@ -123,10 +124,18 @@ -
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/pms/templates/okr/objective_list.html b/pms/templates/okr/objective_list.html index 7db2611fd..9349fc656 100644 --- a/pms/templates/okr/objective_list.html +++ b/pms/templates/okr/objective_list.html @@ -2,6 +2,28 @@ {% load basefilters %} {% include 'filter_tags.html' %} +
+ + + {% trans "At Risk" %} + + + + {% trans "Not Started" %} + + + + + {% trans "Closed" %} + + +