case 3979

This commit is contained in:
2021-09-25 00:07:45 +00:00
parent 0b4c9e3ea8
commit fc9b136196
2 changed files with 23 additions and 20 deletions

View File

@@ -245,6 +245,7 @@
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn }}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
> >
<div ref="topform"></div> <div ref="topform"></div>
<v-col <v-col
v-if="value.items[activeItemIndex].fromCSRId != null" v-if="value.items[activeItemIndex].fromCSRId != null"
cols="12" cols="12"

View File

@@ -155,7 +155,6 @@ export default {
customFields: "{}", customFields: "{}",
tags: [], tags: [],
workOrderId: null, workOrderId: null,
fromCSRId: null,
techNotes: null, techNotes: null,
workOrderItemStatusId: null, workOrderItemStatusId: null,
workOrderItemPriorityId: null, workOrderItemPriorityId: null,
@@ -835,7 +834,10 @@ export default {
wi.concurrency = 0; wi.concurrency = 0;
wi.uid = Date.now(); wi.uid = Date.now();
wi.isDirty = true; wi.isDirty = true;
wi.fromCSRId = null; if (!wi.keepCSR) {
//workaround so when sent from CSR it doesn't erase it
wi.fromCSRId = null;
}
if (wi.partRequests) { if (wi.partRequests) {
wi.partRequests.splice(0); wi.partRequests.splice(0);
} }
@@ -1990,12 +1992,12 @@ async function clickHandler(menuItem) {
id: m.vm.obj.fromPMId id: m.vm.obj.fromPMId
}); });
break; break;
case "csr": // case "csr":
window.$gz.eventBus.$emit("openobject", { // window.$gz.eventBus.$emit("openobject", {
type: window.$gz.type.CustomerServiceRequest, // type: window.$gz.type.CustomerServiceRequest,
id: m.vm.obj.fromCSRId // id: m.vm.obj.fromCSRId
}); // });
break; // break;
default: default:
window.$gz.eventBus.$emit( window.$gz.eventBus.$emit(
"notify-warning", "notify-warning",
@@ -2175,18 +2177,18 @@ function generateMenu(vm) {
}); });
hasFromInsertDivider = true; hasFromInsertDivider = true;
} }
if ( // if (
vm.obj.fromCSRId != null && // vm.obj.fromCSRId != null &&
window.$gz.role.canOpen(window.$gz.type.CustomerServiceRequest) // window.$gz.role.canOpen(window.$gz.type.CustomerServiceRequest)
) { // ) {
menuOptions.menuItems.push({ // menuOptions.menuItems.push({
title: "CustomerServiceRequest", // title: "CustomerServiceRequest",
icon: "$ayiConciergeBell", // icon: "$ayiConciergeBell",
key: FORM_KEY + ":csr", // key: FORM_KEY + ":csr",
vm: vm // vm: vm
}); // });
hasFromInsertDivider = true; // hasFromInsertDivider = true;
} // }
if (hasFromInsertDivider) { if (hasFromInsertDivider) {
menuOptions.menuItems.push({ divider: true, inset: false }); menuOptions.menuItems.push({ divider: true, inset: false });