|
@@ -0,0 +1,171 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="order-details p-3">
|
|
3
|
+ <div class="d-flex gap-2 align-items-baseline mb-3">
|
|
4
|
+ <h5 class="mb-0">Order Details</h5>
|
|
5
|
+ <span>#3948</span>
|
|
6
|
+ </div>
|
|
7
|
+ <div class="mb-2">
|
|
8
|
+ <div class="input-group input-group-sm">
|
|
9
|
+ <span class="input-group-text" id="basic-addon1">Customer</span>
|
|
10
|
+ <input type="text" class="form-control" placeholder="name" v-model="order.customer">
|
|
11
|
+ </div>
|
|
12
|
+ </div>
|
|
13
|
+ <div>
|
|
14
|
+ <div class="input-group input-group-sm">
|
|
15
|
+ <span class="input-group-text" id="basic-addon1">Type</span>
|
|
16
|
+ <select class="form-select form-select-sm" v-model="order.type">
|
|
17
|
+ <option value="Dine in" selected>Dine in</option>
|
|
18
|
+ <option value="Take away">Take away</option>
|
|
19
|
+ </select>
|
|
20
|
+ </div>
|
|
21
|
+ </div>
|
|
22
|
+ <div class="row mt-4">
|
|
23
|
+ <div class="col">
|
|
24
|
+ <div class="total-items">Total items:</div>
|
|
25
|
+ </div>
|
|
26
|
+ <div class="col text-end">
|
|
27
|
+ <button class="btn btn-sm btn-outline-red btn-remove">Remove all</button>
|
|
28
|
+ </div>
|
|
29
|
+ </div>
|
|
30
|
+ <div class="order-list mt-3">
|
|
31
|
+ <CartItem />
|
|
32
|
+ <CartItem />
|
|
33
|
+ <CartItem />
|
|
34
|
+ <CartItem />
|
|
35
|
+ </div>
|
|
36
|
+ <div class="total-payment px-3 py-2 mt-3">
|
|
37
|
+ <div class="row">
|
|
38
|
+ <div class="col">Subtotal</div>
|
|
39
|
+ <div class="col text-end fw-medium">Rp68.000</div>
|
|
40
|
+ </div>
|
|
41
|
+ <div class="row">
|
|
42
|
+ <div class="col">Tax</div>
|
|
43
|
+ <div class="col text-end fw-medium">Rp3.400</div>
|
|
44
|
+ </div>
|
|
45
|
+ <hr>
|
|
46
|
+ <div class="row text-dark-purple fw-bold">
|
|
47
|
+ <div class="col">Total</div>
|
|
48
|
+ <div class="col text-end">Rp71.400</div>
|
|
49
|
+ </div>
|
|
50
|
+ </div>
|
|
51
|
+ <div class="payment-methods row">
|
|
52
|
+ <div v-for="payment in paymentOption" :key="payment.id" class="col"
|
|
53
|
+ :class="{ selected: order.paymentMethod === payment.name }" @click="order.paymentMethod = payment.name">
|
|
54
|
+ <div class="d-flex gap-2 align-items-center justify-content-center">
|
|
55
|
+ <Icon :icon="payment.icon" width="24"></Icon>
|
|
56
|
+ <span>{{ payment.name }}</span>
|
|
57
|
+ </div>
|
|
58
|
+ </div>
|
|
59
|
+ </div>
|
|
60
|
+ <button class="btn btn-checkout text-white w-100 fw-bold">Process order</button>
|
|
61
|
+ </div>
|
|
62
|
+</template>
|
|
63
|
+
|
|
64
|
+<script>
|
|
65
|
+import { Icon } from '@iconify/vue';
|
|
66
|
+import CartItem from '../components/CartItem.vue'
|
|
67
|
+
|
|
68
|
+export default {
|
|
69
|
+ name: 'OrderList',
|
|
70
|
+ components: {
|
|
71
|
+ Icon,
|
|
72
|
+ CartItem
|
|
73
|
+ },
|
|
74
|
+ data() {
|
|
75
|
+ return {
|
|
76
|
+ cart: [],
|
|
77
|
+ paymentOption: [
|
|
78
|
+ {
|
|
79
|
+ id: 1,
|
|
80
|
+ name: 'Cash',
|
|
81
|
+ icon: 'tabler:cash'
|
|
82
|
+ },
|
|
83
|
+ {
|
|
84
|
+ id: 2,
|
|
85
|
+ name: 'QRIS',
|
|
86
|
+ icon: 'heroicons:qr-code'
|
|
87
|
+ },
|
|
88
|
+ {
|
|
89
|
+ id: 3,
|
|
90
|
+ name: 'Card',
|
|
91
|
+ icon: 'ion:card-outline'
|
|
92
|
+ },
|
|
93
|
+ ],
|
|
94
|
+ order: {
|
|
95
|
+ customer: '',
|
|
96
|
+ type: 'Dine in',
|
|
97
|
+ items: [],
|
|
98
|
+ paymentMethod: 'Cash'
|
|
99
|
+ }
|
|
100
|
+ }
|
|
101
|
+ }
|
|
102
|
+}
|
|
103
|
+</script>
|
|
104
|
+
|
|
105
|
+<style lang="scss" scoped>
|
|
106
|
+.order-details {
|
|
107
|
+ border-radius: 6px;
|
|
108
|
+ background: #FFF;
|
|
109
|
+ box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
|
|
110
|
+}
|
|
111
|
+
|
|
112
|
+.total-items {
|
|
113
|
+ background: #ae7be8;
|
|
114
|
+ color: #fff;
|
|
115
|
+ border-radius: 12px;
|
|
116
|
+ font-size: 14px;
|
|
117
|
+ height: 100%;
|
|
118
|
+ display: flex;
|
|
119
|
+ justify-content: center;
|
|
120
|
+ align-items: center;
|
|
121
|
+ font-weight: 500;
|
|
122
|
+}
|
|
123
|
+
|
|
124
|
+.btn-remove {
|
|
125
|
+ border: none;
|
|
126
|
+
|
|
127
|
+ &:hover {
|
|
128
|
+ background: none;
|
|
129
|
+ color: inherit;
|
|
130
|
+ }
|
|
131
|
+}
|
|
132
|
+
|
|
133
|
+.order-list {
|
|
134
|
+ max-height: 156px;
|
|
135
|
+ overflow-y: auto;
|
|
136
|
+}
|
|
137
|
+
|
|
138
|
+.total-payment {
|
|
139
|
+ border-radius: 8px;
|
|
140
|
+ box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
|
|
141
|
+
|
|
142
|
+ hr {
|
|
143
|
+ border-style: dashed;
|
|
144
|
+ margin: 10px 0;
|
|
145
|
+ }
|
|
146
|
+}
|
|
147
|
+
|
|
148
|
+.payment-methods {
|
|
149
|
+ &.row {
|
|
150
|
+ margin: 16px 0 20px 0;
|
|
151
|
+ gap: 8px;
|
|
152
|
+ }
|
|
153
|
+
|
|
154
|
+ .col {
|
|
155
|
+ border-radius: 16px;
|
|
156
|
+ box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.25);
|
|
157
|
+ padding: 10px 0;
|
|
158
|
+ border: 1px solid transparent;
|
|
159
|
+
|
|
160
|
+ &.selected {
|
|
161
|
+ color: white;
|
|
162
|
+ background-color: #ae7be8;
|
|
163
|
+ border-color: #8751ab;
|
|
164
|
+ }
|
|
165
|
+ }
|
|
166
|
+}
|
|
167
|
+
|
|
168
|
+.btn-checkout {
|
|
169
|
+ background: linear-gradient(232deg, rgb(177, 122, 240) 0%, rgb(253, 164, 210));
|
|
170
|
+}
|
|
171
|
+</style>
|