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

@@ -383,12 +383,7 @@ todo: many biz objects are not using new PUT methodology
CURRENTLY DOING: Work order notifications - sidetrack customer login initialize processing CURRENTLY DOING: Work order notifications
Sidetrack, case 3888 customer feature control in global settings required for customer centric notifications and others
see case, add to global object at server and also must return login availability and code that too now so it all works
also customer centric notifications and features need to be filtered through this security at the server now too
@@ -411,7 +406,8 @@ Coded, tested, done:
todo 3: workorder notifications to code and test: todo 3: workorder notifications to code and test:
WorkorderCompleted=30 was removed as redundant but fora Customer they should not see any completed type status so this should actually be a thing I think if it was in v7
WorkorderCreatedForCustomer = 31, //*Service work order is created for Customer, only applies to that customer user notify sub for that customer, customer id is in conditional ID value for subscription WorkorderCreatedForCustomer = 31, //*Service work order is created for Customer, only applies to that customer user notify sub for that customer, customer id is in conditional ID value for subscription
This is a v7 feature and needs to be replicated This is a v7 feature and needs to be replicated

View File

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

View File

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

View File

@@ -567,6 +567,60 @@
></gz-tag-picker> ></gz-tag-picker>
</v-col> </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-row>
</v-form> </v-form>
@@ -683,7 +737,10 @@ export default {
customerAllowNotifyCSRRejectedOutTags: [], customerAllowNotifyCSRRejectedOutTags: [],
customerAllowNotifyWOCreated: false, customerAllowNotifyWOCreated: false,
customerAllowNotifyWOCreatedInTags: [], customerAllowNotifyWOCreatedInTags: [],
customerAllowNotifyWOCreatedOutTags: [] customerAllowNotifyWOCreatedOutTags: [],
customerAllowNotifyWOCompleted: false,
customerAllowNotifyWOCompletedInTags: [],
customerAllowNotifyWOCompletedOutTags: []
}, },
formState: { formState: {
ready: false, ready: false,
@@ -927,6 +984,7 @@ async function fetchTranslatedText(vm) {
"NotifyEventCSRAccepted", "NotifyEventCSRAccepted",
"NotifyEventCSRRejected", "NotifyEventCSRRejected",
"NotifyEventWorkorderCreatedForCustomer", "NotifyEventWorkorderCreatedForCustomer",
"NotifyEventWorkorderCompleted",
"CustomerAccessWorkOrderReport", "CustomerAccessWorkOrderReport",
"CSRInfoHTML" "CSRInfoHTML"
]); ]);

View File

@@ -775,10 +775,8 @@ async function populateSelectionLists(vm) {
return window.$gz.store.state.customerRights.notifyCSRRejected; return window.$gz.store.state.customerRights.notifyCSRRejected;
case 21: case 21:
return window.$gz.store.state.customerRights.notifyServiceImminent; 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 case 30:
//this is still up in the air and may need to be re-enabled here and at server return window.$gz.store.state.customerRights.notifyWOCompleted;
// //return window.$gz.store.state.customerRights.notifyCSRAccepted;
// return false;
case 31: case 31:
return window.$gz.store.state.customerRights.notifyWOCreated; return window.$gz.store.state.customerRights.notifyWOCreated;
default: default: