[UPDT] ASSET: Updated asset return form hx-target and data-target

This commit is contained in:
Horilla
2024-04-17 13:17:23 +05:30
parent f41c8871f8
commit ed19bb3e09
3 changed files with 4 additions and 35 deletions

View File

@@ -62,7 +62,7 @@
<div class="oh-sticky-table__td">
<div class="oh-btn-group" >
<a class="oh-btn oh-btn--success" role="button" data-toggle="oh-modal-toggle"
data-target="#asset-request-allocation-modal" hx-get="{%url 'asset-request-approve' req_id=asset_request.id %}" hx-target="#asset-request-allocation-modal-target" >
data-target="#objectCreateModal" hx-get="{%url 'asset-request-approve' req_id=asset_request.id %}" hx-target="#objectCreateModalTarget" >
<ion-icon name="checkmark-outline"></ion-icon>
{% trans "Approve" %}
</a>
@@ -127,7 +127,7 @@
{% if perms.asset.add_assetassignment %}
{% if asset_request.asset_request_status == 'Requested' %}
<a class="oh-btn oh-btn--success " role="button" data-toggle="oh-modal-toggle"
data-target="#asset-request-allocation-modal" hx-get="{%url 'asset-request-approve' req_id=asset_request.id %}" hx-target="#asset-request-allocation-modal-target" title="{% trans 'Approve' %}">
data-target="#objectCreateModal" hx-get="{%url 'asset-request-approve' req_id=asset_request.id %}" hx-target="#objectCreateModalTarget" title="{% trans 'Approve' %}">
<ion-icon name="checkmark-outline"></ion-icon>
</a>
<form action="{% url 'asset-request-reject' req_id=asset_request.id %}" method="post" class=""
@@ -147,18 +147,4 @@
</div>
</div>
</div>
<div class="oh-modal" id="asset-request-allocation-modal" role="dialog" aria-labelledby="AssetRequestModal" 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>
</div>
<!-- htmx form -->
<div class="oh-modal__dialog-body" id="asset-request-allocation-modal-target">
</div>
</div>
</div>

View File

@@ -63,9 +63,9 @@
class="oh-btn oh-btn--secondary w-50"
role="button"
data-toggle="oh-modal-toggle"
data-target="#asset-return-allocation-modal"
data-target="#objectCreateModal"
hx-get="{%url 'asset-allocate-return' asset_id=asset.asset_id.id %}"
hx-target="#asset-return-allocation-modal-target"
hx-target="#objectCreateModalTarget"
onclick="event.stopPropagation();"
>
<ion-icon name="return-down-back-sharp"></ion-icon>{% trans "Return" %}

View File

@@ -20,12 +20,6 @@
<div class="oh-sticky-table__th">{% trans "Status" %}</div>
<div class="oh-sticky-table__th">{% trans "Assigned Date" %}</div>
<div class="oh-sticky-table__th">{% trans "Actions" %}</div>
{% comment %} <div class="oh-sticky-table__th" style="width: 10px;"> {% endcomment %}
{% comment %} <a class="link-danger oh-btn oh-btn--secondary-outline" role="button" data-toggle="oh-modal-toggle"
data-target="#asset-request-allocation-modal" hx-get="{% url 'asset-request-creation' %}" hx-target="#asset-request-allocation-modal-target" title="{% trans 'Create asset request' %}">
<ion-icon name="add-outline" role="img" class="md hydrated" aria-label="add outline"></ion-icon>
</a>
</div> {% endcomment %}
</div>
</div>
<div class="oh-sticky-table__tbody">
@@ -87,17 +81,6 @@
<h5 class="oh-404__subtitle">{% trans "No assets have been allocated." %}</h5>
</div>
{% endif %}
<div class="oh-modal" id="asset-request-allocation-modal" role="dialog" aria-labelledby="AssetRequestModal" 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>
</div>
<!-- htmx form -->
<div class="oh-modal__dialog-body" id="asset-request-allocation-modal-target"></div>
</div>
</div>
<div
class="oh-modal"
id="asset-return-allocation-modal"