This commit is contained in:
2021-02-09 18:57:27 +00:00
parent ced339eac5
commit bf80df7354
3 changed files with 13 additions and 15 deletions

View File

@@ -8,9 +8,6 @@
MISC ITEMS THAT CAME UP
todo: tagpicker, don't like how it works, it's funky to enter multiple tags and input doesn't go away when you select it just leaves the typed text there
once a selection is made it should not repeat the typed text again, it shoudl be ready to type another tag from start
todo: enabled first custom field for customer and got weird error about mutating a prop directly but then it just worked as if no problem ?
todo: check timeout algorithm for notification checking, when server is down it seems to top out at 10 minutes delay, but that seems short if the server is down all night and it's checking constantly or something
** IMPORTANT todo: double check concurrency code with Customer or Project just to be sure, it has been changed but not sure if it was ever properly tested.

View File

@@ -208,10 +208,13 @@ export default {
default: "{}",
type: String
},
formKey: String, //used to grab template from store
formKey: { type: String, default: "" }, //used to grab template from store
readonly: Boolean,
disabled: Boolean,
parentVM: Object
parentVM: {
default: null,
type: Object
}
},
methods: {
@@ -238,13 +241,11 @@ export default {
return template.find(z => z.type != undefined);
},
GetValueForField: function(dataKey) {
if (this.value == null) {
//return null;
this.value = "{}";
}
let cData = {};
//get the data out of the JSON string value
let cData = JSON.parse(this.value);
if (this.value != null) {
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
@@ -334,10 +335,11 @@ export default {
SetValueForField: function(dataKey, newValue) {
//Get the current data out of the json string value
//
if (this.value == null) {
this.value = "{}";
let cData = {};
if (this.value != null) {
cData = JSON.parse(this.value);
}
let cData = JSON.parse(this.value);
if (!window.$gz.util.has(cData, dataKey)) {
cData[dataKey] = null;
}

View File

@@ -102,7 +102,6 @@ export default {
return true;
},
input(e) {
console.log("input", e);
this.tagSearchEntry = "";
this.$emit("input", e);
},