Kasir/resources/js/components/KasirTransaksiList.vue
2025-08-28 14:07:56 +07:00

34 lines
1.2 KiB
Vue

<template>
<h3 class="text-lg font-semibold mb-4 text-gray-800">Transaksi</h3>
<table class="w-full border-collapse border border-gray-200 text-sm">
<thead class="bg-gray-100">
<tr>
<th class="border border-gray-200 p-2">Tanggal</th>
<th class="border border-gray-200 p-2">Kode Transaksi</th>
<th class="border border-gray-200 p-2">Pendapatan</th>
<th class="border border-gray-200 p-2">Detail Item</th>
</tr>
</thead>
<tbody>
<tr v-for="trx in transaksi" :key="trx.id">
<td class="border border-gray-200 p-2">{{ trx.tanggal }}</td>
<td class="border border-gray-200 p-2">{{ trx.kode }}</td>
<td class="border border-gray-200 p-2">Rp{{ trx.pendapatan.toLocaleString() }}</td>
<td class="border border-gray-200 p-2 text-center">
<button @click="$emit('detail', trx)"
class="px-3 py-1 rounded-md bg-[#c6a77d] text-white hover:bg-[#b09065] transition">Detail</button>
</td>
</tr>
</tbody>
</table>
</template>
<script setup>
const props = defineProps({
transaksi: {
type: Array,
default: () => []
}
})
</script>