|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+<script setup>
|
|
|
2
|
+import { detailTable } from './config'
|
|
|
3
|
+import AppButtonLink from '@/components/AppButtonLink.vue'
|
|
|
4
|
+import DashboardLayout from '@/layouts/Dashboard/DashboardLayout.vue'
|
|
|
5
|
+
|
|
|
6
|
+defineProps({
|
|
|
7
|
+ customer: Object,
|
|
|
8
|
+ historyPurchase: Object,
|
|
|
9
|
+})
|
|
|
10
|
+</script>
|
|
|
11
|
+
|
|
|
12
|
+<template>
|
|
|
13
|
+ <DashboardLayout title="">
|
|
|
14
|
+ <div class="grid">
|
|
|
15
|
+ <div class="col-12">
|
|
|
16
|
+ <Card>
|
|
|
17
|
+ <template #title>
|
|
|
18
|
+ <h2 class="text-2xl font-bold">History Pembelian</h2>
|
|
|
19
|
+ </template>
|
|
|
20
|
+ <template #content>
|
|
|
21
|
+ <div class="grid">
|
|
|
22
|
+ <div class="col-12">
|
|
|
23
|
+ <div class="grid">
|
|
|
24
|
+ <div class="col">
|
|
|
25
|
+ <h3 class="text-base">Nama</h3>
|
|
|
26
|
+ <span>{{ customer.name }}</span>
|
|
|
27
|
+ </div>
|
|
|
28
|
+ <div class="col">
|
|
|
29
|
+ <h3 class="text-base">Alamat</h3>
|
|
|
30
|
+ <span>{{ customer.address }}</span>
|
|
|
31
|
+ </div>
|
|
|
32
|
+ <div class="col">
|
|
|
33
|
+ <h3 class="text-base">No HP</h3>
|
|
|
34
|
+ <span>{{ customer.phone }}</span>
|
|
|
35
|
+ </div>
|
|
|
36
|
+ <div class="col">
|
|
|
37
|
+ <h3 class="text-base">NPWP</h3>
|
|
|
38
|
+ <span>{{ customer.npwp }}</span>
|
|
|
39
|
+ </div>
|
|
|
40
|
+ </div>
|
|
|
41
|
+ </div>
|
|
|
42
|
+ </div>
|
|
|
43
|
+ </template>
|
|
|
44
|
+ </Card>
|
|
|
45
|
+ </div>
|
|
|
46
|
+
|
|
|
47
|
+ <div class="col-12">
|
|
|
48
|
+ <DataTable
|
|
|
49
|
+ responsiveLayout="scroll"
|
|
|
50
|
+ columnResizeMode="expand"
|
|
|
51
|
+ :value="historyPurchase.data"
|
|
|
52
|
+ :rowHover="true"
|
|
|
53
|
+ :stripedRows="true"
|
|
|
54
|
+ @row-click="detail($event.data)"
|
|
|
55
|
+ >
|
|
|
56
|
+ <Column
|
|
|
57
|
+ v-for="value in detailTable"
|
|
|
58
|
+ :key="value.field"
|
|
|
59
|
+ :field="value.field"
|
|
|
60
|
+ :header="value.header"
|
|
|
61
|
+ />
|
|
|
62
|
+
|
|
|
63
|
+ <Column>
|
|
|
64
|
+ <template #body="{ data }">
|
|
|
65
|
+ <AppButtonLink
|
|
|
66
|
+ icon="pi pi-eye"
|
|
|
67
|
+ class="p-button-icon-only p-button-rounded p-button-text"
|
|
|
68
|
+ v-tooltip.bottom="'Lihat Detail Penjualan'"
|
|
|
69
|
+ :href="route('sales.show', data.id)"
|
|
|
70
|
+ />
|
|
|
71
|
+ </template>
|
|
|
72
|
+ </Column>
|
|
|
73
|
+ </DataTable>
|
|
|
74
|
+ </div>
|
|
|
75
|
+ </div>
|
|
|
76
|
+ </DashboardLayout>
|
|
|
77
|
+</template>
|