This commit is contained in:
@@ -586,7 +586,7 @@ export default {
|
|||||||
objectName = this.$ay.t("WorkOrder");
|
objectName = this.$ay.t("WorkOrder");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return this.$ay.t("TaggedWith");
|
||||||
}
|
}
|
||||||
return objectName + " - " + this.$ay.t("TaggedWith");
|
return objectName + " - " + this.$ay.t("TaggedWith");
|
||||||
},
|
},
|
||||||
@@ -730,6 +730,32 @@ export default {
|
|||||||
this.formState.loading = false;
|
this.formState.loading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async who() {
|
||||||
|
try {
|
||||||
|
this.formState.loading = true;
|
||||||
|
if (this.$route.params.recordid == 0) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||||
|
const res = await window.$gz.api.post(
|
||||||
|
API_BASE_URL + "who",
|
||||||
|
this.obj.customerTags
|
||||||
|
);
|
||||||
|
if (res.error) {
|
||||||
|
this.formState.serverError = res.error;
|
||||||
|
window.$gz.form.setErrorBoxErrors(this);
|
||||||
|
} else {
|
||||||
|
//todo: show in popup list here
|
||||||
|
console.log(res.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
window.$gz.errorHandler.handleFormError(ex, this);
|
||||||
|
} finally {
|
||||||
|
this.formState.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
duplicate() {
|
duplicate() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "cust-notify-subscription",
|
name: "cust-notify-subscription",
|
||||||
@@ -767,6 +793,9 @@ async function clickHandler(menuItem) {
|
|||||||
case "duplicate":
|
case "duplicate":
|
||||||
m.vm.duplicate();
|
m.vm.duplicate();
|
||||||
break;
|
break;
|
||||||
|
case "who":
|
||||||
|
m.vm.who();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
"notify-warning",
|
||||||
@@ -830,6 +859,17 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.rights.change && vm.$route.params.recordid != 0) {
|
||||||
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "WhoWillBeNotified",
|
||||||
|
icon: null,
|
||||||
|
key: FORM_KEY + ":who",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
}
|
}
|
||||||
@@ -870,7 +910,8 @@ async function fetchTranslatedText() {
|
|||||||
"Translation",
|
"Translation",
|
||||||
"CustomerServiceRequest",
|
"CustomerServiceRequest",
|
||||||
"WorkOrder",
|
"WorkOrder",
|
||||||
"Quote"
|
"Quote",
|
||||||
|
"WhoWillBeNotified"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user