This commit is contained in:
@@ -424,8 +424,6 @@ todo: many biz objects are not using new PUT methodology
|
||||
CURRENTLY DOING: more misc stuff below to complete workorder!!!
|
||||
|
||||
|
||||
|
||||
|
||||
todo: customer->show all units not coded yet! Gasp! So shock, much freaky
|
||||
|
||||
CASES TODO:
|
||||
|
||||
@@ -1409,6 +1409,16 @@ async function clickHandler(menuItem) {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "UnitList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-units",
|
||||
params: {
|
||||
aType: m.vm.ayaType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -1513,7 +1523,6 @@ function generateMenu(vm) {
|
||||
vm: vm
|
||||
});
|
||||
|
||||
//MIGRATE_OUTSTANDING show all: unitlist, quotelist, pmlist
|
||||
menuOptions.menuItems.push({
|
||||
title: "UnitList",
|
||||
icon: "$ayiFan",
|
||||
@@ -1521,6 +1530,7 @@ function generateMenu(vm) {
|
||||
vm: vm
|
||||
});
|
||||
|
||||
//MIGRATE_OUTSTANDING show all: unitlist, quotelist, pmlist
|
||||
menuOptions.menuItems.push({
|
||||
title: "QuoteList",
|
||||
icon: "$ayiPencilAlt",
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
:reload="reload"
|
||||
@selection-change="handleSelected"
|
||||
data-cy="unitsTable"
|
||||
:client-criteria="clientCriteria"
|
||||
:pre-filter-mode="preFilterMode"
|
||||
@clear-pre-filter="clearPreFilter"
|
||||
>
|
||||
</gz-data-table>
|
||||
</div>
|
||||
@@ -26,6 +29,27 @@ export default {
|
||||
created() {
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.Unit);
|
||||
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);
|
||||
},
|
||||
beforeDestroy() {
|
||||
@@ -36,12 +60,22 @@ export default {
|
||||
rights: window.$gz.role.defaultRightsObject(),
|
||||
aType: window.$gz.type.Unit,
|
||||
selectedItems: [],
|
||||
reload: false
|
||||
reload: false,
|
||||
clientCriteria: undefined,
|
||||
preFilterMode: null,
|
||||
objectId: null,
|
||||
aForType: null,
|
||||
name: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSelected(selected) {
|
||||
this.selectedItems = selected;
|
||||
},
|
||||
clearPreFilter() {
|
||||
this.clientCriteria = null;
|
||||
this.preFilterMode = null;
|
||||
this.reload = !this.reload;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user