This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export default {
|
||||
version: "8.0.0-alpha.114",
|
||||
version: "8.0.0-alpha.115",
|
||||
copyright: "© 1999-2021, Ground Zero Tech-Works Inc."
|
||||
};
|
||||
|
||||
@@ -1399,6 +1399,16 @@ async function clickHandler(menuItem) {
|
||||
params: { customerid: m.vm.obj.id, customername: m.vm.obj.name }
|
||||
});
|
||||
break;
|
||||
case "WorkOrderList":
|
||||
m.vm.$router.push({
|
||||
name: "svc-workorders",
|
||||
params: {
|
||||
aType: m.vm.ayaType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
:reload="reload"
|
||||
@selection-change="handleSelected"
|
||||
data-cy="workordersTable"
|
||||
:client-criteria="clientCriteria"
|
||||
:pre-filter-mode="preFilterMode"
|
||||
@clear-pre-filter="clearPreFilter"
|
||||
>
|
||||
</gz-data-table>
|
||||
</div>
|
||||
@@ -65,6 +68,25 @@ export default {
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.WorkOrder);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
await fetchTranslatedText();
|
||||
|
||||
//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
|
||||
};
|
||||
}
|
||||
generateMenu(this);
|
||||
},
|
||||
beforeDestroy() {
|
||||
@@ -77,13 +99,23 @@ export default {
|
||||
selectedItems: [],
|
||||
reload: false,
|
||||
openDialog: false,
|
||||
openWoNumber: null
|
||||
openWoNumber: null,
|
||||
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;
|
||||
},
|
||||
|
||||
async openWo() {
|
||||
if (!this.openWoNumber) {
|
||||
|
||||
Reference in New Issue
Block a user