This commit is contained in:
@@ -178,6 +178,16 @@ export default {
|
|||||||
.toISO(); //output as ISO 8601
|
.toISO(); //output as ISO 8601
|
||||||
},
|
},
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
// UTC Now in api format
|
||||||
|
// to UTC and output as ISO 8601
|
||||||
|
// (used to set defaults)
|
||||||
|
//
|
||||||
|
nowUTC8601String() {
|
||||||
|
return window.$gz.DateTime.local()
|
||||||
|
.toUTC()
|
||||||
|
.toString();
|
||||||
|
},
|
||||||
|
///////////////////////////////////////////////
|
||||||
// Convert a utc date to local time zone
|
// Convert a utc date to local time zone
|
||||||
// and return date only portion only in iso 8601
|
// and return date only portion only in iso 8601
|
||||||
// format (used by time and date picker components)
|
// format (used by time and date picker components)
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
<v-form ref="form" v-if="formState.ready">
|
<v-form ref="form" v-if="formState.ready">
|
||||||
<v-row>
|
<v-row>
|
||||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||||
|
<v-col cols="12" v-if="customername">
|
||||||
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
{{ customername }}
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12">
|
||||||
<v-textarea
|
<v-textarea
|
||||||
v-model="obj.notes"
|
v-model="obj.notes"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
@@ -22,7 +24,7 @@
|
|||||||
></v-textarea>
|
></v-textarea>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
<v-col cols="12">
|
||||||
<gz-tag-picker
|
<gz-tag-picker
|
||||||
v-model="obj.tags"
|
v-model="obj.tags"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
@@ -65,7 +67,7 @@ export default {
|
|||||||
vm.rights = window.$gz.role.getRights(window.$gz.type.Customer);
|
vm.rights = window.$gz.role.getRights(window.$gz.type.Customer);
|
||||||
vm.formState.readOnly = !vm.rights.change;
|
vm.formState.readOnly = !vm.rights.change;
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
|
this.customername = this.$route.params.customername;
|
||||||
//id 0 means create a new record don't load one
|
//id 0 means create a new record don't load one
|
||||||
if (vm.$route.params.recordid != 0) {
|
if (vm.$route.params.recordid != 0) {
|
||||||
//is there already an obj from a prior operation?
|
//is there already an obj from a prior operation?
|
||||||
@@ -119,6 +121,7 @@ export default {
|
|||||||
selectLists: {
|
selectLists: {
|
||||||
usertypes: []
|
usertypes: []
|
||||||
},
|
},
|
||||||
|
customername: undefined,
|
||||||
obj: {
|
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
|
//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
|
//I.E. Serial, usertype fields
|
||||||
@@ -126,7 +129,7 @@ export default {
|
|||||||
id: 0,
|
id: 0,
|
||||||
concurrency: 0,
|
concurrency: 0,
|
||||||
notes: null,
|
notes: null,
|
||||||
noteDate: null,
|
noteDate: window.$gz.locale.nowUTC8601String(),
|
||||||
tags: [],
|
tags: [],
|
||||||
customerId: undefined,
|
customerId: undefined,
|
||||||
userId: undefined
|
userId: undefined
|
||||||
@@ -409,7 +412,7 @@ function generateMenu(vm) {
|
|||||||
let menuOptions = {
|
let menuOptions = {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
icon: "$ayiClipboard",
|
icon: "$ayiClipboard",
|
||||||
title: "CustomerNoteNote",
|
title: "CustomerNoteNotes",
|
||||||
helpUrl: "form-customer-note",
|
helpUrl: "form-customer-note",
|
||||||
formData: {
|
formData: {
|
||||||
ayaType: window.$gz.type.CustomerNote,
|
ayaType: window.$gz.type.CustomerNote,
|
||||||
@@ -486,7 +489,7 @@ async function initForm(vm) {
|
|||||||
// Ensures UI translated text is available
|
// Ensures UI translated text is available
|
||||||
//
|
//
|
||||||
async function fetchTranslatedText(vm) {
|
async function fetchTranslatedText(vm) {
|
||||||
await window.$gz.translation.cacheTranslations(["CustomerNoteNote"]);
|
await window.$gz.translation.cacheTranslations(["CustomerNoteNotes"]);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
ref="extensions"
|
ref="extensions"
|
||||||
>
|
>
|
||||||
</gz-extensions>
|
</gz-extensions>
|
||||||
|
|
||||||
|
{{ customername }}
|
||||||
|
|
||||||
<gz-data-table
|
<gz-data-table
|
||||||
ref="gzdatatable"
|
ref="gzdatatable"
|
||||||
formKey="customer-note-list"
|
formKey="customer-note-list"
|
||||||
@@ -31,7 +34,7 @@ const FORM_KEY = "cust-customer-notes";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
//this.dataListKey = this.$route.params.dataListKey;
|
this.customername = this.$route.params.customername;
|
||||||
this.customerId = this.$route.params.customerid;
|
this.customerId = this.$route.params.customerid;
|
||||||
this.rights = window.$gz.role.getRights(window.$gz.type.Customer);
|
this.rights = window.$gz.role.getRights(window.$gz.type.Customer);
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
@@ -43,6 +46,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
customerId: undefined,
|
customerId: undefined,
|
||||||
|
customername: undefined,
|
||||||
currentListViewId: 1,
|
currentListViewId: 1,
|
||||||
dataListKey: "CustomerNoteDataList",
|
dataListKey: "CustomerNoteDataList",
|
||||||
dataListFilter: "",
|
dataListFilter: "",
|
||||||
@@ -72,7 +76,11 @@ async function clickHandler(menuItem) {
|
|||||||
case "new":
|
case "new":
|
||||||
m.vm.$router.push({
|
m.vm.$router.push({
|
||||||
name: "customer-note-edit",
|
name: "customer-note-edit",
|
||||||
params: { recordid: 0, customerid: m.vm.customerId }
|
params: {
|
||||||
|
recordid: 0,
|
||||||
|
customerid: m.vm.customerId,
|
||||||
|
customername: m.vm.customername
|
||||||
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "extensions":
|
case "extensions":
|
||||||
|
|||||||
@@ -1402,10 +1402,9 @@ async function clickHandler(menuItem) {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "CustomerNoteList":
|
case "CustomerNoteList":
|
||||||
|
|
||||||
m.vm.$router.push({
|
m.vm.$router.push({
|
||||||
name: "customer-notes",
|
name: "customer-notes",
|
||||||
params: { customerid: m.vm.obj.id }
|
params: { customerid: m.vm.obj.id, customername: m.vm.obj.name }
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user