This commit is contained in:
@@ -586,7 +586,7 @@ export default {
|
||||
objectName = this.$ay.t("WorkOrder");
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
return this.$ay.t("TaggedWith");
|
||||
}
|
||||
return objectName + " - " + this.$ay.t("TaggedWith");
|
||||
},
|
||||
@@ -730,6 +730,32 @@ export default {
|
||||
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() {
|
||||
this.$router.push({
|
||||
name: "cust-notify-subscription",
|
||||
@@ -767,6 +793,9 @@ async function clickHandler(menuItem) {
|
||||
case "duplicate":
|
||||
m.vm.duplicate();
|
||||
break;
|
||||
case "who":
|
||||
m.vm.who();
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -830,6 +859,17 @@ function generateMenu(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 });
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
@@ -870,7 +910,8 @@ async function fetchTranslatedText() {
|
||||
"Translation",
|
||||
"CustomerServiceRequest",
|
||||
"WorkOrder",
|
||||
"Quote"
|
||||
"Quote",
|
||||
"WhoWillBeNotified"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user