added customer complaints list
This commit is contained in:
parent
c5805185c7
commit
a1426eec60
5 changed files with 125 additions and 80 deletions
30
package-lock.json
generated
30
package-lock.json
generated
|
@ -2217,9 +2217,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "18.15.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.7.tgz",
|
||||
"integrity": "sha512-LFmUbFunqmBn26wJZgZPYZPrDR1RwGOu2v79Mgcka1ndO6V0/cwjivPTc4yoK6n9kmw4/ls1r8cLrvh2iMibFA=="
|
||||
"version": "18.15.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
|
||||
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ=="
|
||||
},
|
||||
"node_modules/@types/normalize-package-data": {
|
||||
"version": "2.4.1",
|
||||
|
@ -3974,9 +3974,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001469",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001469.tgz",
|
||||
"integrity": "sha512-Rcp7221ScNqQPP3W+lVOYDyjdR6dC+neEQCttoNr5bAyz54AboB4iwpnWgyi8P4YUsPybVzT4LgWiBbI3drL4g==",
|
||||
"version": "1.0.30001470",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001470.tgz",
|
||||
"integrity": "sha512-065uNwY6QtHCBOExzbV6m236DDhYCCtPmQUCoQtwkVqzud8v5QPidoMr6CoMkC2nfp6nksjttqWQRRh75LqUmA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
|
@ -5242,9 +5242,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.339",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.339.tgz",
|
||||
"integrity": "sha512-MSXHBJGcbBydq/DQDlpBeUKnJ6C7aTiNCTRpfDV5Iz0sNr/Ng6RJFloq82AAicp/SrmDq4zF6XsKG0B8Xwn1UQ=="
|
||||
"version": "1.4.340",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.340.tgz",
|
||||
"integrity": "sha512-zx8hqumOqltKsv/MF50yvdAlPF9S/4PXbyfzJS6ZGhbddGkRegdwImmfSVqCkEziYzrIGZ/TlrzBND4FysfkDg=="
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
|
@ -8299,9 +8299,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
||||
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
|
|
|
@ -81,3 +81,6 @@ table tr.at_risk:hover {
|
|||
align-items: center;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
.clickable {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,11 @@ const routes = [
|
|||
name: 'complaintslist',
|
||||
component: ComplaintsList
|
||||
},
|
||||
{
|
||||
path: '/customers/complaints/list/:id',
|
||||
name: 'complaintslistid',
|
||||
component: ComplaintsList
|
||||
},
|
||||
{
|
||||
path: '/sop/printed',
|
||||
name: 'sopprinted',
|
||||
|
|
|
@ -15,7 +15,16 @@
|
|||
v-model="searchQuery"
|
||||
density="compact"
|
||||
append-inner-icon="mdi-magnify"></v-text-field>
|
||||
<v-row justify="space-between">
|
||||
<v-col cols=4>
|
||||
<v-btn v-if="site_info.features.addcomplaint" color="warning" prepend-icon="mdi-plus" variant="text">Add</v-btn>
|
||||
</v-col>
|
||||
<v-col cols=3>
|
||||
<v-btn align="end" variant="text" @click="showActive = !showActive">
|
||||
Showing <span v-if="showActive">Active Only</span><span v-else>Inactive</span>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-progress-linear indeterminate color="orange" :active="loading"></v-progress-linear>
|
||||
<v-card variant="outlined">
|
||||
<RecycleScroller class="scroller"
|
||||
|
@ -62,6 +71,7 @@ import ComplaintInfo from '@/components/ComplaintInfo.vue'
|
|||
export default {
|
||||
props: {
|
||||
site_info:{},
|
||||
user_info:{}
|
||||
},
|
||||
components: {
|
||||
ComplaintInfo
|
||||
|
@ -105,16 +115,22 @@ export default {
|
|||
getComplaintsList(){
|
||||
this.loading = true
|
||||
let url = this.$api_url + "/customers/complaints/list"
|
||||
console.log("Getting Complaint list...")
|
||||
let c_id = this.$route.params.id || ""
|
||||
console.log("Getting Contracts list..." + c_id)
|
||||
axios.get(url,{
|
||||
params: {
|
||||
limit: this.limit,
|
||||
query: this.searchQuery
|
||||
query: this.searchQuery,
|
||||
c_id: c_id
|
||||
}
|
||||
}).then(resp => {
|
||||
this.list = resp.data
|
||||
this.loading = false
|
||||
console.log(this.list)
|
||||
this.listreceived = true
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
showInfo(complaint) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<v-text-field
|
||||
clearable
|
||||
label="Search"
|
||||
variant="outlined"
|
||||
v-model="searchQuery"
|
||||
|
@ -23,25 +22,35 @@
|
|||
v-slot="{ item }"
|
||||
>
|
||||
<v-list-item >
|
||||
<template v-slot:title >
|
||||
<v-card @click="getCustomerInfo(item)">
|
||||
<v-sheet class="clickable" @click="getCustomerInfo(item)" rounded :class="{ 'bg-error' : item.at_risk }">
|
||||
<v-icon v-if="item.acc_no == selected_cust.acc_no">mdi-checkbox-marked-outline</v-icon>
|
||||
<v-icon v-else>mdi-checkbox-blank-outline</v-icon>
|
||||
{{ item.acc_no }} - {{ item.name }}:
|
||||
<span class="text-caption">{{ item.address.line_1 }}, {{ item.address.line_2 }}, <br/>
|
||||
{{ item.address.city }}, {{ item.address.county}}, {{ item.address.postcode }},
|
||||
</span>
|
||||
</v-card>
|
||||
</template>
|
||||
</v-sheet>
|
||||
<template v-slot:append>
|
||||
<v-btn @click.prevent="goToContracts(item)" class="text-none" color="blue-lighten-1" title="View Contracts">
|
||||
Contracts
|
||||
<v-btn-toggle>
|
||||
<v-btn @click.prevent="viewOrders(item)" color="blue-lighten-1" title="View Orders">
|
||||
<v-icon>mdi-cart-outline</v-icon>
|
||||
</v-btn>
|
||||
<v-btn @click.prevent="goToContracts(item)" color="blue-lighten-1" title="View Contracts">
|
||||
<v-icon>mdi-file-edit-outline</v-icon>
|
||||
<v-badge v-if="item.contract_count > 0" color="blue-lighten-4" floating :content="item.contract_count">
|
||||
</v-badge>
|
||||
</v-btn>
|
||||
<v-btn @click.prevent="goToMedFeeds(item)" class="text-none" color="orange-lighten-1" title="View Med Feeds">
|
||||
Med Feeds
|
||||
<v-btn @click.prevent="goToMedFeeds(item)" color="orange-lighten-1" title="View Med Feeds">
|
||||
<v-icon>mdi-pill</v-icon>
|
||||
<v-badge v-if="item.medfeed_count > 0" color="orange-lighten-4" floating :content="item.medfeed_count">
|
||||
</v-badge>
|
||||
</v-btn>
|
||||
<v-btn @click.prevent="goToComplaints(item)" color="orange-lighten-1" title="View Complaints">
|
||||
<v-icon>mdi-exclamation-thick</v-icon>
|
||||
<v-badge v-if="item.complaint_count > 0" color="red-lighten-4" floating :content="item.complaint_count">
|
||||
</v-badge>
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</RecycleScroller>
|
||||
|
@ -108,6 +117,12 @@ export default {
|
|||
goToMedFeeds(c){
|
||||
this.$router.push('/customers/medicated-feeds/list/' + c.id)
|
||||
},
|
||||
goToComplaints(c){
|
||||
this.$router.push('/customers/complaints/list/' + c.id)
|
||||
},
|
||||
viewOrders(c){
|
||||
this.$router.push('/customers/orders/list/' + c.id)
|
||||
},
|
||||
async getCustomerList() {
|
||||
this.customers_loading = true
|
||||
let url = this.$api_url + "/customers/list"
|
||||
|
@ -126,7 +141,7 @@ export default {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
.scroller {
|
||||
height: 300px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue