This commit is contained in:
@@ -16,22 +16,28 @@
|
|||||||
<v-layout align-center justify-left row wrap>
|
<v-layout align-center justify-left row wrap>
|
||||||
<template v-for="item in this.$store.state.formCustomTemplate[formKey]">
|
<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>
|
<v-flex v-if="item.type" :key="item.fld" xs12 sm6 lg4 xl3 px-2>
|
||||||
<div v-if="item.type === 'date'">
|
<div v-if="item.type === 'currency'">
|
||||||
|
CURRENCY CONTROL HERE
|
||||||
|
</div>
|
||||||
|
<div v-else-if="item.type === 'date'">
|
||||||
DATE CONTROL HERE
|
DATE CONTROL HERE
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="item.type === 'text'">
|
<div v-else-if="item.type === 'time'">
|
||||||
TEXT CONTROL HERE
|
TIME CONTROL HERE
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="item.type === 'int'">
|
<div v-else-if="item.type === 'datetime'">
|
||||||
INT CONTROL HERE
|
DATE and TIME CONTROL HERE
|
||||||
|
</div>
|
||||||
|
<div v-else-if="item.type === 'text'">
|
||||||
|
TEXT INPUT CONTROL HERE
|
||||||
|
</div>
|
||||||
|
<div v-else-if="item.type === 'number'">
|
||||||
|
NUMBER INPUT CONTROL HERE
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="item.type === 'bool'">
|
<div v-else-if="item.type === 'bool'">
|
||||||
CHECKBOX CONTROL HERE
|
CHECKBOX INPUT CONTROL HERE
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="item.type === 'decimal'">
|
<div v-else><span class="error">UNKNOWN CUSTOM CONTROL TYPE: {{ item.type }}</span></div>
|
||||||
DECIMAL INPUT CONTROL HERE
|
|
||||||
</div>
|
|
||||||
<div v-else>UNKNOWN CUSTOM CONTROL TYPE: {{ item.type }}</div>
|
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</template>
|
</template>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
@@ -52,11 +58,15 @@
|
|||||||
*
|
*
|
||||||
* 2) Generate the controls dynamically based on the template
|
* 2) Generate the controls dynamically based on the template
|
||||||
* Possible types are:
|
* Possible types are:
|
||||||
* ret.Add(AyDataType.Date);
|
*
|
||||||
ret.Add(AyDataType.Text);
|
public const string Currency = "currency";
|
||||||
ret.Add(AyDataType.Integer);
|
public const string Date = "date";
|
||||||
ret.Add(AyDataType.Bool);
|
public const string Time = "time";
|
||||||
ret.Add(AyDataType.Decimal);
|
public const string DateTime = "datetime";
|
||||||
|
public const string Text = "text";
|
||||||
|
public const string Number = "number"; //decimal regardless
|
||||||
|
public const string Bool = "bool";
|
||||||
|
|
||||||
TEMPLATE: [ { "fld": "WidgetNotes", "required": "true" }, { "fld": "WidgetCustom1", "hide": "false", "required": "false", "type": "date" },
|
TEMPLATE: [ { "fld": "WidgetNotes", "required": "true" }, { "fld": "WidgetCustom1", "hide": "false", "required": "false", "type": "date" },
|
||||||
{ "fld": "WidgetCustom2", "hide": "false", "required": "true", "type": "text" }, { "fld": "WidgetCustom3", "hide": "false", "required": "false", "type": "int" },
|
{ "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" } ]
|
{ "fld": "WidgetCustom4", "hide": "false", "required": "false", "type": "bool" }, { "fld": "WidgetCustom5", "hide": "false", "required": "false", "type": "decimal" } ]
|
||||||
|
|||||||
Reference in New Issue
Block a user