From 16f636a387d438fd12c27af67b8fd5fb56715861 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Thu, 23 Mar 2023 12:05:03 +0000 Subject: [PATCH] fixed id bug on med feeds and contracts lists (if 1) --- src/views/contracts/ContractList.vue | 6 +++--- src/views/customers/CustomerList.vue | 4 ++-- src/views/medfeeds/MedFeedsList.vue | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/contracts/ContractList.vue b/src/views/contracts/ContractList.vue index 4d3029c..0344b66 100644 --- a/src/views/contracts/ContractList.vue +++ b/src/views/contracts/ContractList.vue @@ -199,13 +199,13 @@ export default { async getContractsList() { this.loading = true let url = this.$api_url + "/customers/contracts/list" - let acc_no = this.$route.params.id || "" - console.log("Getting Contracts list..." + acc_no) + let c_id = this.$route.params.id || "" + console.log("Getting Contracts list..." + c_id) axios.get(url, { params: { limit: this.limit, query: this.searchQuery, - acc_no: acc_no + c_id: c_id } }) .then(resp => { diff --git a/src/views/customers/CustomerList.vue b/src/views/customers/CustomerList.vue index a9c5a72..4957b37 100644 --- a/src/views/customers/CustomerList.vue +++ b/src/views/customers/CustomerList.vue @@ -97,10 +97,10 @@ export default { this.selected_cust = c }, goToContracts(c){ - this.$router.push('/customers/contracts/list/' + c.acc_no) + this.$router.push('/customers/contracts/list/' + c.id) }, goToMedFeeds(c){ - this.$router.push('/customers/medicated-feeds/list/' + c.acc_no) + this.$router.push('/customers/medicated-feeds/list/' + c.id) }, async getCustomerList() { this.customers_loading = true diff --git a/src/views/medfeeds/MedFeedsList.vue b/src/views/medfeeds/MedFeedsList.vue index b6a977d..b1e9d25 100644 --- a/src/views/medfeeds/MedFeedsList.vue +++ b/src/views/medfeeds/MedFeedsList.vue @@ -127,13 +127,13 @@ export default { async getMedFeedsList(){ this.loading = true let url = this.$api_url + "/customers/medicated-feeds/list" - let acc_no = this.$route.params.id || "" - console.log("Getting Medicated Feeds list..." + acc_no) + let c_id = this.$route.params.id || "" + console.log("Getting Medicated Feeds list..." + c_id) axios.get(url,{ params: { limit: this.limit, query: this.searchQuery, - acc_no: acc_no + c_id: c_id } }).then(resp => { this.list = resp.data