diff --git a/resources/js/components/BrankasList.vue b/resources/js/components/BrankasList.vue
index 552c4c1..c90ca9a 100644
--- a/resources/js/components/BrankasList.vue
+++ b/resources/js/components/BrankasList.vue
@@ -17,7 +17,7 @@
/>
{{ item.produk.nama }}
-
ID: {{ item.produk.id }}
+
ID: {{ item.id }}
@@ -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"
>
-
+
@@ -123,7 +123,14 @@ const qrCodeUrl = computed(() => {
// --- fungsi modal
const openMovePopup = (item) => {
selectedItem.value = item;
- selectedTrayId.value = item.id_nampan;
+ 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 = () => {