From 42a3324d0420044074c950d3e289d52c32dc05c9 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Wed, 22 Mar 2023 14:46:07 +0000 Subject: [PATCH] use cust id instead of acc_no for queries --- src/components/CustomerComments.vue | 4 ++-- src/components/RecentOrders.vue | 16 ++++++++-------- src/views/customers/CustomerList.vue | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/CustomerComments.vue b/src/components/CustomerComments.vue index 0c4d2c6..18d32bd 100644 --- a/src/components/CustomerComments.vue +++ b/src/components/CustomerComments.vue @@ -37,7 +37,7 @@ export default { }, watch: { customer() { - this.getCustomerComments(this.customer.acc_no) + this.getCustomerComments() } }, methods: { @@ -55,7 +55,7 @@ export default { let url = this.$api_url + "/customers/comments" axios.get(url,{ params: { - acc_no: this.customer.acc_no + c_id: this.customer.id } }) .then(resp => { diff --git a/src/components/RecentOrders.vue b/src/components/RecentOrders.vue index 363afc6..e0f3e32 100644 --- a/src/components/RecentOrders.vue +++ b/src/components/RecentOrders.vue @@ -3,8 +3,8 @@ - - + + @@ -28,9 +28,9 @@
Items :
- - {{ i.code }} - {{ i.name }} x {{ i.quantity }}
-
+ + {{ i.code }} - {{ i.name }} x {{ i.quantity }}
+
@@ -50,7 +50,7 @@ export default { }, watch: { customer() { - this.getCustomerRecentOrders(this.customer.acc_no) + this.getCustomerRecentOrders() }, }, mixins: [methods], @@ -77,9 +77,9 @@ export default { } }, methods: { - getCustomerRecentOrders(acc_no){ + getCustomerRecentOrders(){ this.orders_loading = true - let url = this.$api_url + "/customers/" + acc_no + "/orders/recent" + let url = this.$api_url + "/customers/" + this.customer.id + "/orders/recent" axios.get(url, { params: { doc_status: this.doc_status diff --git a/src/views/customers/CustomerList.vue b/src/views/customers/CustomerList.vue index 0aad15e..a9c5a72 100644 --- a/src/views/customers/CustomerList.vue +++ b/src/views/customers/CustomerList.vue @@ -120,7 +120,7 @@ export default { } } -