+
| {{ oil['estimated_gallons_left'] }} |
- {{ oil['house_factor'] }} |
- {{ oil['customer_town'] }} |
+
{{ oil['customer_full_name'] }} |
+ {{ oil['customer_town'] }} |
{{ oil['customer_address'] }} |
{{ oil['last_fill'] }} |
+ {{ oil['house_factor'] }} |
-
+
@@ -127,17 +130,14 @@ export default defineComponent({
get_oil_orders() {
let path = import.meta.env.VITE_AUTO_URL + '/delivery/all/customers';
- console.log(path)
- console.log("woop")
axios({
method: 'get',
url: path,
withCredentials: true,
headers: authHeader(),
}).then((response: any) => {
- this.deliveries = response.data.automatics
- console.log("here")
- console.log(this.deliveries)
+ this.deliveries = response.data
+
})
},
},
diff --git a/src/pages/customer/edit.vue b/src/pages/customer/edit.vue
index cbe6977..8bb2759 100755
--- a/src/pages/customer/edit.vue
+++ b/src/pages/customer/edit.vue
@@ -132,13 +132,17 @@
-
+
+
+
-
+
+
+
+
-
@@ -197,7 +201,7 @@ export default defineComponent({
customer_apt: "",
customer_home_type: "",
customer_zip: "",
- customer_automatic: "",
+ customer_automatic: false,
customer_email: "",
customer_phone_number: "",
customer_state: "",
@@ -276,12 +280,22 @@ export default defineComponent({
this.CreateCustomerForm.basicInfo.customer_town = response.data.customer_town;
this.CreateCustomerForm.basicInfo.customer_state = response.data.customer_state;
this.CreateCustomerForm.basicInfo.customer_zip = response.data.customer_zip;
- this.CreateCustomerForm.basicInfo.customer_automatic = response.data.customer_automatic;
+
this.CreateCustomerForm.basicInfo.customer_phone_number = response.data.customer_phone_number;
this.CreateCustomerForm.basicInfo.customer_home_type = response.data.customer_home_type;
this.CreateCustomerForm.basicInfo.customer_apt = response.data.customer_apt;
this.CreateCustomerForm.basicInfo.customer_email = response.data.customer_email;
this.CreateCustomerForm.basicInfo.customer_address = response.data.customer_address;
+ if (response.data.customer_automatic === 1){
+ this.CreateCustomerForm.basicInfo.customer_automatic = true
+ console.log("poop")
+
+ }
+ if (response.data.customer_automatic === 0){
+ this.CreateCustomerForm.basicInfo.customer_automatic = false
+ console.log("butt")
+ }
+
}
})
},
@@ -292,7 +306,7 @@ export default defineComponent({
customer_zip: string;
customer_email: string;
customer_phone_number: string;
- customer_automatic: string;
+ customer_automatic: boolean;
customer_home_type: string,
customer_state: string;
customer_address: string;
diff --git a/src/pages/customer/profile/home.vue b/src/pages/customer/profile/home.vue
index e6f3331..9b0ae4b 100755
--- a/src/pages/customer/profile/home.vue
+++ b/src/pages/customer/profile/home.vue
@@ -38,18 +38,18 @@
class="btn-sm btn btn-accent">
Edit Customer
-
+
-
-
-
-
-
+
+
+
+
+
- Automatic
+ Automatic
Will Call
@@ -360,10 +360,10 @@ export default defineComponent({
},
computed: {
buttonText() {
- return this.isTrue ? 'Become Automatic Customer' : 'Become Willcall Customer';
+ return this.isTrue ? 'Become WillCall Customer' : 'Become Automatic Customer';
},
autoText() {
- return this.isTrue? 'Will Call' : 'Automatic ';
+ return this.isTrue? 'Automatic' : 'Will Call';
}
},
watch: {
@@ -403,6 +403,7 @@ export default defineComponent({
}).then((response: any) => {
this.automatic_status = response.data.status
console.log(this.automatic_status)
+
})
},
@@ -418,12 +419,14 @@ export default defineComponent({
this.automatic_response = response.data.status
if (this.automatic_response == 1) {
+
this.$notify({
title: "Automatic Status",
text: 'Customer is now Automatic Customer',
type: 'Success'
})
} else {
+
this.$notify({
title: "Automatic Status",
text: 'Customer is now will call',
diff --git a/src/pages/ticket/ticketauto.vue b/src/pages/ticket/ticketauto.vue
index 1cbfe4c..302383b 100644
--- a/src/pages/ticket/ticketauto.vue
+++ b/src/pages/ticket/ticketauto.vue
@@ -152,8 +152,8 @@ export default defineComponent({
withCredentials: true,
})
.then((response: any) => {
- this.automatic = response.data.automatic;
- this.getCustomer(response.data.automatic.customer_id);
+ this.automatic = response.data;
+ this.getCustomer(response.data.customer_id);
this.sumdelivery(this.$route.params.id);
})
|