[FIX] ASSET: Archived employee data display

This commit is contained in:
Horilla
2024-03-21 14:21:37 +05:30
parent d09e9b4946
commit b9001bde90
2 changed files with 2 additions and 6 deletions

View File

@@ -12,10 +12,6 @@
<div class="oh-sticky-table__tbody">
{% for asset_allocation in asset_allocations %}
<div class="oh-sticky-table__tr"
{% comment %} data-toggle="oh-modal-toggle"
data-target="#asset_dashboard_modal"
hx-get="{% url 'asset-allocation-individual-view' asset_allocation.id %}?allocations_ids={{allocations_ids}}"
hx-target="#asset_dashboard_modal_target" {% endcomment %}
>
<div
class="oh-sticky-table__sd"

View File

@@ -1360,8 +1360,8 @@ def asset_dashboard(request):
"""
assets = Asset.objects.all()
asset_in_use = Asset.objects.filter(asset_status="In use")
asset_requests = AssetRequest.objects.filter(asset_request_status="Requested")
asset_allocations = AssetAssignment.objects.filter(asset_id__asset_status="In use")
asset_requests = AssetRequest.objects.filter(asset_request_status="Requested",requested_employee_id__is_active=True)
asset_allocations = AssetAssignment.objects.filter(asset_id__asset_status="In use",assigned_to_employee_id__is_active=True)
context = {
"assets": assets,
"asset_requests": asset_requests,