From 4b1aabea9ce90d09e728030a60c0e51055fe49b1 Mon Sep 17 00:00:00 2001 From: Edwin Eames Date: Tue, 4 Feb 2025 18:22:14 -0500 Subject: [PATCH] added auto info to ticket --- src/pages/ticket/ticket.vue | 15 ++++- src/pages/ticket/ticketauto.vue | 107 +++++++++++++++++--------------- 2 files changed, 70 insertions(+), 52 deletions(-) diff --git a/src/pages/ticket/ticket.vue b/src/pages/ticket/ticket.vue index c7ff8af..d4b9bac 100644 --- a/src/pages/ticket/ticket.vue +++ b/src/pages/ticket/ticket.vue @@ -3,6 +3,8 @@
+ +
#2
@@ -12,6 +14,8 @@
{{ customer.customer_phone_number }}
+ +
{{ customer.customer_first_name }} {{ customer.customer_last_name }} @@ -30,8 +34,9 @@
-
+ +
{{ customer_description.description }}
@@ -62,6 +67,8 @@
+ +
Auburn Oil
@@ -90,6 +97,11 @@
+ + + + +
@@ -341,6 +353,7 @@ export default defineComponent({ }).then((response: any) => { this.customer = response.data this.getPastDeliveries1(this.customer.id) + this.getPastDeliveries2(this.customer.id) this.getCustomerDescription(this.customer.id) this.getCustomerTank(this.customer.id) diff --git a/src/pages/ticket/ticketauto.vue b/src/pages/ticket/ticketauto.vue index c55eeb4..b949bbf 100644 --- a/src/pages/ticket/ticketauto.vue +++ b/src/pages/ticket/ticketauto.vue @@ -3,20 +3,23 @@
+
#2
-
-
-
{{ customer.customer_phone_number }}
+
{{ customer_tank.tank_size }}
+
{{ customer_description.fill_location }}
+
{{ customer.customer_phone_number }}
-
{{ customer.customer_first_name }} {{ customer.customer_last_name }} +
+ {{ customer.customer_first_name }} {{ customer.customer_last_name }}
{{ customer.account_number }}
{{ customer.customer_address }}
+
{{ customer.customer_apt }}
{{ customer.customer_town }}
@@ -28,19 +31,14 @@
-
+
{{ customer_description.description }}
-
- -
Credit Card
- - -
Fill
+
AUTO
@@ -51,6 +49,9 @@
+ + +
Auburn Oil
@@ -67,11 +68,11 @@
508 426 8800
-
-
-
- {{ past_delivery.when_delivered }} - {{ past_delivery.gallons_delivered }} -
+
+
+ + {{ past_delivery.fill_date }} - {{ past_delivery.gallons_delivered }} +
@@ -79,6 +80,11 @@
+ + + + +
@@ -91,19 +97,10 @@
-
{{ delivery.expected_delivery_date }}
- -
- AUTO -
- - +
+
{{todays_price }}
- -
- -
@@ -140,18 +137,13 @@ export default defineComponent({ user: { user_id: 0, }, - past_deliveries1: [ + past_deliveries: [ { gallons_delivered: 0, - when_delivered: '', - } - ], - past_deliveries2: [ - { - gallons_delivered: 0, - when_delivered: '', + fill_date: '', } ], + delivery: { id: '', customer_id: 0, @@ -184,6 +176,13 @@ export default defineComponent({ driver_last_name: '', promo_id: 0, }, + customer_tank: { + id: 0, + last_tank_inspection: null, + tank_status: false, + outside_or_inside: false, + tank_size: 0, + }, customer: { id: 0, user_id: 0, @@ -239,7 +238,7 @@ export default defineComponent({ .then((response: any) => { this.delivery = response.data; this.getCustomer(this.delivery.customer_id) - + }) .catch(() => { @@ -250,6 +249,17 @@ export default defineComponent({ }); }); }, + getCustomerTank(userid: any) { + let path = import.meta.env.VITE_BASE_URL + '/customer/tank/' + userid; + axios({ + method: 'get', + url: path, + headers: authHeader(), + }).then((response: any) => { + this.customer_tank = response.data + + }) + }, getCustomerDescription(userid: any) { let path = import.meta.env.VITE_BASE_URL + '/customer/description/' + userid; axios({ @@ -293,33 +303,28 @@ export default defineComponent({ headers: authHeader(), }).then((response: any) => { this.customer = response.data - this.getPastDeliveries1(this.customer.id) - this.getPastDeliveries2(this.customer.id) + this.getPastDeliveriesAuto(this.customer.id) this.getCustomerDescription(this.customer.id) + + + + this.getCustomerDescription(this.customer.id) + this.getCustomerTank(this.customer.id) }) }, - getPastDeliveries1(userid: any) { - let path = import.meta.env.VITE_BASE_URL + '/delivery/past1/' + userid; + getPastDeliveriesAuto(userid: any) { + let path = import.meta.env.VITE_BASE_URL + '/delivery/auto/' + userid; axios({ method: 'get', url: path, headers: authHeader(), }).then((response: any) => { - this.past_deliveries1 = response.data - }) - }, - getPastDeliveries2(userid: any) { - let path = import.meta.env.VITE_BASE_URL + '/delivery/past2/' + userid; - axios({ - method: 'get', - url: path, - headers: authHeader(), - }).then((response: any) => { - this.past_deliveries2 = response.data + this.past_deliveries = response.data }) }, + }, })