瀏覽代碼

feat: breadcrumbs customer history purchase

Muhammad Iqbal Afandi 3 年之前
父節點
當前提交
8e45dc564f

+ 15
- 2
resources/js/pages/Customers/HistoryPurchase.vue 查看文件

@@ -1,4 +1,5 @@
1 1
 <script setup>
2
+import { Link } from '@inertiajs/inertia-vue3'
2 3
 import { useForm } from '@/composables/useForm'
3 4
 import { IDRCurrencyFormat } from '@/utils/helpers'
4 5
 import { cartTable } from './config'
@@ -25,6 +26,8 @@ const form = useForm({
25 26
 })
26 27
 
27 28
 const { cart, totalCartPrice } = useCart(form, props.saleDetail)
29
+
30
+const back = () => history.back()
28 31
 </script>
29 32
 
30 33
 <template>
@@ -96,7 +99,7 @@ const { cart, totalCartPrice } = useCart(form, props.saleDetail)
96 99
         </div>
97 100
       </div>
98 101
 
99
-      <div class="col-12 flex justify-content-end">
102
+      <div class="col-12 flex flex-column sm:flex-row justify-content-end">
100 103
         <AppButtonLink
101 104
           label="Cetak Invoice"
102 105
           icon="pi pi-print"
@@ -106,8 +109,18 @@ const { cart, totalCartPrice } = useCart(form, props.saleDetail)
106 109
         />
107 110
       </div>
108 111
 
109
-      <div class="col-12 flex justify-content-end">
112
+      <div
113
+        class="col-12 flex flex-column sm:flex-row justify-content-between gap-3"
114
+      >
115
+        <Button
116
+          label="Kembali ke history pembelian"
117
+          class="p-button-text flex-order-2 sm:flex-order-1"
118
+          icon="pi pi-angle-left"
119
+          @click="back"
120
+        />
121
+
110 122
         <AppButtonLink
123
+          class="flex-order-1 sm:flex-order-2"
111 124
           label="Cetak Delivery Order"
112 125
           icon="pi pi-print"
113 126
           target="_blank"

+ 7
- 7
resources/js/pages/Customers/Index.vue 查看文件

@@ -74,13 +74,6 @@ const onDelete = (data) => {
74 74
       <Column>
75 75
         <template #body="{ data }">
76 76
           <div class="grid gap-2">
77
-            <AppButtonLink
78
-              icon="pi pi-eye"
79
-              class="p-button-icon-only p-button-rounded p-button-text"
80
-              v-tooltip.bottom="'History Pembelian'"
81
-              :href="route('customers.show', data.id)"
82
-            />
83
-
84 77
             <AppButtonLink
85 78
               icon="pi pi-pencil"
86 79
               class="p-button-icon-only p-button-rounded p-button-text"
@@ -95,6 +88,13 @@ const onDelete = (data) => {
95 88
               v-tooltip.bottom="'Hapus Pelanggan'"
96 89
               @click="onDelete(data)"
97 90
             />
91
+
92
+            <AppButtonLink
93
+              icon="pi pi-chevron-right"
94
+              class="p-button-icon-only p-button-rounded p-button-text"
95
+              v-tooltip.bottom="'History Pembelian'"
96
+              :href="route('customers.show', data.id)"
97
+            />
98 98
           </div>
99 99
         </template>
100 100
       </Column>

+ 1
- 1
resources/js/pages/Customers/Show.vue 查看文件

@@ -113,7 +113,7 @@ const exportExcel = () => {
113 113
           <Column>
114 114
             <template #body="{ data }">
115 115
               <AppButtonLink
116
-                icon="pi pi-eye"
116
+                icon="pi pi-chevron-right"
117 117
                 class="p-button-icon-only p-button-rounded p-button-text"
118 118
                 v-tooltip.bottom="'Lihat Detail Penjualan'"
119 119
                 :href="route('customers.history-purchases', data.id)"

+ 1
- 1
resources/js/pages/Purchases/Index.vue 查看文件

@@ -64,7 +64,7 @@ defineProps({
64 64
 
65 65
           <AppButtonLink
66 66
             v-else
67
-            icon="pi pi-eye"
67
+            icon="pi pi-chevron-right"
68 68
             class="p-button-icon-only p-button-rounded p-button-text"
69 69
             v-tooltip.bottom="'Lihat Detail Pembelian'"
70 70
             :href="route('purchases.show', data.id)"

+ 1
- 1
resources/js/pages/Sales/Index.vue 查看文件

@@ -55,7 +55,7 @@ defineProps({
55 55
       <Column>
56 56
         <template #body="{ data }">
57 57
           <AppButtonLink
58
-            icon="pi pi-eye"
58
+            icon="pi pi-chevron-right"
59 59
             class="p-button-icon-only p-button-rounded p-button-text"
60 60
             v-tooltip.bottom="'Lihat Detail Penjualan'"
61 61
             :href="route('sales.show', data.id)"