This commit is contained in:
2020-04-02 14:21:16 +00:00
parent a81ee7d204
commit 79d52064f3
7 changed files with 89 additions and 89 deletions

View File

@@ -182,7 +182,7 @@ export default {
}
},
templateHasVisibleCustomFields() {
var template = this.$store.state.formCustomTemplate[this.formKey];
let template = this.$store.state.formCustomTemplate[this.formKey];
if (template == undefined) {
return false;
}
@@ -195,7 +195,7 @@ export default {
}
//get the data out of the JSON string value
var cData = JSON.parse(this.value);
let cData = JSON.parse(this.value);
//Custom field types can be changed by the user and cause old entered data to be invalid for that field type
//Here we need to take action if the data is of an incompatible type for the control field type and attempt to coerce or simply nullify if not co-ercable the data
@@ -206,13 +206,13 @@ export default {
//Get the field data type
//https://lodash.com/docs#find
var ctrlType = window.$gz._.find(
let ctrlType = window.$gz._.find(
this.$store.state.formCustomTemplate[this.formKey],
["dataKey", dataKey]
).type;
//First get current value for the data that came from the server
var ret = cData[dataKey];
let ret = cData[dataKey];
//Only process if value is non-null since all control types can handle null
if (ret != null) {
//check types that matter
@@ -279,7 +279,7 @@ export default {
SetValueForField: function(dataKey, newValue) {
//Get the current data out of the json string value
//
var cData = JSON.parse(this.value);
let cData = JSON.parse(this.value);
if (!window.$gz._.has(cData, dataKey)) {
cData[dataKey] = null;
}
@@ -293,7 +293,7 @@ export default {
}
//emit the new data so it syncs with the parent source
var ret = JSON.stringify(cData);
let ret = JSON.stringify(cData);
this.$emit("input", ret);
}
},