[Update] Minor bug pas presentasi
This commit is contained in:
parent
3bdf9001c4
commit
d8a8622cb5
@ -341,7 +341,7 @@ const fetchData = async (page = 1) => {
|
||||
|
||||
let queryParams = `tanggal=${tanggalDipilih.value}&page=${page}`;
|
||||
if (salesDipilih.value != 0 ) queryParams += `&sales_id=${salesDipilih.value}`;
|
||||
if (nampanDipilih.value != 0) queryParams += `&produk_id=${produkDipilih.value}`;
|
||||
if (nampanDipilih.value != 0) queryParams += `&nampan_id=${nampanDipilih.value}`;
|
||||
if (namaPembeli.value) queryParams += `&nama_pembeli=${encodeURIComponent(namaPembeli.value)}`;
|
||||
|
||||
try {
|
||||
|
||||
@ -13,9 +13,9 @@ const baseItems = [
|
||||
{
|
||||
label: "Manajemen Produk",
|
||||
subItems: [
|
||||
{ label: "Brankas", route: "/brankas" },
|
||||
{ label: "Nampan", route: "/nampan" },
|
||||
{ label: "Produk", route: "/produk" },
|
||||
{ label: "Nampan", route: "/nampan" },
|
||||
{ label: "Brankas", route: "/brankas" },
|
||||
{ label: "Kategori", route: "/kategori" },
|
||||
{ label: "Sales", route: "/sales" },
|
||||
]
|
||||
|
||||
@ -54,15 +54,15 @@
|
||||
class="flex justify-between items-center border border-C rounded-lg p-2 cursor-pointer hover:bg-gray-50"
|
||||
@click="openMovePopup(item)">
|
||||
<div class="flex items-center gap-3">
|
||||
<img v-if="item.produk.foto && item.produk.foto.length > 0" :src="item.produk.foto[0].url"
|
||||
<img v-if="item.produk?.foto && item.produk?.foto.length > 0" :src="item.produk?.foto[0].url"
|
||||
alt="foto produk" class="size-12 object-cover rounded" />
|
||||
<div class="text-D">
|
||||
<p class="text-sm">{{ item.produk.nama }}</p>
|
||||
<p class="text-sm">{{ item.produk?.nama }}</p>
|
||||
<p class="text-sm font-medium">{{ item.kode_item }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="font-medium">{{ item.produk.berat }}g</span>
|
||||
<span class="font-medium">{{ item.produk?.berat }}g</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -296,7 +296,7 @@ const saveMove = async () => {
|
||||
// Hitung total berat
|
||||
const totalWeight = (tray) => {
|
||||
if (!tray.items) return 0;
|
||||
const total = tray.items.reduce((sum, item) => sum + (item.produk.berat || 0), 0);
|
||||
const total = tray.items.reduce((sum, item) => sum + (item.produk?.berat || 0), 0);
|
||||
return total.toFixed(2);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user