This commit is contained in:
2021-07-26 19:41:31 +00:00
parent 3f1c3da02c
commit 77a88a1b0c

View File

@@ -54,6 +54,7 @@ export default {
}
} else {
switch (tid.type) {
//### WORKORDER AND RELATIVES #######
case ayatype.WorkOrderItem:
case ayatype.WorkOrderItemExpense:
case ayatype.WorkOrderItemLabor:
@@ -98,6 +99,52 @@ export default {
params: { recordid: tid.id, gotype: tid.gotype, goid: tid.goid }
});
break;
//### QUOTE AND RELATIVES ###
case ayatype.QuoteItem:
case ayatype.QuoteItemExpense:
case ayatype.QuoteItemLabor:
case ayatype.QuoteItemLoan:
case ayatype.QuoteItemOutsideService:
case ayatype.QuoteItemPart:
case ayatype.QuoteItemPartRequest:
case ayatype.QuoteItemScheduledUser:
case ayatype.QuoteItemTask:
case ayatype.QuoteItemTravel:
case ayatype.QuoteItemUnit:
(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.Quote,
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.Quote:
vm.$router.push({
name: "quote-edit",
params: { recordid: tid.id, gotype: tid.gotype, goid: tid.goid }
});
break;
case ayatype.Memo:
vm.$router.push({
name: "memo-edit",