brankaslist
This commit is contained in:
parent
7b1fdc30f6
commit
73134f3fd6
@ -17,7 +17,7 @@
|
||||
/>
|
||||
<div>
|
||||
<p class="font-semibold">{{ item.produk.nama }}</p>
|
||||
<p class="text-sm text-gray-500">ID: {{ item.produk.id }}</p>
|
||||
<p class="text-sm text-gray-500">ID: {{ item.id }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
v-model="selectedTrayId"
|
||||
class="w-full rounded-md border shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
||||
>
|
||||
|
||||
<option value="" disabled>Brankas</option>
|
||||
<option v-for="tray in trays" :key="tray.id" :value="tray.id">
|
||||
{{ tray.nama }}
|
||||
</option>
|
||||
@ -123,7 +123,14 @@ const qrCodeUrl = computed(() => {
|
||||
// --- fungsi modal
|
||||
const openMovePopup = (item) => {
|
||||
selectedItem.value = item;
|
||||
if (item.id_nampan) {
|
||||
// ✅ sudah ada di nampan tertentu
|
||||
selectedTrayId.value = item.id_nampan;
|
||||
} else {
|
||||
// 🗄️ kalau belum ada, default ke "Brankas"
|
||||
const brankas = trays.value.find(t => t.nama.toLowerCase() === "brankas");
|
||||
selectedTrayId.value = brankas ? brankas.id : "";
|
||||
}
|
||||
isPopupVisible.value = true;
|
||||
};
|
||||
const closePopup = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user