|
@@ -70,7 +70,7 @@
|
|
|
|
|
|
|
|
<!-- Customer List -->
|
|
<!-- Customer List -->
|
|
|
<!-- <div style="flex: 1; overflow-y: auto;"> -->
|
|
<!-- <div style="flex: 1; overflow-y: auto;"> -->
|
|
|
- <div v-for="customer in filteredCustomers" :key="customer.id"
|
|
|
|
|
|
|
+ <div v-for="customer in customers" :key="customer.id"
|
|
|
class="customer-card"
|
|
class="customer-card"
|
|
|
@click="showCustomerDetail(customer)">
|
|
@click="showCustomerDetail(customer)">
|
|
|
<div class="customer-flag">{{ customer.flag }}</div>
|
|
<div class="customer-flag">{{ customer.flag }}</div>
|
|
@@ -380,21 +380,21 @@ const getRegion = (value) => {
|
|
|
// }
|
|
// }
|
|
|
// ])
|
|
// ])
|
|
|
|
|
|
|
|
-const filteredCustomers = computed(() => {
|
|
|
|
|
- let result = customers.value
|
|
|
|
|
- if (filterTab.value !== 'all') {
|
|
|
|
|
- result = result.filter(c => c.status === filterTab.value)
|
|
|
|
|
- }
|
|
|
|
|
- if (searchQuery.value) {
|
|
|
|
|
- const query = searchQuery.value.toLowerCase()
|
|
|
|
|
- result = result.filter(c =>
|
|
|
|
|
- c.name.toLowerCase().includes(query) ||
|
|
|
|
|
- c.contact.toLowerCase().includes(query) ||
|
|
|
|
|
- c.email?.toLowerCase().includes(query)
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
- return result
|
|
|
|
|
-})
|
|
|
|
|
|
|
+// const filteredCustomers = computed(() => {
|
|
|
|
|
+// let result = customers.value
|
|
|
|
|
+// if (filterTab.value !== 'all') {
|
|
|
|
|
+// result = result.filter(c => c.status === filterTab.value)
|
|
|
|
|
+// }
|
|
|
|
|
+// if (searchQuery.value) {
|
|
|
|
|
+// const query = searchQuery.value.toLowerCase()
|
|
|
|
|
+// result = result.filter(c =>
|
|
|
|
|
+// c.name.toLowerCase().includes(query) ||
|
|
|
|
|
+// c.contact.toLowerCase().includes(query) ||
|
|
|
|
|
+// c.email?.toLowerCase().includes(query)
|
|
|
|
|
+// )
|
|
|
|
|
+// }
|
|
|
|
|
+// return result
|
|
|
|
|
+// })
|
|
|
|
|
|
|
|
const formatNumber = (num) => num.toLocaleString()
|
|
const formatNumber = (num) => num.toLocaleString()
|
|
|
|
|
|