[UPDT] OFFBOARDING: Updated permissions in actions and options in resignation request and button text
This commit is contained in:
@@ -804,6 +804,7 @@ class DashboardTaskListview(HorillaListView):
|
||||
filter_class = PipelineEmployeeFilter
|
||||
bulk_select_option = False
|
||||
view_id = "dashboard_task_status"
|
||||
show_toggle_form = False
|
||||
|
||||
def get_queryset(self):
|
||||
"""
|
||||
@@ -834,12 +835,13 @@ if apps.is_installed("asset"):
|
||||
|
||||
bulk_select_option = False
|
||||
view_id = "dashboard_task_status"
|
||||
show_toggle_form = False
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.AssetAssignment = get_horilla_model_class(
|
||||
AssetAssignment = get_horilla_model_class(
|
||||
app_label="asset", model="assetassignment"
|
||||
)
|
||||
self.model = self.AssetAssignment # 809
|
||||
self.model = AssetAssignment # 809
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def get_queryset(self):
|
||||
@@ -889,6 +891,8 @@ if apps.is_installed("pms"):
|
||||
|
||||
bulk_select_option = False
|
||||
view_id = "dashboard_task_status"
|
||||
show_toggle_form = False
|
||||
|
||||
columns = [
|
||||
("Employee", "employee_id__get_full_name", "employee_id__get_avatar"),
|
||||
("Feedback", "review_cycle"),
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
{% load i18n %}
|
||||
<div style="width : 100%" onclick="event.stopPropagation()">
|
||||
<style>
|
||||
tr span.txt {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="width: 100%" onclick="event.stopPropagation()">
|
||||
<form action="{% url 'update-letter-status' %}">
|
||||
{% if perms.offboarding.change_resignationletter %}
|
||||
<div class="oh-btn-group">
|
||||
@@ -16,7 +22,7 @@
|
||||
role="img"
|
||||
aria-label="checkmark"
|
||||
></ion-icon>
|
||||
{% trans "Approve" %}
|
||||
<span class="txt">{% trans "Approve" %}</span>
|
||||
</button>
|
||||
{% else %}
|
||||
<button
|
||||
@@ -29,7 +35,7 @@
|
||||
role="img"
|
||||
aria-label="checkmark"
|
||||
></ion-icon>
|
||||
{% trans "Approve" %}
|
||||
<span class="txt">{% trans "Approve" %}</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if instance.status == 'rejected' %}
|
||||
@@ -44,7 +50,7 @@
|
||||
role="img"
|
||||
aria-label="close"
|
||||
></ion-icon>
|
||||
{% trans "Reject" %}
|
||||
<span class="txt">{% trans "Reject" %}</span>
|
||||
</button>
|
||||
{% else %}
|
||||
<button
|
||||
@@ -58,20 +64,19 @@
|
||||
role="img"
|
||||
aria-label="close"
|
||||
></ion-icon>
|
||||
{% trans "Reject" %}
|
||||
<span class="txt">{% trans "Reject" %}</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<input type="hidden" name="status" />
|
||||
<input type="hidden" name="letter_ids" value="{{instance.id}}" />
|
||||
<input type="hidden" name="offboarding_id" />
|
||||
<input
|
||||
type="hidden"
|
||||
name="letter_ids"
|
||||
value="{{instance.id}}"
|
||||
name="notice_period_starts"
|
||||
value="{% now 'Y-m-d' %}"
|
||||
id="notice_period_starts{{instance.id}}"
|
||||
/>
|
||||
<input type="hidden" name="offboarding_id" />
|
||||
<input type="hidden" name="notice_period_starts"
|
||||
value="{% now "Y-m-d" %}"
|
||||
id="notice_period_starts{{instance.id}}">
|
||||
<input
|
||||
type="hidden"
|
||||
name="notice_period_ends"
|
||||
@@ -79,10 +84,6 @@
|
||||
/>
|
||||
<button type="submit" hidden></button>
|
||||
{% endif %}
|
||||
<input
|
||||
type="submit"
|
||||
hidden=""
|
||||
id="requestCard1Button"
|
||||
/>
|
||||
<input type="submit" hidden="" id="requestCard1Button" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,26 +1,78 @@
|
||||
{% load i18n %}
|
||||
<div onclick="event.stopPropagation()">
|
||||
<div class="oh-btn-group">
|
||||
{% if perms.offboarding.change_resignationletter %}
|
||||
<button type="button" hx-get="{% url 'send-mail-employee' instance.employee_id.id %}"
|
||||
title="{% trans " Send Mail" %}" hx-target="#resignationModalBody" class="oh-btn oh-btn--light" data-toggle="oh-modal-toggle"
|
||||
data-target="#resignationModal" style="flex: 1 0 auto; width: 40px; height: 40.68px; padding: 0"
|
||||
onclick="event.stopPropagation()"><ion-icon name="mail-open-outline" role="img" class="md hydrated"
|
||||
aria-label="mail open outline"></ion-icon>
|
||||
</button>
|
||||
{% endif %}
|
||||
<div onclick="event.stopPropagation()">
|
||||
<div class="oh-btn-group">
|
||||
{% if perms.offboarding.change_resignationletter %}
|
||||
<button
|
||||
type="button"
|
||||
hx-get="{% url 'send-mail-employee' instance.employee_id.id %}"
|
||||
title="{% trans 'Send Mail' %}"
|
||||
hx-target="#resignationModalBody"
|
||||
class="oh-btn oh-btn--light flex-fill"
|
||||
data-toggle="oh-modal-toggle"
|
||||
data-target="#resignationModal"
|
||||
onclick="event.stopPropagation()"
|
||||
>
|
||||
<ion-icon
|
||||
name="mail-open-outline"
|
||||
role="img"
|
||||
class="md hydrated"
|
||||
aria-label="mail open outline"
|
||||
></ion-icon>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<a hx-get="{% url 'resignation-request-update' instance.id %}" title = {% trans "Edit" %}
|
||||
class="oh-btn oh-btn--light" data-toggle="oh-modal-toggle" hx-target="#genericModalBody"
|
||||
data-target="#genericModal" style="flex: 1 0 auto; width: 40px; height: 40.68px; padding: 0"><ion-icon
|
||||
class="text-dark md hydrated" name="create-outline" role="img" aria-label="create outline"></ion-icon></a>
|
||||
{% if perms.offboarding.delete_resignationletter %}
|
||||
<a href="{% url 'delete-resignation-request' %}?letter_ids={{instance.id}}" class="oh-btn oh-btn--light"
|
||||
title = {%trans "Delete" %} style="flex: 1 0 auto; width: 40px; height: 40.68px; padding: 0"
|
||||
onclick="return confirm('{% trans 'Do you want to delete this record' %}?')"><ion-icon
|
||||
class="text-danger md hydrated" name="trash-outline" role="img" aria-label="trash outline"></ion-icon>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% if instance.status == "approved" %}
|
||||
<a
|
||||
title="{% trans 'Edit' %}"
|
||||
class="oh-btn oh-btn--light oh-btn--disabled flex-fill"
|
||||
><ion-icon
|
||||
class="text-dark md hydrated"
|
||||
name="create-outline"
|
||||
role="img"
|
||||
aria-label="create outline"
|
||||
></ion-icon
|
||||
></a>
|
||||
{% if perms.offboarding.delete_resignationletter %}
|
||||
<a
|
||||
class="oh-btn oh-btn--light oh-btn--disabled flex-fill"
|
||||
title="{% trans 'Delete' %}"
|
||||
><ion-icon
|
||||
class="text-danger md hydrated"
|
||||
name="trash-outline"
|
||||
role="img"
|
||||
aria-label="trash outline"
|
||||
></ion-icon>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a
|
||||
hx-get="{% url 'resignation-request-update' instance.id %}"
|
||||
title="{% trans 'Edit' %}"
|
||||
class="oh-btn oh-btn--light flex-fill"
|
||||
data-toggle="oh-modal-toggle"
|
||||
hx-target="#genericModalBody"
|
||||
data-target="#genericModal"
|
||||
><ion-icon
|
||||
class="text-dark md hydrated"
|
||||
name="create-outline"
|
||||
role="img"
|
||||
aria-label="create outline"
|
||||
></ion-icon
|
||||
></a>
|
||||
{% if perms.offboarding.delete_resignationletter %}
|
||||
<a
|
||||
href="{% url 'delete-resignation-request' %}?letter_ids={{instance.id}}"
|
||||
class="oh-btn oh-btn--light flex-fill"
|
||||
title="{% trans 'Delete' %}"
|
||||
onclick="return confirm('{% trans 'Do you want to delete this record' %}?')"
|
||||
><ion-icon
|
||||
class="text-danger md hydrated"
|
||||
name="trash-outline"
|
||||
role="img"
|
||||
aria-label="trash outline"
|
||||
></ion-icon>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user