This commit is contained in:
@@ -420,12 +420,11 @@ todo: many biz objects are not using new PUT methodology
|
|||||||
|
|
||||||
CURRENTLY DOING:
|
CURRENTLY DOING:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
todo 2: Implement "Show All" feature for related objects
|
todo 2: Implement "Show All" feature for related objects
|
||||||
also add a Show all workorders for Tech User's in their menu so they can see their own workorders at a glance
|
also add a Show all workorders for Tech User's in their menu so they can see their own workorders at a glance
|
||||||
actually, there's a *lot* of these potentiall e.g. WorkorderItemParts filtered from Part menu etc etc
|
actually, there's a *lot* of these potentiall e.g. WorkorderItemParts filtered from Part menu etc etc
|
||||||
I guess literally everything that is a sublist should have a filter on it's parent type that it's tracking (loanunit, schedusers, labor you fucking name it)
|
I guess literally everything that is a sublist should have a filter on it's parent type that it's tracking (loanunit, schedusers, labor you fucking name it)
|
||||||
|
(In v7 it was Client, LoanItem and Unit only)
|
||||||
|
|
||||||
todo 1: "DispatchFull" and "DispatchLimited" roles MUST be renamed to "ServiceFull" and "ServiceLimited" to match other roles and intent
|
todo 1: "DispatchFull" and "DispatchLimited" roles MUST be renamed to "ServiceFull" and "ServiceLimited" to match other roles and intent
|
||||||
dispatch is a subset of a service manager job
|
dispatch is a subset of a service manager job
|
||||||
|
|||||||
@@ -816,7 +816,16 @@ async function clickHandler(menuItem) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "WorkOrderList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "svc-workorder-item-loans",
|
||||||
|
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",
|
||||||
@@ -907,6 +916,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
//---- SHOW ALL ---
|
//---- SHOW ALL ---
|
||||||
//MIGRATE_OUTSTANDING show all: workorderlist, quotelist, pmlist
|
//MIGRATE_OUTSTANDING show all: workorderlist, quotelist, pmlist
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "WorkOrderList",
|
title: "WorkOrderList",
|
||||||
icon: "$ayiTools",
|
icon: "$ayiTools",
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
:reload="reload"
|
:reload="reload"
|
||||||
@selection-change="handleSelected"
|
@selection-change="handleSelected"
|
||||||
data-cy="WorkOrderItemLoansTable"
|
data-cy="WorkOrderItemLoansTable"
|
||||||
|
: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.WorkOrderItemLoan,
|
aType: window.$gz.type.WorkOrderItemLoan,
|
||||||
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