[FIX] OFFBOARDING: Button positions

This commit is contained in:
Horilla
2024-02-27 23:46:03 +05:30
parent c36503043d
commit 8cdc9d682e
3 changed files with 35 additions and 7 deletions

View File

@@ -93,7 +93,7 @@
<div class="oh-modal" id="resignationModal" role="dialog" aria-hidden="true">
<div class="oh-modal__dialog" style="max-width: 550px">
<div class="oh-modal__dialog-header">
<button type="button" class="oh-modal__close" aria-label="Close"><ion-icon name="close-outline"></ion-icon></button>
<button type="button" class="oh-modal__close" aria-label="Close" style="z-index:1"><ion-icon name="close-outline"></ion-icon></button>
</div>
<div class="oh-modal__dialog-body oh-modal__dialog-relative" id="resignationModalBody"></div>

View File

@@ -71,12 +71,6 @@
<form action="{% url 'update-letter-status' %}">
{% if perms.offboarding.change_resignationletter %}
<div class="oh-btn-group">
<button type="button"
onclick="$(this).closest('form').find('input[name=status]').val('rejected');resignLetterConfirmation('{% trans 'Do You really want to reject the request?' %}',$(this).closest('form').find('[type=submit]'));"
class="oh-btn oh-btn--danger oh-btn--block w-100">
<ion-icon name="close-circle-outline" class="mr-1 md hydrated" role="img" aria-label="close"></ion-icon>
{% comment %} {% trans 'Reject' %} {% endcomment %}
</button>
{% if record.status != "approved" %}
<button title="By approving the request employee will added to the offboarding pipeline" type="button"
onclick="$(this).closest('form').find('input[name=status]').val('approved');resignLetterConfirmation('{% trans 'Do You really want to approve the request' %}?',$(this).closest('form').find('[type=submit]'),true);"
@@ -90,6 +84,12 @@
{% comment %} {% trans 'Approved' %} {% endcomment %}
</button>
{% endif %}
<button type="button"
onclick="$(this).closest('form').find('input[name=status]').val('rejected');resignLetterConfirmation('{% trans 'Do You really want to reject the request?' %}',$(this).closest('form').find('[type=submit]'));"
class="oh-btn oh-btn--danger oh-btn--block w-100">
<ion-icon name="close-circle-outline" class="mr-1 md hydrated" role="img" aria-label="close"></ion-icon>
{% comment %} {% trans 'Reject' %} {% endcomment %}
</button>
<input type="hidden" name="status">
<input type="hidden" name="letter_ids" value="{{record.id}}">
<input type="hidden" name="offboarding_id">

View File

@@ -82,6 +82,9 @@
</div>
<div class="oh-sticky-table__th oh-sticky-table__right">
{% trans "Actions" %}
</div>
<div class="oh-sticky-table__th oh-sticky-table__right">
{% trans "Confirmation" %}
</div>
</div>
</div>
@@ -108,6 +111,31 @@
<div data-cell-index="4" class="oh-sticky-table__td">
{{letter.description|safe|truncatechars:30}}
</div>
<div class="oh-sticky-table__td" onclick="event.stopPropagation()">
<div class="oh-btn-group">
{% if perms.offboarding.change_resignationletter %}
<button type="button" hx-get="{% url 'send-mail-employee' letter.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 %}
<a hx-get="{% url 'create-resignation-request' %}?instance_id={{ letter.id }}" title = {% trans "Edit" %}
class="oh-btn oh-btn--light" data-toggle="oh-modal-toggle" hx-target="#resignationModalBody"
data-target="#resignationModal" 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={{letter.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>
</div>
<div class="oh-sticky-table__td oh-sticky-table__right">
<form action="{% url 'update-letter-status' %}">
{% if perms.offboarding.change_resignationletter %}