This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user