major update
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
<template>
|
||||
<section>
|
||||
<section >
|
||||
|
||||
<div v-for="user in customers" :key="user.id">
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: user['id'] } }">
|
||||
<div class="grid grid-cols-12 bg-neutral pb-5 hover:bg-accent">
|
||||
<router-link :to="{ name: 'customerProfile', params: { id: user['id'] } }">
|
||||
<div class="grid grid-cols-12 bg-neutral pb-5 hover:bg-accent ">
|
||||
<div class="col-span-12"> {{ user['customer_first_name'] }} {{ user['customer_last_name'] }}</div>
|
||||
<div class="col-span-12">
|
||||
{{ user['customer_address'] }} {{ user['customer_town'] }} {{user.state}}
|
||||
</div>
|
||||
<div class="col-span-12"> {{user['customer_phone_number']}}</div>
|
||||
|
||||
<div class="col-span-12"> {{user['account_number']}}</div>
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
@@ -30,4 +32,5 @@ export default defineComponent({
|
||||
props: ["customers"],
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- <button class="btn btn-green btn-sm" @click.prevent="increaseCall()">Call</button> -->
|
||||
|
||||
<router-link :to="{ name: 'customerCreate' }">
|
||||
<button class="btn btn-accent btn-sm">Create Customer</button>
|
||||
<button class="btn bg-blue-700 btn-sm">Create Customer</button>
|
||||
</router-link>
|
||||
|
||||
<div v-if="employee.id">
|
||||
@@ -119,8 +119,12 @@ export default defineComponent({
|
||||
this.type_of_search = 1
|
||||
} else if (this.searchTerm.startsWith("#")) {
|
||||
this.type_of_search = 2
|
||||
|
||||
}else if (this.searchTerm.startsWith("$")) {
|
||||
this.type_of_search = 3
|
||||
|
||||
} else {
|
||||
this.type_of_search = 2
|
||||
this.type_of_search = 0
|
||||
}
|
||||
|
||||
const searchUrl = this.getSearchUrl();
|
||||
@@ -153,6 +157,14 @@ export default defineComponent({
|
||||
const searchParams = new URLSearchParams(params);
|
||||
return `${url}?${searchParams}`;
|
||||
}
|
||||
else if (this.type_of_search == 3) {
|
||||
const url = import.meta.env.VITE_BASE_URL +"/search/customer";
|
||||
const params = {
|
||||
q: this.searchTerm,
|
||||
};
|
||||
const searchParams = new URLSearchParams(params);
|
||||
return `${url}?${searchParams}`;
|
||||
}
|
||||
else {
|
||||
const url = import.meta.env.VITE_BASE_URL +"/search/customer";
|
||||
const params = {
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
<router-link :to="{ name: 'promo' }">
|
||||
<div class=" hover:underline py-1">Promos</div>
|
||||
</router-link>
|
||||
<router-link :to="{ name: 'MoneyYear' }">
|
||||
<div class=" hover:underline py-1">Money</div>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user