This commit is contained in:
2021-07-13 16:48:33 +00:00
parent c457a478f7
commit 3088c2fc6d
6 changed files with 42 additions and 17 deletions

View File

@@ -26,7 +26,6 @@ export default new Vuex.Store({
apiToken: "-",
downloadToken: "-",
tfaEnabled: undefined,
notifyAvailable: true,
customerRights: {},
userId: 0,
userName: "NOT AUTHENTICATED",
@@ -65,6 +64,7 @@ export default new Vuex.Store({
return state.userType == 3 || state.userType == 4;
},
isSubContractorUser: state => {
console.log("Issubcontractoruser", state);
return state.userType == 5;
},
isScheduleableUser: state => {
@@ -107,13 +107,6 @@ export default new Vuex.Store({
state.tfaEnabled = data.tfaEnabled;
if (data.customerRights) {
state.customerRights = data.customerRights;
//only a customer user could have zero access to notifications
state.notifyAvailable =
data.customerRights.notifyServiceImminent == true ||
data.customerRights.notifyCSRAccepted == true ||
data.customerRights.notifyCSRRejected == true ||
data.customerRights.notifyWOCompleted == true ||
data.customerRights.notifyWOCreated == true;
}
},
logout(state) {
@@ -127,7 +120,6 @@ export default new Vuex.Store({
state.userName = "NOT AUTHENTICATED";
state.roles = 0;
state.userType = 0;
state.notifyAvailable = true;
state.homePage = undefined;
state.navItems = [];
state.translationText = {};