updated customer profile. added maps

This commit is contained in:
2024-11-20 18:00:17 -05:00
parent b62d45da5d
commit bf49bf5711
19 changed files with 1157 additions and 313 deletions

View File

@@ -23,7 +23,7 @@
<router-link :to="{ name: 'customer' }">
<div class=" hover:underline py-1">All Customers</div>
</router-link>
</li>
<div class="font-bold text-lg text-gray-500 pt-5">Delivery</div>
<li class="text-white">
@@ -64,11 +64,11 @@
<router-link :to="{ name: 'deliveryPending' }">
<div class=" hover:underline py-1" v-if="pending_count > 0">
<div class="flex gap-5">
<div class="">Pending Payment </div>
<div class="">Pending Payment </div>
<div class="text-orange-600"> ({{ pending_count }})</div>
</div>
</div>
<div class=" hover:underline py-1" v-else>Pending Payment </div>
<div class=" hover:underline py-1" v-else>Pending Payment </div>
</router-link>
@@ -76,12 +76,26 @@
<div class=" hover:underline py-1">Finalized Tickets</div>
</router-link>
</li>
<div class="font-bold text-lg text-gray-500 pt-5">Automatics</div>
<li class="text-white">
<router-link :to="{ name: 'auto' }">
<div class=" hover:underline py-1">Automatics</div>
<div class=" hover:underline py-1" v-if="automatic_count > 0">
<div class="flex gap-5">
<div class="">Automatics </div>
<div class="text-orange-600"> ({{ automatic_count }})</div>
</div>
</div>
<div class=" hover:underline py-1" v-else>Automatics </div>
</router-link>
</li>
<div class="font-bold text-lg text-gray-500 pt-5">Employees</div>
<li class="text-white">
<router-link :to="{ name: 'employee' }">
@@ -119,7 +133,10 @@ export default defineComponent({
this.getTommorrowCount();
this.getWaitingCount();
this.getPendingCount();
this.getAutoCount();
this.updatestatus();
this.updateautos();
this.updatetemp();
},
data() {
return {
@@ -127,6 +144,7 @@ export default defineComponent({
today_count: 0,
tommorrow_count: 0,
pending_count: 0,
automatic_count: 0,
};
},
@@ -139,7 +157,39 @@ export default defineComponent({
headers: authHeader(),
}).then((response: any) => {
if (response.data.update)
console.log("ok")
console.log("Updated Status of Deliveries")
})
},
updatetemp() {
let path = import.meta.env.VITE_AUTO_URL + '/main/temp';
axios({
method: 'get',
url: path,
headers: authHeader(),
}).then((response: any) => {
if (response.data.ok)
console.log("Updated Temp")
})
},
updateautos() {
let path = import.meta.env.VITE_AUTO_URL + '/main/update';
axios({
method: 'get',
url: path,
headers: authHeader(),
}).then((response: any) => {
if (response.data.ok)
console.log("Updated Autos")
})
},
getAutoCount() {
let path = import.meta.env.VITE_BASE_URL + '/deliverystatus/count/automatic';
axios({
method: 'get',
url: path,
headers: authHeader(),
}).then((response: any) => {
this.automatic_count = response.data.count
})
},
getTodayCount() {