PM Dawn
This commit is contained in:
@@ -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++
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user