[UPDT] DASHBOARD: Updated asset request details hx-target and data-target

This commit is contained in:
Horilla
2024-04-03 10:31:27 +05:30
parent caf4776a00
commit d99d68ef02
4 changed files with 8 additions and 64 deletions

View File

@@ -7,7 +7,7 @@
<div class="oh-sticky-table__th">{% trans "Request User" %}</div>
<div class="oh-sticky-table__th">{% trans "Asset Category" %}</div>
<div class="oh-sticky-table__th">{% trans "Request Date" %}</div>
<div class="oh-sticky-table__th"></div>
<div class="oh-sticky-table__th" align="center">{% trans "Actions" %}</div>
</div>
</div>
<div class="oh-sticky-table__tbody">
@@ -18,9 +18,9 @@
class="oh-sticky-table__tr"
draggable="true"
data-toggle="oh-modal-toggle"
data-target="#smallModal"
hx-get="{% url 'asset-request-individual-view' asset_request.id %}?requests_ids={{requests_ids}}&dashboard=true"
hx-target="#smallModalTarget"
data-target="#objectDetailsModalW25"
hx-get="{% url 'asset-request-individual-view' asset_request.id %}?requests_ids={{requests_ids}}"
hx-target="#objectDetailsModalW25Target"
>
<div class="oh-sticky-table__sd">
<div class="oh-profile oh-profile--md">

View File

@@ -7,26 +7,21 @@
<div class="oh-sticky-table__th">{% trans "Employee" %}</div>
<div class="oh-sticky-table__th">{% trans "Leave Type" %}</div>
<div class="oh-sticky-table__th">{% trans "Requested Days" %}</div>
<div class="oh-sticky-table__th"></div>
<div class="oh-sticky-table__th" align="center">{% trans "Actions" %}</div>
</div>
</div>
<div class="oh-sticky-table__tbody">
{% for leave_allocation_request in allocation_reqests %}
<div class="oh-sticky-table__tr" draggable="true"
data-toggle="oh-modal-toggle"
data-target="#smallModal"
hx-get="{% url 'leave-allocation-request-single-view' leave_allocation_request.id %}?instances_ids={{reqests_ids}}&dashboard=true"
hx-target="#smallModalTarget">
data-target="#objectDetailsModalW25"
hx-get="{% url 'leave-allocation-request-single-view' leave_allocation_request.id %}?instances_ids={{reqests_ids}}"
hx-target="#objectDetailsModalW25Target">
<div class="oh-sticky-table__sd" >
<div class="oh-profile oh-profile--md">
<div class="oh-profile__avatar mr-1">
{% if leave_allocation_request.employee_id.employee_profile %}
<img src="{{leave_allocation_request.employee_id.get_avatar}}" class="oh-profile__image"
alt="" />
{% else %}
<img src="https://ui-avatars.com/api/?name={{leave_allocation_request.employee_id}}&background=random"
class="oh-profile__image" alt="" />
{% endif %}
</div>
<span class="oh-profile__name oh-text--dark">{{leave_allocation_request.employee_id}}</span>
</div>

View File

@@ -745,28 +745,6 @@
</div>
</div>
<div
class="oh-modal"
id="singleViewModal"
role="dialog"
aria-labelledby="singleViewModal"
aria-hidden="true"
>
<div class="oh-modal__dialog">
<div class="oh-modal__dialog-header">
<span
class="oh-modal__dialog-title"
id=""
>
{% trans "Details" %}
</span>
<button class="oh-modal__close" aria-label="Close">
<ion-icon name="close-outline"></ion-icon>
</button>
</div>
<div class="oh-modal__dialog-body oh-modal__dialog-relative" id="singleViewTarget"></div>
</div>
</div>
<div
class="oh-modal"

View File

@@ -898,36 +898,7 @@
<div class="oh-modal__dialog-body" id="mail-content"></div>
</div>
</div>
<div
class="oh-modal"
id="smallModal"
role="dialog"
aria-labelledby="smallModal"
aria-hidden="true"
>
<div class="oh-modal__dialog oh-modal__dialog--timeoff oh-timeoff-modal">
<div class="oh-modal__dialog-header">
<h2
class="oh-modal__dialog-title"
id=""
>
{% trans "Details" %}
</h2>
<button class="oh-modal__close" aria-label="Close">
<ion-icon name="close-outline"></ion-icon>
</button>
</div>
<div
class="oh-modal__dialog-body oh-modal__dialog-relative oh-timeoff-modal__body"
id="smallModalTarget"
></div>
{% comment %} <div id="smallModalBody">
</div> {% endcomment %}
</div>
</div>
<div
class="oh-modal"
id="bigModal"