diff --git a/resources/js/components/StrukOverlay.vue b/resources/js/components/StrukOverlay.vue index ac66435..02203c2 100644 --- a/resources/js/components/StrukOverlay.vue +++ b/resources/js/components/StrukOverlay.vue @@ -64,18 +64,23 @@ - + + 1 - + - {{ item.produk?.nama || '' }} + {{ item.produk?.nama || '' }} {{ item.produk.nama ? (item.nampan?.nama || 'Brankas') : '' }} @@ -240,6 +245,32 @@ const grandTotal = computed(() => { return props.total + (ongkosBikin.value || 0) }) +// Fungsi untuk menentukan style row berdasarkan jumlah item +const getRowStyle = () => { + if (props.pesanan.length === 1) { + return { height: '126px' } // 2x lipat dari tinggi normal (48px) + } + return { height: '63px' } // Tinggi normal +} + + + +// Fungsi untuk menentukan class gambar berdasarkan jumlah item +const getImageClass = () => { + if (props.pesanan.length === 1) { + return 'w-25 h-25' // 2x lipat dari ukuran normal (w-10 h-10) + } + return 'w-12 h-12' // Ukuran normal +} + +// Fungsi untuk menentukan class text berdasarkan jumlah item +const getTextClass = () => { + if (props.pesanan.length === 1) { + return 'text-lg font-medium' // Text lebih besar untuk single item + } + return 'text-sm' // Text normal +} + const getCurrentDate = () => { const days = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'] const months = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'] @@ -354,14 +385,6 @@ onMounted(() => { } }) -const pesananMinimal = computed(() => { - const arr = [...props.pesanan] - while (arr.length < 2) { - arr.push({ produk: {}, harga_deal: 0, posisi: '' }) - } - return arr -}) - function formatInput(e) { let value = e.target.value.replace(/\D/g, ""); ongkosBikin.value = value ? parseInt(value, 10) : null; diff --git a/resources/js/components/StrukView.vue b/resources/js/components/StrukView.vue index 34e8f81..0134c61 100644 --- a/resources/js/components/StrukView.vue +++ b/resources/js/components/StrukView.vue @@ -1,7 +1,9 @@