This commit is contained in:
@@ -233,7 +233,9 @@ export default {
|
||||
return false;
|
||||
}
|
||||
//iterate template and see if it has any custom fields set to display
|
||||
return window.$gz._.find(template, "type") != undefined;
|
||||
//de-lodash
|
||||
//return window.$gz. _.find(template, "type") != undefined;
|
||||
return template.find(z => z.type != undefined);
|
||||
},
|
||||
GetValueForField: function(dataKey) {
|
||||
if (!this.value) {
|
||||
@@ -252,9 +254,13 @@ export default {
|
||||
|
||||
//Get the field data type
|
||||
//https://lodash.com/docs#find
|
||||
let ctrlType = window.$gz._.find(
|
||||
this.$store.state.formCustomTemplate[this.formKey],
|
||||
["dataKey", dataKey]
|
||||
// let ctrlType = window.$gz._.find(
|
||||
// this.$store.state.formCustomTemplate[this.formKey],
|
||||
// ["dataKey", dataKey]
|
||||
// ).type;
|
||||
|
||||
let ctrlType = this.$store.state.formCustomTemplate[this.formKey].find(
|
||||
z => z.dataKey == dataKey
|
||||
).type;
|
||||
|
||||
//First get current value for the data that came from the server
|
||||
@@ -327,7 +333,7 @@ export default {
|
||||
//Get the current data out of the json string value
|
||||
//
|
||||
let cData = JSON.parse(this.value);
|
||||
if (!window.$gz._.has(cData, dataKey)) {
|
||||
if (!window.$gz.util.has(cData, dataKey)) {
|
||||
cData[dataKey] = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user