[FIX] PMS: PMS dashboard okr at risk redirect view changed to individual view

This commit is contained in:
Horilla
2024-04-08 15:15:39 +05:30
parent d2ea994860
commit af979160a2
4 changed files with 14 additions and 7 deletions

View File

@@ -141,7 +141,14 @@
<ul class="oh-card-dashboard__user-list">
{% for okr in okr_at_risk %}
<li class="oh-card-dashboard__user-item">
<a href="{%url 'objective-detailed-view' emp_obj_id=okr.id %}">
<a
hx-get='{% url "view-employee-objective" okr.id %}'
hx-target="#objectDetailsModalTarget"
data-toggle="oh-modal-toggle"
data-target="#objectDetailsModal"
type="button" title="{% trans 'View' %}"
class="oh-btn oh-btn--light-bkg p-3 w-100" onclick="event.stopPropagation()"
>
<div class="oh-profile oh-profile--md">
<div class="oh-profile__avatar mr-1">
<img src="{{okr.employee_id.get_avatar}}"

View File

@@ -114,7 +114,7 @@
<div class="oh-modal__button-container text-center mt-3">
<div class="oh-btn-group">
<a class="oh-btn oh-btn--info" hx-get='{% url "update-employee-objective" instance.id %}' hx-target="#objectivesTarget" data-toggle="oh-modal-toggle" data-target="#objectivesModal" style="width: 50%;">
<a class="oh-btn oh-btn--info" hx-get='{% url "update-employee-objective" instance.id %}' hx-target="#objectDetailsModalTarget" data-toggle="oh-modal-toggle" data-target="#objectDetailsModal" style="width: 50%;">
<ion-icon name="create-outline">
</ion-icon>{% trans "Edit" %}
</a>
@@ -165,8 +165,8 @@
</div>
</div>
<script>
{% comment %} <script>
function empObjStatusUpdate(element){
alert('ssssssssssss')
}
</script>
</script> {% endcomment %}

View File

@@ -5,14 +5,14 @@
<h2 class="oh-modal__dialog-title" >
{% trans "Update Employee Objective" %}
</h2>
<button type="button" class="oh-modal__close--custom" onclick="$('#objectivesModal').removeClass('oh-modal--show');">
<button type="button" class="oh-modal__close--custom" onclick="$('#objectDetailsModal').removeClass('oh-modal--show');">
<ion-icon name="close-outline" role="img" aria-label="close outline"></ion-icon>
</button>
</div>
<div class="oh-modal__dialog-body">
<form
hx-post="{%url 'update-employee-objective' form.instance.id %}"
hx-target="#objectivesTarget"
hx-target="#objectDetailsModalTarget"
id="empObjectiveForm"
>
{% csrf_token %}

View File

@@ -976,7 +976,7 @@ def change_employee_objective_status(request, emp_obj):
)
notify.send(
request.user.employee_get,
recipient=emp_objective.employee_id,
recipient=emp_objective.employee_id.employee_user_id,
verb=f"The status of the objective '{emp_objective.objective_id}' has been changed to {emp_objective.status}.",
verb_ar=f"تم تغيير حالة الهدف '{emp_objective.objective_id}' إلى {emp_objective.status}.",
verb_de=f"Der Status des Ziels '{emp_objective.objective_id}' wurde zu {emp_objective.status} geändert.",