style: position Kembali button on bottom row full-width on mobile for 3-button headers
This commit is contained in:
@@ -12,14 +12,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="text-sm text-gray-500 mt-1">Kode: <strong>{{ asset.asset_code }}</strong> · Total: <strong>{{ asset.qty }} {{ asset.uom }}</strong></p>
|
<p class="text-sm text-gray-500 mt-1">Kode: <strong>{{ asset.asset_code }}</strong> · Total: <strong>{{ asset.qty }} {{ asset.uom }}</strong></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap sm:flex-nowrap items-center gap-3 w-full sm:w-auto">
|
<div class="flex flex-wrap sm:flex-nowrap items-center gap-2.5 sm:gap-3 w-full sm:w-auto">
|
||||||
<a href="{% url 'asset_list' %}" class="bg-white border border-gray-200 rounded-xl shadow-sm px-4 py-2 text-sm font-bold text-gray-700 hover:bg-gray-50 hover:text-kerinci transition-colors flex items-center space-x-2 justify-center text-center w-full sm:w-auto flex-1 sm:flex-none">
|
<!-- Tombol Kembali: Desktop paling kiri (sm:order-1), Mobile di bawah (order-3 w-full) -->
|
||||||
|
<a href="{% url 'asset_list' %}" class="order-3 sm:order-1 bg-white border border-gray-200 rounded-xl shadow-sm px-4 py-2 text-sm font-bold text-gray-700 hover:bg-gray-50 hover:text-kerinci transition-colors flex items-center space-x-2 justify-center text-center w-full sm:w-auto flex-none">
|
||||||
<svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
|
<svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
|
||||||
<span>Kembali</span>
|
<span>Kembali</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="relative inline-block w-full sm:w-auto flex-1 sm:flex-none">
|
<!-- Fitur Ekspor: Desktop tengah (sm:order-2), Mobile baris atas kiri (order-1 flex-1) -->
|
||||||
<button onclick="var d = document.getElementById('exportMenuUnits'); d.style.display = d.style.display === 'block' ? 'none' : 'block'; event.stopPropagation();" class="w-full border border-kerinci text-kerinci rounded-xl px-4 py-2 text-sm font-bold hover:bg-kerinci/10 transition-colors flex items-center space-x-2 justify-center">
|
<div class="order-1 sm:order-2 relative inline-block flex-1 sm:flex-none w-auto">
|
||||||
|
<button onclick="var d = document.getElementById('exportMenuUnits'); d.style.display = d.style.display === 'block' ? 'none' : 'block'; event.stopPropagation();" class="w-full border border-kerinci text-kerinci rounded-xl px-4 py-2 text-sm font-bold hover:bg-kerinci/10 transition-colors flex items-center space-x-2 justify-center whitespace-nowrap">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg>
|
||||||
<span>Ekspor Data</span>
|
<span>Ekspor Data</span>
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
|
||||||
@@ -37,7 +39,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button onclick="openAddUnitModal()" class="bg-kerinci text-white border border-kerinci rounded-xl shadow-sm px-4 py-2 text-sm font-bold hover:bg-kerinci/90 transition-colors flex items-center justify-center space-x-2 w-full sm:w-auto flex-1 sm:flex-none">
|
<!-- Tombol Tambah Unit: Desktop paling kanan (sm:order-3), Mobile baris atas kanan (order-2 flex-1) -->
|
||||||
|
<button onclick="openAddUnitModal()" class="order-2 sm:order-3 bg-kerinci text-white border border-kerinci rounded-xl shadow-sm px-4 py-2 text-sm font-bold hover:bg-kerinci/90 transition-colors flex items-center justify-center space-x-2 flex-1 sm:flex-none whitespace-nowrap">
|
||||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
|
||||||
<span>Tambah Unit</span>
|
<span>Tambah Unit</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -38,21 +38,23 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Kanan: Action Buttons Rapih & Teratur (Tidak Menumpuk) -->
|
<!-- Kanan: Action Buttons Rapih & Teratur (Tidak Menumpuk) -->
|
||||||
<div class="flex items-center gap-2 shrink-0 self-start">
|
<div class="flex flex-wrap sm:flex-nowrap items-center gap-2.5 sm:gap-3 w-full sm:w-auto shrink-0 self-start">
|
||||||
<a href="{% url 'consumable_list' %}" class="bg-white border border-gray-200 rounded-xl shadow-sm px-4 py-2 text-sm font-bold text-gray-700 hover:bg-gray-50 hover:text-kerinci transition-colors flex items-center space-x-2 justify-center">
|
<!-- Tombol Kembali: Desktop paling kiri (sm:order-1), Mobile di bawah (order-3 w-full) -->
|
||||||
|
<a href="{% url 'consumable_list' %}" class="order-3 sm:order-1 bg-white border border-gray-200 rounded-xl shadow-sm px-4 py-2 text-sm font-bold text-gray-700 hover:bg-gray-50 hover:text-kerinci transition-colors flex items-center space-x-2 justify-center w-full sm:w-auto flex-none">
|
||||||
<svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
|
<svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
|
||||||
<span>Kembali</span>
|
<span>Kembali</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if not is_read_only %}
|
{% if not is_read_only %}
|
||||||
<button onclick="openModalEditItem()" class="bg-white border border-gray-200 rounded-xl shadow-sm px-4 py-2 text-sm font-bold text-gray-700 hover:bg-gray-50 transition-colors flex items-center space-x-2 justify-center">
|
<!-- Tombol Edit Item: Desktop tengah (sm:order-2), Mobile baris atas kiri (order-1 flex-1) -->
|
||||||
|
<button onclick="openModalEditItem()" class="order-1 sm:order-2 bg-white border border-gray-200 rounded-xl shadow-sm px-4 py-2 text-sm font-bold text-gray-700 hover:bg-gray-50 transition-colors flex items-center space-x-2 justify-center flex-1 sm:flex-none whitespace-nowrap">
|
||||||
<svg class="w-4 h-4 text-amber-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg>
|
<svg class="w-4 h-4 text-amber-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg>
|
||||||
<span>Edit Item</span>
|
<span>Edit Item</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Dropdown Transaksi Stok -->
|
<!-- Dropdown Transaksi Stok: Desktop kanan (sm:order-3), Mobile baris atas kanan (order-2 flex-1) -->
|
||||||
<div class="relative inline-block" id="trxDropdownContainer">
|
<div class="order-2 sm:order-3 relative inline-block flex-1 sm:flex-none w-auto" id="trxDropdownContainer">
|
||||||
<button onclick="var d = document.getElementById('trxActionDropdown'); d.style.display = d.style.display === 'block' ? 'none' : 'block'; event.stopPropagation();" class="bg-kerinci hover:bg-kerinci/90 text-white rounded-xl shadow-sm px-4 py-2 text-sm font-bold transition-all flex items-center space-x-2 justify-center">
|
<button onclick="var d = document.getElementById('trxActionDropdown'); d.style.display = d.style.display === 'block' ? 'none' : 'block'; event.stopPropagation();" class="w-full bg-kerinci hover:bg-kerinci/90 text-white rounded-xl shadow-sm px-4 py-2 text-sm font-bold transition-all flex items-center space-x-2 justify-center whitespace-nowrap">
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"></path></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"></path></svg>
|
||||||
<span>Transaksi Stok</span>
|
<span>Transaksi Stok</span>
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
|
||||||
|
|||||||
Reference in New Issue
Block a user