This commit is contained in:
2019-07-17 23:37:09 +00:00
parent c7fdde0b7b
commit c9b935e03d

View File

@@ -13,11 +13,13 @@
</div>
<hr />
<div>
<template v-for="item in this.$store.state.formCustomTemplate[formKey]">
<span :key="item.fld">
[{{ item.type }}]
</span>
</template>
<v-layout align-center justify-left row wrap>
<template v-for="item in this.$store.state.formCustomTemplate[formKey]">
<v-flex v-if="item.type" :key="item.fld" xs12 sm6 lg4 xl3 px-2>
[{{ item.type }}]
</v-flex>
</template>
</v-layout>
</div>
</div>
</template>
@@ -31,8 +33,15 @@
* TODO: have the template, have the custom field data, now just need to show it all properly and update the fragment of json when changes made which then updates the
* parent object.
*
* 1) read the template
* 1) read the template, extract out only the Custom fields, use pattern XXXXCustomXXX to match? Nope, if it has a "type" then it's custom for sure.
*
* 2) Generate the controls dynamically based on the template
* Possible types are:
* ret.Add(AyDataType.Date);
ret.Add(AyDataType.Text);
ret.Add(AyDataType.Integer);
ret.Add(AyDataType.Bool);
ret.Add(AyDataType.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)
* 4) Profit$
*
@@ -70,7 +79,7 @@ export default {
},
created() {
if (this.$gzdevmode()) {
debugger;
//debugger;
if (!this.formKey) {
throw "custom-fields-control: formKey property is required and missing";
}