This commit is contained in:
@@ -430,6 +430,7 @@ todo: show all, for most lists showing Work orders and the work order icon seems
|
|||||||
What if I used the work order icon for each but put differing text as needed if more than one sub item?
|
What if I used the work order icon for each but put differing text as needed if more than one sub item?
|
||||||
|
|
||||||
todo 2: Implement "Show All" feature for workorder lists as follows:
|
todo 2: Implement "Show All" feature for workorder lists as follows:
|
||||||
|
Use the work order icon but use the scheduled user or labor text unless they have unique icons separate from User in which case use them
|
||||||
WorkORderItemScheduledUserDataList
|
WorkORderItemScheduledUserDataList
|
||||||
WorkOrderItemLaborDataList
|
WorkOrderItemLaborDataList
|
||||||
labor and scheduled user records available from several places: Dashboard menu, schedule menu, also under Administration->Users for the benefit of users with rights to that
|
labor and scheduled user records available from several places: Dashboard menu, schedule menu, also under Administration->Users for the benefit of users with rights to that
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export default new Vuex.Store({
|
|||||||
notifyAvailable: true,
|
notifyAvailable: true,
|
||||||
isCustomerUser: false,
|
isCustomerUser: false,
|
||||||
isSubContractorUser: false,
|
isSubContractorUser: false,
|
||||||
|
isScheduleableUser: false,
|
||||||
customerRights: {},
|
customerRights: {},
|
||||||
userId: 0,
|
userId: 0,
|
||||||
userName: "NOT AUTHENTICATED",
|
userName: "NOT AUTHENTICATED",
|
||||||
@@ -74,6 +75,7 @@ export default new Vuex.Store({
|
|||||||
state.userType = data.userType;
|
state.userType = data.userType;
|
||||||
state.isSubContractorUser = data.userType == 5;
|
state.isSubContractorUser = data.userType == 5;
|
||||||
state.isCustomerUser = data.userType == 3 || data.userType == 4;
|
state.isCustomerUser = data.userType == 3 || data.userType == 4;
|
||||||
|
state.isScheduleableUser = data.userType == 1 || data.userType == 5;
|
||||||
state.downloadToken = data.dlt;
|
state.downloadToken = data.dlt;
|
||||||
state.tfaEnabled = data.tfaEnabled;
|
state.tfaEnabled = data.tfaEnabled;
|
||||||
if (data.customerRights) {
|
if (data.customerRights) {
|
||||||
@@ -101,6 +103,7 @@ export default new Vuex.Store({
|
|||||||
state.notifyAvailable = true;
|
state.notifyAvailable = true;
|
||||||
state.isCustomerUser = false;
|
state.isCustomerUser = false;
|
||||||
state.isSubContractorUser = false;
|
state.isSubContractorUser = false;
|
||||||
|
state.isScheduleableUser = false;
|
||||||
state.homePage = undefined;
|
state.homePage = undefined;
|
||||||
state.navItems = [];
|
state.navItems = [];
|
||||||
state.translationText = {};
|
state.translationText = {};
|
||||||
|
|||||||
@@ -1014,6 +1014,26 @@ async function clickHandler(menuItem) {
|
|||||||
case "disable2fa":
|
case "disable2fa":
|
||||||
m.vm.disableTfa();
|
m.vm.disableTfa();
|
||||||
break;
|
break;
|
||||||
|
case "WorkOrderItemScheduledUserList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "svc-workorder-item-scheduled-users",
|
||||||
|
params: {
|
||||||
|
aType: m.vm.ayaType,
|
||||||
|
objectId: m.vm.obj.id,
|
||||||
|
name: m.vm.obj.name
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "WorkOrderItemLaborList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "svc-workorder-item-labors",
|
||||||
|
params: {
|
||||||
|
aType: m.vm.ayaType,
|
||||||
|
objectId: m.vm.obj.id,
|
||||||
|
name: m.vm.obj.name
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
"notify-warning",
|
||||||
@@ -1124,6 +1144,21 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.obj.userType == 1 || vm.obj.userType == 5) {
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "WorkOrderItemScheduledUserList",
|
||||||
|
icon: "$ayiUserClock",
|
||||||
|
key: FORM_KEY + ":WorkOrderItemScheduledUserList",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "WorkOrderItemLaborList",
|
||||||
|
icon: "$ayiHammer",
|
||||||
|
key: FORM_KEY + ":WorkOrderItemLaborList",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1191,7 +1226,9 @@ async function fetchTranslatedText(vm) {
|
|||||||
"UserPageAddress",
|
"UserPageAddress",
|
||||||
"SendPasswordResetCode",
|
"SendPasswordResetCode",
|
||||||
"AuthDisableTwoFactor",
|
"AuthDisableTwoFactor",
|
||||||
"AuthTwoFactorDisabled"
|
"AuthTwoFactorDisabled",
|
||||||
|
"WorkOrderItemScheduledUserList",
|
||||||
|
"WorkOrderItemLaborList"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
:reload="reload"
|
:reload="reload"
|
||||||
@selection-change="handleSelected"
|
@selection-change="handleSelected"
|
||||||
data-cy="WorkOrderItemLaborsTable"
|
data-cy="WorkOrderItemLaborsTable"
|
||||||
|
:client-criteria="clientCriteria"
|
||||||
|
:pre-filter-mode="preFilterMode"
|
||||||
|
@clear-pre-filter="clearPreFilter"
|
||||||
>
|
>
|
||||||
</gz-data-table>
|
</gz-data-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,6 +29,26 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.rights = window.$gz.role.getRights(window.$gz.type.WorkOrder);
|
this.rights = window.$gz.role.getRights(window.$gz.type.WorkOrder);
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
|
//------ Show all ----
|
||||||
|
//OPTIONAL "Show All" FILTER
|
||||||
|
this.objectId = window.$gz.util.stringToIntOrNull(
|
||||||
|
this.$route.params.objectId
|
||||||
|
);
|
||||||
|
this.aForType = window.$gz.util.stringToIntOrNull(this.$route.params.aType);
|
||||||
|
|
||||||
|
if (this.objectId && this.objectId != 0 && this.aForType) {
|
||||||
|
//OBJECTID,AYATYPE
|
||||||
|
this.clientCriteria = `${this.objectId},${this.aForType}`;
|
||||||
|
|
||||||
|
this.preFilterMode = {
|
||||||
|
icon: window.$gz.util.iconForType(this.aForType),
|
||||||
|
id: this.objectId,
|
||||||
|
ayatype: this.aForType,
|
||||||
|
viz: this.$route.params.name,
|
||||||
|
clearable: true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
//------ /show all ----
|
||||||
generateMenu(this);
|
generateMenu(this);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -36,12 +59,22 @@ export default {
|
|||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
aType: window.$gz.type.WorkOrderItemLabor,
|
aType: window.$gz.type.WorkOrderItemLabor,
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
reload: false
|
reload: false,
|
||||||
|
clientCriteria: undefined,
|
||||||
|
preFilterMode: null,
|
||||||
|
objectId: null,
|
||||||
|
aForType: null,
|
||||||
|
name: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSelected(selected) {
|
handleSelected(selected) {
|
||||||
this.selectedItems = selected;
|
this.selectedItems = selected;
|
||||||
|
},
|
||||||
|
clearPreFilter() {
|
||||||
|
this.clientCriteria = null;
|
||||||
|
this.preFilterMode = null;
|
||||||
|
this.reload = !this.reload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
:reload="reload"
|
:reload="reload"
|
||||||
@selection-change="handleSelected"
|
@selection-change="handleSelected"
|
||||||
data-cy="WorkOrderItemScheduledUsersTable"
|
data-cy="WorkOrderItemScheduledUsersTable"
|
||||||
|
:client-criteria="clientCriteria"
|
||||||
|
:pre-filter-mode="preFilterMode"
|
||||||
|
@clear-pre-filter="clearPreFilter"
|
||||||
>
|
>
|
||||||
</gz-data-table>
|
</gz-data-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,6 +29,26 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.rights = window.$gz.role.getRights(window.$gz.type.WorkOrder);
|
this.rights = window.$gz.role.getRights(window.$gz.type.WorkOrder);
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
|
//------ Show all ----
|
||||||
|
//OPTIONAL "Show All" FILTER
|
||||||
|
this.objectId = window.$gz.util.stringToIntOrNull(
|
||||||
|
this.$route.params.objectId
|
||||||
|
);
|
||||||
|
this.aForType = window.$gz.util.stringToIntOrNull(this.$route.params.aType);
|
||||||
|
|
||||||
|
if (this.objectId && this.objectId != 0 && this.aForType) {
|
||||||
|
//OBJECTID,AYATYPE
|
||||||
|
this.clientCriteria = `${this.objectId},${this.aForType}`;
|
||||||
|
|
||||||
|
this.preFilterMode = {
|
||||||
|
icon: window.$gz.util.iconForType(this.aForType),
|
||||||
|
id: this.objectId,
|
||||||
|
ayatype: this.aForType,
|
||||||
|
viz: this.$route.params.name,
|
||||||
|
clearable: true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
//------ /show all ----
|
||||||
generateMenu(this);
|
generateMenu(this);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -36,12 +59,22 @@ export default {
|
|||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
aType: window.$gz.type.WorkOrderItemScheduledUser,
|
aType: window.$gz.type.WorkOrderItemScheduledUser,
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
reload: false
|
reload: false,
|
||||||
|
clientCriteria: undefined,
|
||||||
|
preFilterMode: null,
|
||||||
|
objectId: null,
|
||||||
|
aForType: null,
|
||||||
|
name: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSelected(selected) {
|
handleSelected(selected) {
|
||||||
this.selectedItems = selected;
|
this.selectedItems = selected;
|
||||||
|
},
|
||||||
|
clearPreFilter() {
|
||||||
|
this.clientCriteria = null;
|
||||||
|
this.preFilterMode = null;
|
||||||
|
this.reload = !this.reload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user