[FIX] LEAVE: Remove cancelled and rejected from my leave requests quick filter

This commit is contained in:
Horilla
2024-02-02 19:41:03 +05:30
parent 53611a315d
commit 38bcfac6d5
2 changed files with 7 additions and 11 deletions

View File

@@ -18,7 +18,7 @@
{% trans "Approved" %}
</span>
<span class="m-3 confirmed" onclick="$('[name=status]').val('requested');$('[name=status]').first().change();$('.filterButton').click()" style="cursor: pointer">
<span class="oh-dot oh-dot--small me-1" style="background-color:rgb(103, 171, 238)"></span>
<span class="oh-dot oh-dot--small me-1" style="background-color:orange"></span>
{% trans "Requested" %}
</span>
</div>
@@ -85,7 +85,7 @@
<div class="oh-sticky-table__tr" draggable="true" data-toggle="oh-modal-toggle" data-target="#tableTimeOff"
hx-get="{% url 'one-request-view' leave_request.id %}?instances_ids={{requests_ids}}" hx-target="#requestView">
{% if not request.GET.dashboard %}
<div class="oh-sticky-table__sd {% if leave_request.status == "requested" %} row-status--blue {% elif leave_request.status == "cancelled_and_rejected" %} row-status--black
<div class="oh-sticky-table__sd {% if leave_request.status == "requested" %} row-status--orange
{% elif leave_request.status == "approved" %} row-status--yellow {% elif leave_request.status == "cancelled" %} row-status--gray
{% elif leave_request.status == "rejected" %}row-status--red{% endif %}" onclick="event.stopPropagation()">
<div class="centered-div">

View File

@@ -7,22 +7,18 @@
<span class="oh-dot oh-dot--small me-1" style="background-color:red"></span>
{% trans "Rejected" %}
</span>
<span class="m-3 review_ongoing" onclick="$('[name=status]').val('cancelled_and_rejected');$('[name=status]').first().change();$('.filterButton').click()" style="cursor: pointer">
<span class="oh-dot oh-dot--small me-1" style="background-color:#000"></span>
{% trans "Cancelled & rejected" %}
</span>
<span class="m-3" style="cursor:pointer;" onclick="$('[name=status]').val('cancelled');$('[name=status]').first().change();$('.filterButton').click()">
<span class="oh-dot oh-dot--small me-1" style="background-color:gray"></span>
{% trans "Cancelled" %}
</span>
<span class="m-3" style="cursor:pointer;" onclick="$('[name=status]').val('requested');$('[name=status]').first().change();$('.filterButton').click()">
<span class="oh-dot oh-dot--small me-1" style="background-color:orange;"></span>
{% trans "Requested" %}
</span>
<span class="m-3" style="cursor:pointer;" onclick="$('[name=status]').val('approved');$('[name=status]').first().change();$('.filterButton').click()">
<span class="oh-dot oh-dot--small me-1" style="background-color:yellowgreen"></span>
{% trans "Approved" %}
</span>
<span class="m-3" style="cursor:pointer;" onclick="$('[name=status]').val('requested');$('[name=status]').first().change();$('.filterButton').click()">
<span class="oh-dot oh-dot--small me-1" style="background-color:orange;"></span>
{% trans "Requested" %}
</span>
</div>
<!-- start of selection buttons -->
<div
@@ -80,7 +76,7 @@
hx-get="{% url 'user-request-one' leave_request.id %}?instances_ids={{request_ids}}"
hx-target="#userRequestView">
<div class="oh-sticky-table__sd {% if leave_request.status == "requested" %}row-status--orange
{% elif leave_request.status == "cancelled_and_rejected" %} row-status--black {% elif leave_request.status == "cancelled" %} row-status--gray
{% elif leave_request.status == "cancelled" %} row-status--gray
{% elif leave_request.status == "approved" %} row-status--yellow {% elif leave_request.status == "rejected" %} row-status--red{% endif %}" onclick="event.stopPropagation()">
<div class="centered-div">
<input