This commit is contained in:
2021-08-13 22:23:50 +00:00
parent dcffa704ed
commit 066deafd70
6 changed files with 79 additions and 3 deletions

View File

@@ -526,7 +526,6 @@ todo:2 many biz objects are not using new PUT methodology
CURRENTLY DOING: odds and ends of migrate
todo: task group not migrating, should as it's a v8 feature, also there's a case about it 3438 dropping description field for tg
todo: head office customers link from menu exists but is not implemented, should show customers list filtered by that head office
todo: decide on purchase orders, yay or nay if nay then maybe need to make token po's for imported part requests?
@@ -870,5 +869,8 @@ BUILD 119
- Migrate utility server "url" label change to server "address" in label
- Migrate utility now parses out the part it needs from the user entered server url and re-constructs it into a valid url
this means the user can just copy and paste the v8 url they are testing with from the browser address bar and paste into the v8 migrate and it will work
- Migrate TaskGroups implemented
- Workorder/Quote/PM forms now all have link to Task Groups list in their main menus

View File

@@ -16,6 +16,9 @@
:reload="reload"
@selection-change="handleSelected"
data-cy="customersTable"
:client-criteria="clientCriteria"
:pre-filter-mode="preFilterMode"
@clear-pre-filter="clearPreFilter"
>
</gz-data-table>
</div>
@@ -27,6 +30,27 @@ export default {
created() {
this.rights = window.$gz.role.getRights(window.$gz.type.Customer);
window.$gz.eventBus.$on("menu-click", clickHandler);
//------ pre-filter ----
//OPTIONAL "Show All customers of head office" 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
};
}
//------ /pre-filter ----
generateMenu(this);
},
beforeDestroy() {
@@ -37,12 +61,19 @@ export default {
rights: window.$gz.role.defaultRightsObject(),
aType: window.$gz.type.Customer,
selectedItems: [],
reload: false
reload: false,
clientCriteria: undefined,
preFilterMode: null
};
},
methods: {
handleSelected(selected) {
this.selectedItems = selected;
},
clearPreFilter() {
this.clientCriteria = null;
this.preFilterMode = null;
this.reload = !this.reload;
}
}
};

View File

@@ -1286,7 +1286,16 @@ async function clickHandler(menuItem) {
postCode: m.vm.obj.postCode
});
break;
case "CustomerList":
m.vm.$router.push({
name: "cust-customers",
params: {
aType: m.vm.ayaType,
objectId: m.vm.obj.id,
name: m.vm.obj.name
}
});
break;
default:
window.$gz.eventBus.$emit(
"notify-warning",

View File

@@ -1749,6 +1749,11 @@ async function clickHandler(menuItem) {
name: "svc-work-order-item-priorities"
});
break;
case "taskgroupslist":
m.vm.$router.push({
name: "svc-task-groups"
});
break;
case "pm":
window.$gz.eventBus.$emit("openobject", {
type: window.$gz.type.PM,
@@ -1906,6 +1911,12 @@ function generateMenu(vm) {
key: FORM_KEY + ":prioritylist",
vm: vm
});
menuOptions.menuItems.push({
title: "TaskGroupList",
icon: "$ayiTasks",
key: FORM_KEY + ":taskgroupslist",
vm: vm
});
}
menuOptions.menuItems.push({ divider: true, inset: false });

View File

@@ -1828,6 +1828,11 @@ async function clickHandler(menuItem) {
name: "svc-work-order-item-priorities"
});
break;
case "taskgroupslist":
m.vm.$router.push({
name: "svc-task-groups"
});
break;
case "quote":
window.$gz.eventBus.$emit("openobject", {
type: window.$gz.type.Quote,
@@ -1990,6 +1995,12 @@ function generateMenu(vm) {
key: FORM_KEY + ":prioritylist",
vm: vm
});
menuOptions.menuItems.push({
title: "TaskGroupList",
icon: "$ayiTasks",
key: FORM_KEY + ":taskgroupslist",
vm: vm
});
}
menuOptions.menuItems.push({ divider: true, inset: false });

View File

@@ -1920,6 +1920,11 @@ async function clickHandler(menuItem) {
name: "svc-work-order-item-priorities"
});
break;
case "taskgroupslist":
m.vm.$router.push({
name: "svc-task-groups"
});
break;
case "quote":
window.$gz.eventBus.$emit("openobject", {
type: window.$gz.type.Quote,
@@ -2082,6 +2087,13 @@ function generateMenu(vm) {
key: FORM_KEY + ":prioritylist",
vm: vm
});
menuOptions.menuItems.push({
title: "TaskGroupList",
icon: "$ayiTasks",
key: FORM_KEY + ":taskgroupslist",
vm: vm
});
}
menuOptions.menuItems.push({ divider: true, inset: false });