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!!!
|
CURRENTLY DOING: more misc stuff below to complete workorder!!!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
todo: customer->show all units not coded yet! Gasp! So shock, much freaky
|
todo: customer->show all units not coded yet! Gasp! So shock, much freaky
|
||||||
|
|
||||||
CASES TODO:
|
CASES TODO:
|
||||||
|
|||||||
@@ -1409,6 +1409,16 @@ async function clickHandler(menuItem) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
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:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
"notify-warning",
|
||||||
@@ -1513,7 +1523,6 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
//MIGRATE_OUTSTANDING show all: unitlist, quotelist, pmlist
|
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "UnitList",
|
title: "UnitList",
|
||||||
icon: "$ayiFan",
|
icon: "$ayiFan",
|
||||||
@@ -1521,6 +1530,7 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//MIGRATE_OUTSTANDING show all: unitlist, quotelist, pmlist
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "QuoteList",
|
title: "QuoteList",
|
||||||
icon: "$ayiPencilAlt",
|
icon: "$ayiPencilAlt",
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
:reload="reload"
|
:reload="reload"
|
||||||
@selection-change="handleSelected"
|
@selection-change="handleSelected"
|
||||||
data-cy="unitsTable"
|
data-cy="unitsTable"
|
||||||
|
:client-criteria="clientCriteria"
|
||||||
|
:pre-filter-mode="preFilterMode"
|
||||||
|
@clear-pre-filter="clearPreFilter"
|
||||||
>
|
>
|
||||||
</gz-data-table>
|
</gz-data-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,6 +29,27 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.rights = window.$gz.role.getRights(window.$gz.type.Unit);
|
this.rights = window.$gz.role.getRights(window.$gz.type.Unit);
|
||||||
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 +60,22 @@ export default {
|
|||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
aType: window.$gz.type.Unit,
|
aType: window.$gz.type.Unit,
|
||||||
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