This commit is contained in:
@@ -7,6 +7,10 @@ PRIORITY - ALWAYS Lowest level stuff first, i.e. TODO at server, api route chang
|
||||
|
||||
## CURRENT STAGE:
|
||||
|
||||
todo: customer user login should not see evaluation, should see home / useroptions / subscriptions maybe dashboard?
|
||||
and should see csr's etc
|
||||
|
||||
|
||||
todo: Customer user, needs fields or form to set up translation, notify subscriptions etc
|
||||
determine if can just re-use existing stuff for useroptions and notification with tweaks or...?
|
||||
would be best of all if can just re-use then saves a separate UI to fuck with
|
||||
@@ -93,6 +97,10 @@ todo: Customer UI pages ability to add analytics tracking codes:
|
||||
todo: ADM-USER awaiting customer, headoffice id, etc for those usertypes
|
||||
need to show if that usertype for selection
|
||||
|
||||
todo: notifications, is there one for the customer to know service is completed like in v7? If not should be made into it's own event type and then update the code in home-notify-subscription customer version
|
||||
as well as all other places where applicable.
|
||||
Ideally Notify subscriptions that are intended for customers should be their own thing, not shared with regular User type subs
|
||||
|
||||
todo: open-object-handler.js deal with some utility types:
|
||||
//TODO: FORMCUSTOMIZATION
|
||||
//TODO: LIST VIEW
|
||||
|
||||
@@ -27,6 +27,65 @@ function initNavPanel() {
|
||||
let t = window.$gz.translation.get;
|
||||
let role = window.$gz.role.AUTHORIZATION_ROLES;
|
||||
let licenseState = window.$gz.store.state.globalSettings.licenseStatus;
|
||||
/*Service = 1,
|
||||
NotService = 2,
|
||||
Customer = 3,
|
||||
HeadOffice = 4,
|
||||
ServiceContractor = 5 */
|
||||
let isCustomerTypeUser =
|
||||
window.$gz.store.state.userType == 3 ||
|
||||
window.$gz.store.state.userType == 4;
|
||||
let isSubcontractorTypeUser = window.$gz.store.state.userType == 5;
|
||||
|
||||
//Customer "outside user" options
|
||||
if (isCustomerTypeUser) {
|
||||
//clear sublevel array
|
||||
sub = [];
|
||||
|
||||
//Set homePage in store to customer csr for this user type
|
||||
|
||||
window.$gz.store.commit("setHomePage", "/customer-csr-list");
|
||||
|
||||
//USER SETTINGS
|
||||
sub.push({
|
||||
title: "UserSettings",
|
||||
icon: "fa-user-cog",
|
||||
route: "/home-user-settings",
|
||||
key: key++
|
||||
});
|
||||
|
||||
sub.push({
|
||||
title: "NotifySubscriptionList",
|
||||
icon: "fa-bullhorn",
|
||||
route: "/home-notify-subscriptions",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//CSR LIST subitem
|
||||
sub.push({
|
||||
title: "CustomerServiceRequestList",
|
||||
icon: "fa-child",
|
||||
route: "/customer-csr-list",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//WORKORDERS subitem
|
||||
sub.push({
|
||||
title: "WorkOrderList",
|
||||
icon: "fa-tools",
|
||||
route: "/customer-workorders",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//** CUSTOMER LOGIN HOME (TOP)
|
||||
|
||||
addNavItem("Home", "fa-home", undefined, sub, key++, "homecustomer");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//Non-customer ("inside user") options
|
||||
|
||||
//******* License issue
|
||||
//Status NONE, EXPIREDTRIAL, EXPIREDPURCHASE, REVOKED
|
||||
//only show license and logout
|
||||
@@ -695,48 +754,9 @@ function initNavPanel() {
|
||||
addNavItem("WidgetList", "fa-vial", "/widgets", [], key++, "widgets");
|
||||
}
|
||||
|
||||
//****************** CUSTOMER USER / HEAD OFFICE USER UI
|
||||
if (
|
||||
window.$gz.role.hasRole([role.CustomerFull, role.CustomerLimited]) &&
|
||||
(window.$gz.store.state.userType == 4 ||
|
||||
window.$gz.store.state.userType == 5)
|
||||
) {
|
||||
//clear sublevel array
|
||||
sub = [];
|
||||
|
||||
//Set homePage in store to customer csr for this user type
|
||||
|
||||
window.$gz.store.commit("setHomePage", "/customer-csr-list");
|
||||
|
||||
//CSR LIST subitem
|
||||
sub.push({
|
||||
title: "CustomerServiceRequestList",
|
||||
icon: "fa-child",
|
||||
route: "/customer-csr-list",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//WORKORDERS subitem
|
||||
sub.push({
|
||||
title: "WorkOrderList",
|
||||
icon: "fa-tools",
|
||||
route: "/customer-workorders",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//** CUSTOMER LOGIN HOME (TOP)
|
||||
|
||||
addNavItem("Home", "fa-home", undefined, sub, key++, "homecustomer");
|
||||
}
|
||||
|
||||
//*** EVALUATION active trial license should always go to evaluation as home page
|
||||
//as long as they are a normal User type and not a customer or subcontractor type
|
||||
if (
|
||||
(licenseState == 1) &
|
||||
(window.$gz.store.state.userType == 1 ||
|
||||
window.$gz.store.state.userType == 2 ||
|
||||
window.$gz.store.state.userType == 3)
|
||||
) {
|
||||
//as long as they are a normal User type and not a subcontractor type
|
||||
if ((licenseState == 1) & !isSubcontractorTypeUser) {
|
||||
addNavItem(
|
||||
"Evaluate",
|
||||
"fa-rocket",
|
||||
|
||||
@@ -49,6 +49,11 @@ export default new Vuex.Store({
|
||||
knownPassword: false,
|
||||
newNotificationCount: 0
|
||||
},
|
||||
getters: {
|
||||
isOutsideUser: state => {
|
||||
return state.userType == 3 || state.userType == 4;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
setLastClientVersion(state, data) {
|
||||
state.lastClientVersion = data;
|
||||
|
||||
@@ -742,9 +742,48 @@ async function fetchTranslatedText(vm) {
|
||||
async function populateSelectionLists(vm) {
|
||||
//ensure the pick lists required are pre-fetched
|
||||
await window.$gz.enums.fetchEnumList("NotifyEventType");
|
||||
vm.selectLists.eventTypes = window.$gz.enums.getSelectionList(
|
||||
"NotifyEventType"
|
||||
);
|
||||
let tempEventTypes = window.$gz.enums.getSelectionList("NotifyEventType");
|
||||
if (window.$gz.store.getters.isOutsideUser) {
|
||||
/* //#### NOTE: once event is NOTED IN COMMENT (not necessarily coded yet as some can't be yet) in NotifyEventProcessor I'll mark it with a * in the comment so I know if I miss any
|
||||
ObjectDeleted = 1,//* Deletion of any object of conditional specific AyaType and optionally conditional tags
|
||||
ObjectCreated = 2,//* creation of any object of conditional specific AyaType and optionally conditional tags
|
||||
ObjectModified = 3,//* Modification / update of any kind of any object of conditional specific AyaType and optionally conditional tags
|
||||
WorkorderStatusChange = 4,//* Workorder object, any *change* of status including from no status (new) to a specific conditional status ID value
|
||||
ContractExpiring = 5,//* Contract object, aged notification with optional advance notice for expiration date of contract. Customer version and User version deliveries possible.
|
||||
CSRAccepted = 6,//*CustomerServiceRequest object, saved with ACCEPTED status, delivered to Customer only
|
||||
CSRRejected = 7,//*CustomerServiceRequest object, saved with REJECTED status, delivered to Customer only
|
||||
DEPRECATED_8 = 8,//UNUSED, FILL IN LATER WITH NEXT NEW NOTIFICATION EVENT
|
||||
QuoteStatusChange = 9,//* Quote object, any *change* of status including from no status (new) to a specific conditional status ID value
|
||||
ObjectAge = 10,//* Any object, Age (conditional on AgeValue) after creation event of any object of conditional specific AyaType and optionally conditional tags
|
||||
ServiceBankDepleted = 11,//*ServiceBank object, any change to balance triggers this check, conditional on decvalue as remaining balance left to trigger this notification
|
||||
ReminderImminent = 12,//*Reminder object, Advance notice setting tag conditional
|
||||
ScheduledOnWorkorder = 13,//*Workorder / WorkorderItemScheduledUser object, instant notification when current user is scheduled on a service workorder
|
||||
ScheduledOnWorkorderImminent = 14,//*Workorder / WorkorderItemScheduledUser object, advanced (settable) notification when current user's scheduled date/time is imminent
|
||||
WorkorderCloseByPassed = 15,//* ##TODO Workorder object , need to rename this and rethink it in line with this is really related to not setting workorder to a finished or completed status type in time
|
||||
OutsideServiceOverdue = 16,//* Workorder object , WorkorderItemOutsideService created / updated, sets advance notice on due date tag filterable
|
||||
OutsideServiceReceived = 17,//* Workorder object , WorkorderItemOutsideService updated, instant notification when item received, tag filterable
|
||||
PartRequestReceived = 18,//* Workorder object / workorderitempartrequest updated, sent to person who requested when parts received back
|
||||
NotifyHealthCheck = 19,//* NO OBJECT, direct subscription to receive recurring daily notify system "ping" sent out between 8am and 10am once every 24 hours minimum every day server local time
|
||||
BackupStatus = 20,//* NO OBJECT, direct subscription to receive results of last backup operation
|
||||
CustomerServiceImminent = 21,//* Workorder / WorkorderItemScheduledUser object, notice that scheduled service is due, can set advance notice, CUSTOMER gets delivery
|
||||
PartRequested = 22,//* Workorder object / workorderitempartrequest created tag filterable
|
||||
WorkorderTotalExceedsThreshold = 23,//* "the Andy" Workorder updated / created, based on balance total so conditional on DecValue
|
||||
WorkorderStatusAge = 24,//* Workorder object Created / Updated, conditional on exact status selected IdValue, Tags conditional, advance notice can be set
|
||||
UnitWarrantyExpiry = 25,//* Unit object created, advance notice can be used, tag conditional
|
||||
UnitMeterReadingMultipleExceeded = 26,//* UnitMeterReading object, Created, conditional on DecValue as the Multiple threshold, if passed then notifies
|
||||
GeneralNotification = 27,//* NO OBJECT old quick notification, refers now to any direct text notification internal or user to user used for system notifications (default delivers in app but user can opt to also get email)
|
||||
ServerOperationsProblem = 28,//* NO OBJECT and serious issue with server operations requiring intervention,
|
||||
QuoteStatusAge = 29//* Quote object Created / Updated, conditional on exact status selected IdValue, Tags conditional, advance notice can be set
|
||||
*/
|
||||
|
||||
vm.selectLists.eventTypes = tempEventTypes.filter(
|
||||
z => z.id == 6 || z.id == 7 || z.id == 21
|
||||
);
|
||||
} else {
|
||||
vm.selectLists.eventTypes = tempEventTypes.filter(
|
||||
z => z.id != 6 && z.id != 7 && z.id != 21
|
||||
);
|
||||
}
|
||||
|
||||
await window.$gz.enums.fetchEnumList("NotifyDeliveryMethod");
|
||||
vm.selectLists.deliveryMethods = window.$gz.enums.getSelectionList(
|
||||
|
||||
Reference in New Issue
Block a user