[FIX] ASSET: Fine modal not closing issue

This commit is contained in:
Horilla
2024-02-05 11:50:51 +05:30
parent d80bb4bbcf
commit 7efc2427f6
3 changed files with 12 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ class Asset(models.Model):
"""
ASSET_STATUS = [
("In use", _("In use")),
("In use", _("Allocated")),
("Available", _("Available")),
("Not-Available", _("Not-Available")),
]

View File

@@ -49,7 +49,8 @@
<div class="oh-sticky-table__thead">
<div class="oh-sticky-table__tr">
<div class="oh-sticky-table__th">{% trans "Asset" %}</div>
<div class="oh-sticky-table__th">{% trans "Status" %}</div>
<div class="oh-sticky-table__th">{% trans "Category" %}</div>
<div class="oh-sticky-table__th">{% trans "Expiry Date" %}</div>
<div class="oh-sticky-table__th"></div>
</div>
</div>
@@ -73,10 +74,10 @@
</div>
</div>
<div class="oh-sticky-table__td">
<span
class="oh-dot oh-dot--small me-1 oh-dot--color oh-dot--warning"
></span>
<span class="link-warning"> {% trans "In use" %} </span>
<span class=""> {{asset.asset_id.asset_category_id}} </span>
</div>
<div class="oh-sticky-table__td">
<span class=""> {{asset.asset_id.expiry_date}} </span>
</div>
<div class="oh-sticky-table__td">
{% if perms.asset.change_assetassignment %}
@@ -101,7 +102,7 @@
</div>
{% else %}
<form action = "{% url 'asset-allocate-return-request' asset_id=asset.id %}"
onsubmit="return confirm('{% trans "Are you sure you want to delete this announcement?" %}');"
onsubmit="return confirm('{% trans "Are you sure you want to return this asset?" %}');"
>
{% csrf_token %}
<button type="submit" class="oh-btn oh-btn--secondary">
@@ -425,7 +426,7 @@
{% else %}
<div class="oh-sticky-table__td">
<span class="oh-dot oh-dot--small me-1 oh-dot--color oh-dot--warning" ></span>
<span class="link-warning"> {% trans "In use" %} </span>
<span class="link-warning"> {% trans "Allocated" %} </span>
</div>
{% endif %}
{% endif %}

View File

@@ -455,6 +455,9 @@
$("#gp_allocation").on("change", function () {
$(".filterButton")[0].click();
});
$("#assetFineModalBody").on("click",".oh-btn--secondary", function () {
$('#assetFineModal').removeClass('oh-modal--show');
})
});
</script>
<script src="{% static '/base/filter.js' %}"></script>