Added delivery notes. changed waiting/pending

This commit is contained in:
2024-10-30 17:04:41 -04:00
parent cae64eec86
commit b62d45da5d
24 changed files with 519 additions and 179 deletions

View File

@@ -61,6 +61,17 @@
<router-link :to="{ name: 'deliveryIssue' }">
<div class=" hover:underline py-1">Issue Tickets</div>
</router-link>
<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="text-orange-600"> ({{ pending_count }})</div>
</div>
</div>
<div class=" hover:underline py-1" v-else>Pending Payment </div>
</router-link>
<router-link :to="{ name: 'deliveryFinalized' }">
<div class=" hover:underline py-1">Finalized Tickets</div>
</router-link>
@@ -107,16 +118,30 @@ export default defineComponent({
this.getTodayCount();
this.getTommorrowCount();
this.getWaitingCount();
this.getPendingCount();
this.updatestatus();
},
data() {
return {
waiting_count: 0,
today_count: 0,
tommorrow_count: 0,
pending_count: 0,
};
},
methods: {
updatestatus() {
let path = import.meta.env.VITE_BASE_URL + '/delivery/updatestatus';
axios({
method: 'get',
url: path,
headers: authHeader(),
}).then((response: any) => {
if (response.data.update)
console.log("ok")
})
},
getTodayCount() {
let path = import.meta.env.VITE_BASE_URL + '/deliverystatus/count/today';
axios({
@@ -139,6 +164,17 @@ export default defineComponent({
})
},
getPendingCount() {
let path = import.meta.env.VITE_BASE_URL + '/deliverystatus/count/pending';
axios({
method: 'get',
url: path,
headers: authHeader(),
}).then((response: any) => {
this.pending_count = response.data.count
})
},
getWaitingCount() {
let path = import.meta.env.VITE_BASE_URL + '/deliverystatus/count/waiting';
axios({