This commit is contained in:
@@ -18,6 +18,14 @@
|
||||
<v-flex v-if="item.type" :key="item.fld" xs12 sm6 lg4 xl3 px-2>
|
||||
<div v-if="item.type === 'date'">
|
||||
DATE CONTROL HERE
|
||||
<gz-date-time-picker
|
||||
:label="this.$gzlocale.get('item.fld')"
|
||||
v-model="obj.startDate"
|
||||
:readonly="this.formState.readOnly"
|
||||
ref="startDate"
|
||||
:error-messages="this.$gzform.serverErrors(this, 'startDate')"
|
||||
@change="onChange('startDate')"
|
||||
></gz-date-time-picker>
|
||||
</div>
|
||||
<div v-else-if="item.type === 'text'">
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user