This commit is contained in:
2021-06-16 18:57:36 +00:00
parent 6b4614428e
commit a05e5e3871
5 changed files with 66 additions and 21 deletions

View File

@@ -42,9 +42,6 @@ function initNavPanel() {
//Set homePage in store to customer csr for this user type
let CustomerHomePageSet = false;
//$store.state.customerRights
//{ "csr": true, "wo": true, "wowiki": true, "userSettings": true, "notifyServiceImminent": true, "notifyCSRAccepted": true, "notifyCSRRejected": true, "notifyWOCreated": true }
//USER SETTINGS
if (window.$gz.store.state.customerRights.userSettings == true) {
sub.push({
@@ -58,12 +55,7 @@ function initNavPanel() {
CustomerHomePageSet = true;
}
if (
window.$gz.store.state.customerRights.notifyServiceImminent == true ||
window.$gz.store.state.customerRights.notifyCSRAccepted == true ||
window.$gz.store.state.customerRights.notifyCSRRejected == true ||
window.$gz.store.state.customerRights.notifyWOCreated == true
) {
if (window.$gz.store.state.notifyAvailable) {
sub.push({
title: "NotifySubscriptionList",
icon: "$ayiBullhorn",

View File

@@ -83,6 +83,7 @@ export default new Vuex.Store({
data.customerRights.notifyServiceImminent == true ||
data.customerRights.notifyCSRAccepted == true ||
data.customerRights.notifyCSRRejected == true ||
data.customerRights.notifyWOCompleted == true ||
data.customerRights.notifyWOCreated == true;
}
},

View File

@@ -567,6 +567,60 @@
></gz-tag-picker>
</v-col>
<!-- ######################################################## -->
<v-col cols="12">
<div class="text-subtitle-1">
{{ $ay.t("NotifyEventWorkorderCompleted") }}
</div>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="obj.customerAllowNotifyWOCompleted"
:readonly="formState.readOnly"
:label="$ay.t('Active')"
ref="customerAllowNotifyWOCompleted"
data-cy="customerAllowNotifyWOCompleted"
:error-messages="
form().serverErrors(this, 'customerAllowNotifyWOCompleted')
"
@change="fieldValueChanged('customerAllowNotifyWOCompleted')"
></v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="4">
<gz-tag-picker
v-model="obj.customerAllowNotifyWOCompletedInTags"
:readonly="formState.readOnly"
:label="$ay.t('TaggedWith')"
ref="customerAllowNotifyWOCompletedInTags"
data-cy="customerAllowNotifyWOCompletedInTags"
:error-messages="
form().serverErrors(
this,
'customerAllowNotifyWOCompletedInTags'
)
"
@input="fieldValueChanged('customerAllowNotifyWOCompletedInTags')"
></gz-tag-picker>
</v-col>
<v-col cols="12" sm="6" lg="4">
<gz-tag-picker
v-model="obj.customerAllowNotifyWOCompletedOutTags"
:readonly="formState.readOnly"
:label="$ay.t('NotTaggedWith')"
ref="customerAllowNotifyWOCompletedOutTags"
data-cy="customerAllowNotifyWOCompletedOutTags"
:error-messages="
form().serverErrors(
this,
'customerAllowNotifyWOCompletedOutTags'
)
"
@input="
fieldValueChanged('customerAllowNotifyWOCompletedOutTags')
"
></gz-tag-picker>
</v-col>
<!-- **************************************************** -->
</v-row>
</v-form>
@@ -683,7 +737,10 @@ export default {
customerAllowNotifyCSRRejectedOutTags: [],
customerAllowNotifyWOCreated: false,
customerAllowNotifyWOCreatedInTags: [],
customerAllowNotifyWOCreatedOutTags: []
customerAllowNotifyWOCreatedOutTags: [],
customerAllowNotifyWOCompleted: false,
customerAllowNotifyWOCompletedInTags: [],
customerAllowNotifyWOCompletedOutTags: []
},
formState: {
ready: false,
@@ -927,6 +984,7 @@ async function fetchTranslatedText(vm) {
"NotifyEventCSRAccepted",
"NotifyEventCSRRejected",
"NotifyEventWorkorderCreatedForCustomer",
"NotifyEventWorkorderCompleted",
"CustomerAccessWorkOrderReport",
"CSRInfoHTML"
]);

View File

@@ -775,10 +775,8 @@ async function populateSelectionLists(vm) {
return window.$gz.store.state.customerRights.notifyCSRRejected;
case 21:
return window.$gz.store.state.customerRights.notifyServiceImminent;
// case 30://was workorder completed, removed due to thinking it's covered elsewhere but not really for customer who shouldn't see any other status available
//this is still up in the air and may need to be re-enabled here and at server
// //return window.$gz.store.state.customerRights.notifyCSRAccepted;
// return false;
case 30:
return window.$gz.store.state.customerRights.notifyWOCompleted;
case 31:
return window.$gz.store.state.customerRights.notifyWOCreated;
default: