[FIX] #589
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load basefilters %}
|
||||
{% load horillafilters %}
|
||||
{% load horillafilters employee_filter %}
|
||||
|
||||
|
||||
<span name="" id="filterEmployee" style="display: none" hx-get="{% url 'employee-filter-view' %}?{{pd}}" hx-target="#view-container"></span>
|
||||
<div class="d-flex flex-row-reverse m-2">
|
||||
@@ -89,7 +90,7 @@
|
||||
{% if perms.employee.change_employee or request.user|check_manager:emp %}
|
||||
<li class="oh-dropdown__item">
|
||||
<a href="{% url 'profile-edit-access' emp.id %}?feature=profile_edit" class="oh-dropdown__link">
|
||||
{% if emp.profile_edit_accessibility.all %}
|
||||
{% if emp|edit_accessibility %}
|
||||
{% trans "Revoke Profile Edit Access" %}
|
||||
{% else %}
|
||||
{% trans "Add Profile Edit Access" %}
|
||||
|
||||
@@ -12,3 +12,8 @@ def add_days(value, days):
|
||||
return value + timedelta(days=days)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@register.filter(name="edit_accessibility")
|
||||
def edit_accessibility(emp):
|
||||
return emp.default_accessibility.filter(feature="profile_edit").exists()
|
||||
|
||||
Reference in New Issue
Block a user