case 4108

This commit is contained in:
2022-02-10 21:23:45 +00:00
parent fe0b4c4b8d
commit af6f2c620d

View File

@@ -59,7 +59,42 @@
</v-autocomplete>
</v-col>
<v-col v-if="showQuoteStatus" cols="12" sm="6" lg="4" xl="3">
todo: idValue here for quotestatus
<v-autocomplete
v-model="obj.idValue"
:items="selectLists.quotestatus"
item-text="name"
item-value="id"
:label="$ay.t('QuoteQuoteStatusType')"
>
<template v-slot:item="data">
<v-list-item-avatar>
<v-icon :color="data.item.color">$ayiFlag</v-icon>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title
><span class="text-subtitle-2">{{ data.item.name }}</span
><v-icon
v-if="data.item.locked"
small
color="disabled"
class="ml-2"
>$ayiLock</v-icon
>
<v-icon
v-if="data.item.completed"
color="disabled"
class="ml-1"
small
>$ayiCheckCircle</v-icon
></v-list-item-title
>
<v-list-item-subtitle>
{{ data.item.notes }}</v-list-item-subtitle
>
</v-list-item-content>
<v-list-item-action> </v-list-item-action>
</template>
</v-autocomplete>
</v-col>
<v-col v-if="showDecValue" cols="12" sm="6" lg="4" xl="3">
@@ -200,6 +235,7 @@ export default {
return {
selectLists: {
wostatus: [],
quotestatus: [],
eventTypes: [],
deliveryMethods: [],
coreAyaTypes: []
@@ -249,7 +285,13 @@ export default {
}
},
showQuoteStatus() {
return this.obj.eventType == 9;
switch (this.obj.eventType) {
case 9:
case 29:
return true;
default:
return false;
}
},
showDecValue() {
//WorkorderTotalExceedsThreshold = 23 The "Andy"
@@ -289,6 +331,7 @@ export default {
showAgeValue() {
switch (this.obj.eventType) {
case 24:
case 29:
case 10:
return true;
default:
@@ -296,6 +339,9 @@ export default {
}
},
showLinkReportId() {
//New NOTE NOTE: This is probably not required at the mo as customers are expected to login and view the reports as configured in global settings,
//so, if post release nothing relies on this it might be removed
//
//NOTE: Currently projected: Only Quotes and Workorders are involved in sending as attached reports
//And only to customers and only single items, not lists so it's doable to indicate a report id
//and send a link from notification to open the report
@@ -709,12 +755,20 @@ async function populateSelectionLists(vm) {
);
await window.$gz.enums.fetchEnumList("coreview");
vm.selectLists.coreAyaTypes = window.$gz.enums.getSelectionList("coreview");
const res = await window.$gz.api.get("work-order-status/list");
let res = await window.$gz.api.get("work-order-status/list");
if (res.error) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
vm.selectLists.wostatus = res.data.all;
}
res = await window.$gz.api.get("quote-status/list");
if (res.error) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
vm.selectLists.quotestatus = res.data.all;
}
}
</script>