use cust id instead of acc_no for queries

This commit is contained in:
Paul Wilde 2023-03-22 14:46:07 +00:00
parent 56f9be0a21
commit 42a3324d04
3 changed files with 11 additions and 11 deletions

View file

@ -37,7 +37,7 @@ export default {
}, },
watch: { watch: {
customer() { customer() {
this.getCustomerComments(this.customer.acc_no) this.getCustomerComments()
} }
}, },
methods: { methods: {
@ -55,7 +55,7 @@ export default {
let url = this.$api_url + "/customers/comments" let url = this.$api_url + "/customers/comments"
axios.get(url,{ axios.get(url,{
params: { params: {
acc_no: this.customer.acc_no c_id: this.customer.id
} }
}) })
.then(resp => { .then(resp => {

View file

@ -3,8 +3,8 @@
<v-progress-linear color="blue" :active="orders_loading" indeterminate> <v-progress-linear color="blue" :active="orders_loading" indeterminate>
</v-progress-linear> </v-progress-linear>
<v-container> <v-container>
<v-row> <v-row >
<v-col cols=12 v-for="item in sortedOrders" :key="item.id"> <v-col cols=12 v-for="item in sortedOrders" :key="item.doc_no">
<v-card> <v-card>
<v-row> <v-row>
<v-col cols=4> <v-col cols=4>
@ -28,9 +28,9 @@
<v-col cols=8> <v-col cols=8>
<v-card-text> <v-card-text>
<h5>Items :</h5> <h5>Items :</h5>
<v-caption v-for="(i, index) in item.products" :key="index" style="border-bottom: 1px dotted #000;"> <v-caption v-for="(i, index) in item.products" :key="index" style="border-bottom: 1px dotted #000;">
{{ i.code }} - {{ i.name }} x {{ i.quantity }}<br/> {{ i.code }} - {{ i.name }} x {{ i.quantity }}<br/>
</v-caption> </v-caption>
</v-card-text> </v-card-text>
</v-col> </v-col>
</v-row> </v-row>
@ -50,7 +50,7 @@ export default {
}, },
watch: { watch: {
customer() { customer() {
this.getCustomerRecentOrders(this.customer.acc_no) this.getCustomerRecentOrders()
}, },
}, },
mixins: [methods], mixins: [methods],
@ -77,9 +77,9 @@ export default {
} }
}, },
methods: { methods: {
getCustomerRecentOrders(acc_no){ getCustomerRecentOrders(){
this.orders_loading = true 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, { axios.get(url, {
params: { params: {
doc_status: this.doc_status doc_status: this.doc_status

View file

@ -120,7 +120,7 @@ export default {
} }
} }
</script> </script>
<style scoped> <style>
.scroller { .scroller {
height: 600px; height: 600px;
} }