Skip to content

Commit 46e5d9e

Browse files
committed
Fix
1 parent 0e11a42 commit 46e5d9e

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

landolfio/inventory_frontend/templates/detail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ <h5 class="card-title mb-0">{% translate "History" %}</h5>
541541
<form method="post" action="{% url 'inventory_frontend:detail' asset.pk %}" class="d-inline">
542542
{% csrf_token %}
543543
<input type="hidden" name="action" value="delete_status_change">
544-
<input type="hidden" name="status_change_id" value="{{ status_change.id }}">
544+
<input type="hidden" name="status_change_id" value="{{ status_change.pk }}">
545545
<button type="submit" class="btn btn-link btn-sm text-muted p-1"
546546
onclick="return confirm('{% translate 'Are you sure you want to delete this status change?' %}')"
547547
title="{% translate 'Delete status change' %}">

landolfio/inventory_frontend/templates/list.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -542,15 +542,15 @@ <h4 class="card-title mb-0 fw-bold flex-grow-1 me-3" style="line-height: 1.2;">{
542542
</div>
543543
<!-- Status Badges Row -->
544544
<div class="d-flex gap-1 justify-content-end">
545-
<span class="badge
546-
{% if asset.local_status == 'available' %}bg-success
547-
{% elif asset.local_status == 'issued_rent' or asset.local_status == 'issued_loan' or asset.local_status == 'issued_unprocessed' %}bg-warning
548-
{% elif asset.local_status == 'maintenance_in_house' or asset.local_status == 'maintenance_external' or asset.local_status == 'under_review' %}bg-info
549-
{% elif asset.local_status == 'placeholder' or asset.local_status == 'to_be_delivered' %}bg-secondary
550-
{% elif asset.local_status == 'sold' or asset.local_status == 'amortized' or asset.is_disposed %}bg-dark
551-
{% elif asset.local_status == 'unknown' %}bg-danger
545+
<span class="badge
546+
{% if asset.current_status == 'available' %}bg-success
547+
{% elif asset.current_status == 'issued_rent' or asset.current_status == 'issued_loan' or asset.current_status == 'issued_unprocessed' %}bg-warning
548+
{% elif asset.current_status == 'maintenance_in_house' or asset.current_status == 'maintenance_external' or asset.current_status == 'under_review' %}bg-info
549+
{% elif asset.current_status == 'placeholder' %}bg-light text-dark{% elif asset.current_status == 'to_be_delivered' %}bg-secondary
550+
{% elif asset.current_status == 'sold' %}bg-secondary{% elif asset.current_status == 'amortized' %}bg-dark
551+
{% elif asset.current_status == 'unknown' %}bg-danger
552552
{% else %}bg-primary{% endif %}" style="font-size: 0.6rem;">
553-
{{ asset.get_local_status_display }}
553+
{{ asset.current_status_display }}
554554
</span>
555555
{% if asset.collection.commerce and asset.moneybird_asset_id %}
556556
<span class="badge bg-{{ asset.financial_status_color }} customer-mode-hide" style="font-size: 0.6rem;">
@@ -723,14 +723,14 @@ <h4 class="text-muted">{% translate "No assets found" %}</h4>
723723
<td>
724724
<div class="d-flex flex-column gap-1">
725725
<span class="badge
726-
{% if asset.local_status == 'available' %}bg-success
727-
{% elif asset.local_status == 'issued_rent' or asset.local_status == 'issued_loan' or asset.local_status == 'issued_unprocessed' %}bg-warning
728-
{% elif asset.local_status == 'maintenance_in_house' or asset.local_status == 'maintenance_external' or asset.local_status == 'under_review' %}bg-info
729-
{% elif asset.local_status == 'placeholder' or asset.local_status == 'to_be_delivered' %}bg-secondary
730-
{% elif asset.local_status == 'sold' or asset.local_status == 'amortized' or asset.is_disposed %}bg-dark
731-
{% elif asset.local_status == 'unknown' %}bg-danger
726+
{% if asset.current_status == 'available' %}bg-success
727+
{% elif asset.current_status == 'issued_rent' or asset.current_status == 'issued_loan' or asset.current_status == 'issued_unprocessed' %}bg-warning
728+
{% elif asset.current_status == 'maintenance_in_house' or asset.current_status == 'maintenance_external' or asset.current_status == 'under_review' %}bg-info
729+
{% elif asset.current_status == 'placeholder' %}bg-light text-dark{% elif asset.current_status == 'to_be_delivered' %}bg-secondary
730+
{% elif asset.current_status == 'sold' %}bg-secondary{% elif asset.current_status == 'amortized' %}bg-dark
731+
{% elif asset.current_status == 'unknown' %}bg-danger
732732
{% else %}bg-primary{% endif %}" style="font-size: 0.7rem;">
733-
{{ asset.get_local_status_display }}
733+
{{ asset.current_status_display }}
734734
</span>
735735
</div>
736736
</td>

0 commit comments

Comments
 (0)