fixed id bug on med feeds and contracts lists (if 1)

This commit is contained in:
Paul Wilde 2023-03-23 12:05:03 +00:00
parent 42a3324d04
commit 16f636a387
3 changed files with 8 additions and 8 deletions

View file

@ -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 => {

View file

@ -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

View file

@ -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