This commit is contained in:
2020-11-24 17:54:50 +00:00
parent 2e7a3f23ba
commit 6effcda8b6
4 changed files with 31 additions and 11 deletions

View File

@@ -6,8 +6,10 @@
<v-form ref="form" v-if="formState.ready">
<v-row>
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
<v-col cols="12" v-if="customername">
{{ customername }}
</v-col>
<v-col cols="12">
<v-textarea
v-model="obj.notes"
:readonly="formState.readOnly"
@@ -22,7 +24,7 @@
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
<v-col cols="12">
<gz-tag-picker
v-model="obj.tags"
:readonly="formState.readOnly"
@@ -65,7 +67,7 @@ export default {
vm.rights = window.$gz.role.getRights(window.$gz.type.Customer);
vm.formState.readOnly = !vm.rights.change;
window.$gz.eventBus.$on("menu-click", clickHandler);
this.customername = this.$route.params.customername;
//id 0 means create a new record don't load one
if (vm.$route.params.recordid != 0) {
//is there already an obj from a prior operation?
@@ -119,6 +121,7 @@ export default {
selectLists: {
usertypes: []
},
customername: undefined,
obj: {
//IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record
//I.E. Serial, usertype fields
@@ -126,7 +129,7 @@ export default {
id: 0,
concurrency: 0,
notes: null,
noteDate: null,
noteDate: window.$gz.locale.nowUTC8601String(),
tags: [],
customerId: undefined,
userId: undefined
@@ -409,7 +412,7 @@ function generateMenu(vm) {
let menuOptions = {
isMain: false,
icon: "$ayiClipboard",
title: "CustomerNoteNote",
title: "CustomerNoteNotes",
helpUrl: "form-customer-note",
formData: {
ayaType: window.$gz.type.CustomerNote,
@@ -486,7 +489,7 @@ async function initForm(vm) {
// Ensures UI translated text is available
//
async function fetchTranslatedText(vm) {
await window.$gz.translation.cacheTranslations(["CustomerNoteNote"]);
await window.$gz.translation.cacheTranslations(["CustomerNoteNotes"]);
}
</script>