[UPDT] PMS: Employee objective list, view permission is added to reporting managers
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for emp_objective in emp_objectives.object_list %}
|
{% for emp_objective in emp_objectives.object_list %}
|
||||||
{% if perms.pms.view_employeeobjective or emp_objective|is_manager_or_owner:request.user %}
|
{% if perms.pms.view_employeeobjective or emp_objective|is_manager_or_owner:request.user or is_reporting_manager %}
|
||||||
<div class="oh-accordion-meta">
|
<div class="oh-accordion-meta">
|
||||||
<div class="oh-accordion-meta__item">
|
<div class="oh-accordion-meta__item">
|
||||||
<div class="oh-accordion-meta__header"
|
<div class="oh-accordion-meta__header"
|
||||||
|
|||||||
@@ -70,38 +70,48 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="oh-sticky-table__td">{{kr.start_value}}</div>
|
<div class="oh-sticky-table__td">{{kr.start_value}}</div>
|
||||||
<div class="oh-sticky-table__td">
|
{% if perms.pms.change_employeeobjective or emp_objective|is_manager:request.user %}
|
||||||
<input
|
<div class="oh-sticky-table__td">
|
||||||
id = {{kr.id}}
|
<input
|
||||||
type="number" class="oh-input p-1" min="0"
|
id = {{kr.id}}
|
||||||
max="{{kr.target_value}}"
|
type="number" class="oh-input p-1"
|
||||||
value="{{kr.current_value}}"
|
style="width: 100px;"
|
||||||
{% comment %} hx-post="{%url 'employee-keyresult-update-current_value' kr.id %}"
|
min="0"
|
||||||
hx-trigger="change"
|
value="{{kr.current_value}}"
|
||||||
hx-target="#emp_objective_card" {% endcomment %}
|
name="current_value"
|
||||||
name="current_value"
|
onchange="delayedProgress(this)"
|
||||||
onchange="delayedProgress(this)"
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
|
{% else %}
|
||||||
|
<div class="oh-sticky-table__td">{{kr.current_value}}</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="oh-sticky-table__td " data-value="{{kr.target_value}}" >{{kr.target_value}}</div>
|
<div class="oh-sticky-table__td " data-value="{{kr.target_value}}" >{{kr.target_value}}</div>
|
||||||
<div class="oh-sticky-table__td p-percentage" >{{kr.progress_percentage}}% </div>
|
<div class="oh-sticky-table__td p-percentage" >{{kr.progress_percentage}}% </div>
|
||||||
<div class="oh-sticky-table__td">{{kr.start_date}}</div>
|
<div class="oh-sticky-table__td">{{kr.start_date}}</div>
|
||||||
<div class="oh-sticky-table__td">{{kr.end_date}}</div>
|
<div class="oh-sticky-table__td">{{kr.end_date}}</div>
|
||||||
<div class="oh-sticky-table__td">
|
{% if perms.pms.change_employeeobjective or emp_objective|is_manager:request.user %}
|
||||||
<select
|
<div class="oh-sticky-table__td">
|
||||||
id="keyResultStatus" name="key_result_status"
|
<select
|
||||||
hx-post="{% url 'employee-keyresult-update-status' kr.id %}"
|
id="keyResultStatus" name="key_result_status"
|
||||||
hx-trigger="change" class="oh-table__editable-input w-100"
|
hx-post="{% url 'employee-keyresult-update-status' kr.id %}"
|
||||||
hx-target="#krData{{kr.employee_objective_id.id}}">
|
hx-trigger="change" class="oh-table__editable-input w-100"
|
||||||
{% for value,label in key_result_status %}
|
hx-target="#krData{{kr.employee_objective_id.id}}">
|
||||||
{% if kr.status != value %}
|
{% for value,label in key_result_status %}
|
||||||
<option value="{{value}}">{{label}}</option>
|
{% if kr.status != value %}
|
||||||
{% else %}
|
<option value="{{value}}">{{label}}</option>
|
||||||
<option value="{{value}}" selected>{{label}}</option>
|
{% else %}
|
||||||
{% endif%}
|
<option value="{{value}}" selected>{{label}}</option>
|
||||||
{% endfor %}
|
{% endif%}
|
||||||
</select>
|
{% endfor %}
|
||||||
</div>
|
</select>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="oh-sticky-table__td">
|
||||||
|
{{ kr.get_status_display }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% if perms.pms.change_employeeobjective or kr.employee_objective_id|is_manager:request.user %}
|
{% if perms.pms.change_employeeobjective or kr.employee_objective_id|is_manager:request.user %}
|
||||||
<div class="oh-sticky-table__td oh-sticky-table__right" onclick="event.stopPropagation()">
|
<div class="oh-sticky-table__td oh-sticky-table__right" onclick="event.stopPropagation()">
|
||||||
<div class="oh-btn-group">
|
<div class="oh-btn-group">
|
||||||
|
|||||||
Reference in New Issue
Block a user