diff --git a/ayanova/src/components/custom-fields-control.vue b/ayanova/src/components/custom-fields-control.vue index 77e5ff5f..1a9935b7 100644 --- a/ayanova/src/components/custom-fields-control.vue +++ b/ayanova/src/components/custom-fields-control.vue @@ -18,6 +18,14 @@
DATE CONTROL HERE +
TEXT CONTROL HERE @@ -61,6 +69,7 @@ { "fld": "WidgetCustom2", "hide": "false", "required": "true", "type": "text" }, { "fld": "WidgetCustom3", "hide": "false", "required": "false", "type": "int" }, { "fld": "WidgetCustom4", "hide": "false", "required": "false", "type": "bool" }, { "fld": "WidgetCustom5", "hide": "false", "required": "false", "type": "decimal" } ] * 3) bind to the data somehow (might have to warp the data to fit the controls in some cases due to changed template design) + - computed properties that sit above the json and translate into and out of it, custom1, custom2 etc. If empty then it's just empty. * 4) Profit$ * */ @@ -82,7 +91,34 @@ export default { this.$emit("change", val); } }, - + computed: { + todo: make this work with a text field first to make life easier and get the concept rolling then extend out + custom1: { + get: function() { + //TODO: move all this functionality to quick easy methods to call for each custom type + //get the cx name of this field + //get the type of this field expected from the store template + //get the value in the json, co-erce it to the expected type and return it + }, + set: function(newValue) { + //get the cx name of this field + //store the value in the json or update it with the textual representation of this field's data + //might need to mark dirty as well or push an event of change? + } + }, + custom2: { + get: function() { + //get the cx name of this field + //get the type of this field expected from the store template + //get the value in the json, co-erce it to the expected type and return it + }, + set: function(newValue) { + //get the cx name of this field + //store the value in the json or update it with the textual representation of this field's data + //might need to mark dirty as well or push an event of change? + } + } + }, methods: {}, beforeCreate() { //check pre-requisites exist just in case