This commit is contained in:
@@ -178,6 +178,16 @@ export default {
|
||||
.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
|
||||
// and return date only portion only in iso 8601
|
||||
// format (used by time and date picker components)
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
ref="extensions"
|
||||
>
|
||||
</gz-extensions>
|
||||
|
||||
{{ customername }}
|
||||
|
||||
<gz-data-table
|
||||
ref="gzdatatable"
|
||||
formKey="customer-note-list"
|
||||
@@ -31,7 +34,7 @@ const FORM_KEY = "cust-customer-notes";
|
||||
|
||||
export default {
|
||||
created() {
|
||||
//this.dataListKey = this.$route.params.dataListKey;
|
||||
this.customername = this.$route.params.customername;
|
||||
this.customerId = this.$route.params.customerid;
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.Customer);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
@@ -43,6 +46,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
customerId: undefined,
|
||||
customername: undefined,
|
||||
currentListViewId: 1,
|
||||
dataListKey: "CustomerNoteDataList",
|
||||
dataListFilter: "",
|
||||
@@ -72,7 +76,11 @@ async function clickHandler(menuItem) {
|
||||
case "new":
|
||||
m.vm.$router.push({
|
||||
name: "customer-note-edit",
|
||||
params: { recordid: 0, customerid: m.vm.customerId }
|
||||
params: {
|
||||
recordid: 0,
|
||||
customerid: m.vm.customerId,
|
||||
customername: m.vm.customername
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "extensions":
|
||||
|
||||
@@ -1402,10 +1402,9 @@ async function clickHandler(menuItem) {
|
||||
});
|
||||
break;
|
||||
case "CustomerNoteList":
|
||||
|
||||
m.vm.$router.push({
|
||||
name: "customer-notes",
|
||||
params: { customerid: m.vm.obj.id }
|
||||
params: { customerid: m.vm.obj.id, customername: m.vm.obj.name }
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user