From 10a4c83f3b3f89f4239a01db189b6e7ac786844a Mon Sep 17 00:00:00 2001 From: Wahyudin Date: Tue, 27 Oct 2026 13:50:41 +0700 Subject: [PATCH] style: tidy up consumable detail action buttons and topbar title --- templates/consumable_detail.html | 123 ++++++++++++++++++++++--------- 1 file changed, 90 insertions(+), 33 deletions(-) diff --git a/templates/consumable_detail.html b/templates/consumable_detail.html index 1253ce3..8877c8a 100644 --- a/templates/consumable_detail.html +++ b/templates/consumable_detail.html @@ -1,6 +1,6 @@ {% extends 'base.html' %} -{% block page_title %}{{ item.item_code }} - {{ item.name }}{% endblock %} +{% block page_title %}{{ item.item_code }}{% endblock %} {% block page_title_guide %}Buku Besar & Riwayat Stok Consumable{% endblock %} {% block page_guide_content %} @@ -15,58 +15,94 @@ {% block content %} -
-
-
- Consumable Item - • - {{ item.item_code }} +
+ +
+
+ + Consumable Item + + • + {{ item.item_code }}
-
-

{{ item.name }}

+ +
+

{{ item.name }}

+ {% if item.stock_status == 'out_of_stock' %} - + Stok Habis {% elif item.stock_status == 'low_stock' %} - + Stok Menipis {% else %} - + Stok Tersedia {% endif %} - + + {{ item.get_category_display }}
-

{{ item.brand|default:"Tanpa Merek" }} • {{ item.specification|default:"Tidak ada spesifikasi khusus" }}

+ +

+ {{ item.brand|default:"Tanpa Merek" }} + {% if item.specification %} + • + {{ item.specification }} + {% endif %} +

- -
- - - Katalog + +
+ + + Kembali + {% if not is_read_only %} - - - + + +
+ + +
{% endif %}
@@ -120,18 +156,31 @@
-
+

Buku Besar Persediaan (Stock Ledger)

+ {% if not is_read_only %} +
+ + +
+ {% else %} Audit Trail Mutasi Stok + {% endif %}
- - + + @@ -654,5 +703,13 @@ function closeModalReversal() { document.getElementById('modalReversal').classList.add('hidden'); } + + // Tutup dropdown saat klik di luar + window.addEventListener('click', function(e) { + var trxDropdown = document.getElementById('trxActionDropdown'); + if (trxDropdown && !trxDropdown.contains(e.target)) { + trxDropdown.style.display = 'none'; + } + }); {% endblock %}
Tanggal & Ref Tipe Transaksi Kuantitas Transaksi