This commit is contained in:
2021-07-28 19:09:37 +00:00
parent eada6c9ace
commit ed0e7dc77c
23 changed files with 12453 additions and 113 deletions

View File

@@ -330,16 +330,6 @@ function initNavPanel() {
});
}
// //WORKORDER TEMPLATES LIST
//this will be an item inside the workorders NEW menu or grid or wherever but it's not top level worthy
//there used to be an array for 3rd level shit but that's whack yo! ;)
// subSub.push({
// title: "WorkOrderServiceTemplate",
// icon: "fa - stamp",
// route: "/svc-workorder-templates",
// key: key++
// });
//QUOTE LIST
if (window.$gz.role.canOpen(window.$gz.type.Quote)) {
sub.push({
@@ -355,7 +345,7 @@ function initNavPanel() {
sub.push({
title: "PMList",
icon: "$ayiBusinessTime",
route: "/svc-pm-list",
route: "/svc-pms",
key: key++
});
}

View File

@@ -145,6 +145,52 @@ export default {
});
break;
//### PM AND RELATIVES ###
case ayatype.PMItem:
case ayatype.PMItemExpense:
case ayatype.PMItemLabor:
case ayatype.PMItemLoan:
case ayatype.PMItemOutsideService:
case ayatype.PMItemPart:
case ayatype.PMItemPartRequest:
case ayatype.PMItemScheduledUser:
case ayatype.PMItemTask:
case ayatype.PMItemTravel:
case ayatype.PMItemUnit:
(async () => {
try {
let res = await window.$gz.api.get(
`search/ancestor/${tid.type}/${tid.id}`
);
if (res.error) {
throw new Error(
window.$gz.errorHandler.errorToString(res, vm)
);
}
if (res.data.id && res.data.id != 0) {
this.handleOpenObjectClick(vm, {
type: ayatype.PM,
id: res.data.id,
gotype: tid.type,
goid: tid.id
});
return;
}
} catch (e) {
//throw new Error(e);
throw new Error(window.$gz.errorHandler.errorToString(e, vm));
}
})();
break;
case ayatype.PM:
vm.$router.push({
name: "pm-edit",
params: { recordid: tid.id, gotype: tid.gotype, goid: tid.goid }
});
break;
case ayatype.Memo:
vm.$router.push({
name: "memo-edit",