diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index e28e93c0..9573d7b3 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -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 + diff --git a/ayanova/src/views/cust-customers.vue b/ayanova/src/views/cust-customers.vue index f170e1f6..4e9f6e43 100644 --- a/ayanova/src/views/cust-customers.vue +++ b/ayanova/src/views/cust-customers.vue @@ -16,6 +16,9 @@ :reload="reload" @selection-change="handleSelected" data-cy="customersTable" + :client-criteria="clientCriteria" + :pre-filter-mode="preFilterMode" + @clear-pre-filter="clearPreFilter" > @@ -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; } } }; diff --git a/ayanova/src/views/cust-head-office.vue b/ayanova/src/views/cust-head-office.vue index ccead1e9..1c65352b 100644 --- a/ayanova/src/views/cust-head-office.vue +++ b/ayanova/src/views/cust-head-office.vue @@ -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", diff --git a/ayanova/src/views/svc-pm.vue b/ayanova/src/views/svc-pm.vue index 991d3d76..6fb8f7b7 100644 --- a/ayanova/src/views/svc-pm.vue +++ b/ayanova/src/views/svc-pm.vue @@ -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 }); diff --git a/ayanova/src/views/svc-quote.vue b/ayanova/src/views/svc-quote.vue index 24743df7..0aa6362d 100644 --- a/ayanova/src/views/svc-quote.vue +++ b/ayanova/src/views/svc-quote.vue @@ -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 }); diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index 71bcf956..468d2c62 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -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 });