diff --git a/src/pages/delivery/viewstatus/todaysdeliveries.vue b/src/pages/delivery/viewstatus/todaysdeliveries.vue
index a39aa6d..4671001 100755
--- a/src/pages/delivery/viewstatus/todaysdeliveries.vue
+++ b/src/pages/delivery/viewstatus/todaysdeliveries.vue
@@ -25,6 +25,18 @@
+
+
+
+ Total: {{ grand_total }}
+
+
+
+ {{ total.town }}: {{ total.gallons }}
+
+
+
+
@@ -175,7 +187,9 @@ export default defineComponent({
return {
token: null,
user: null,
- deliveries: [] as any[],
+ deliveries: [] as any[],
+ totals: [] as any[],
+ grand_total: 0,
page: 1,
perPage: 50,
recordsLength: 0,
@@ -191,6 +205,7 @@ export default defineComponent({
},
mounted() {
this.getPage(this.page)
+ this.get_totals()
},
methods: {
getPage: function (page: any) {
@@ -230,6 +245,22 @@ export default defineComponent({
})
},
+ get_totals() {
+ let path = import.meta.env.VITE_BASE_URL + '/deliverystatus/today-totals';
+ axios({
+ method: 'get',
+ url: path,
+ headers: authHeader(),
+ }).then((response: any) => {
+ this.totals = response.data.totals || []
+ this.grand_total = response.data.grand_total || 0
+ }).catch((error: any) => {
+ console.error('Error fetching totals:', error);
+ this.totals = []
+ this.grand_total = 0
+ })
+ },
+
deleteCall(delivery_id: any) {
let path = import.meta.env.VITE_BASE_URL + '/delivery/delete/' + delivery_id;
axios({
diff --git a/src/pages/delivery/viewstatus/tommorrow.vue b/src/pages/delivery/viewstatus/tommorrow.vue
index ab719ad..6801da3 100644
--- a/src/pages/delivery/viewstatus/tommorrow.vue
+++ b/src/pages/delivery/viewstatus/tommorrow.vue
@@ -19,6 +19,18 @@
+
+
+
+ Total: {{ grand_total }}
+
+
+
+ {{ total.town }}: {{ total.gallons }}
+
+
+
+
@@ -168,7 +180,9 @@ export default defineComponent({
return {
token: null,
user: null,
- deliveries: [] as any[],
+ deliveries: [] as any[],
+ totals: [] as any[],
+ grand_total: 0,
page: 1,
perPage: 50,
recordsLength: 0,
@@ -184,6 +198,7 @@ export default defineComponent({
},
mounted() {
this.getPage(this.page)
+ this.get_totals()
},
methods: {
getPage: function (page: any) {
@@ -219,6 +234,22 @@ export default defineComponent({
})
},
+ get_totals() {
+ let path = import.meta.env.VITE_BASE_URL + '/deliverystatus/tomorrow-totals';
+ axios({
+ method: 'get',
+ url: path,
+ headers: authHeader(),
+ }).then((response: any) => {
+ this.totals = response.data.totals || []
+ this.grand_total = response.data.grand_total || 0
+ }).catch((error: any) => {
+ console.error('Error fetching totals:', error);
+ this.totals = []
+ this.grand_total = 0
+ })
+ },
+
deleteCall(delivery_id: any) {
let path = import.meta.env.VITE_BASE_URL + '/delivery/delete/' + delivery_id;
axios({
diff --git a/src/pages/delivery/viewstatus/waiting.vue b/src/pages/delivery/viewstatus/waiting.vue
index 0e4adf5..dad3325 100755
--- a/src/pages/delivery/viewstatus/waiting.vue
+++ b/src/pages/delivery/viewstatus/waiting.vue
@@ -19,6 +19,18 @@
+
+
+
+ Total: {{ grand_total }}
+
+
+
+ {{ total.town }}: {{ total.gallons }}
+
+
+
+
@@ -148,7 +160,9 @@ export default defineComponent({
return {
token: null,
user: null,
- deliveries: [] as any[],
+ deliveries: [] as any[],
+ totals: [] as any[],
+ grand_total: 0,
page: 1,
perPage: 50,
recordsLength: 0,
@@ -165,6 +179,7 @@ export default defineComponent({
},
mounted() {
this.getPage(this.page)
+ this.get_totals()
},
methods: {
getPage: function (page: any) {
@@ -200,6 +215,22 @@ export default defineComponent({
this.deliveries = response.data
})
},
+ get_totals() {
+ let path = import.meta.env.VITE_BASE_URL + '/deliverystatus/waiting-totals';
+ axios({
+ method: 'get',
+ url: path,
+ headers: authHeader(),
+ }).then((response: any) => {
+ this.totals = response.data.totals || []
+ this.grand_total = response.data.grand_total || 0
+ }).catch((error: any) => {
+ console.error('Error fetching totals:', error);
+ this.totals = []
+ this.grand_total = 0
+ })
+ },
+
deleteCall(delivery_id: any) {
let path = import.meta.env.VITE_BASE_URL + '/delivery/delete/' + delivery_id;
axios({
@@ -230,4 +261,4 @@ export default defineComponent({
})
-
\ No newline at end of file
+