This commit is contained in:
@@ -16,22 +16,28 @@
|
||||
<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>
|
||||
<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
|
||||
</div>
|
||||
<div v-else-if="item.type === 'text'">
|
||||
TEXT CONTROL HERE
|
||||
<div v-else-if="item.type === 'time'">
|
||||
TIME CONTROL HERE
|
||||
</div>
|
||||
<div v-else-if="item.type === 'int'">
|
||||
INT CONTROL HERE
|
||||
<div v-else-if="item.type === 'datetime'">
|
||||
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 v-else-if="item.type === 'bool'">
|
||||
CHECKBOX CONTROL HERE
|
||||
CHECKBOX INPUT CONTROL HERE
|
||||
</div>
|
||||
<div v-else-if="item.type === 'decimal'">
|
||||
DECIMAL INPUT CONTROL HERE
|
||||
</div>
|
||||
<div v-else>UNKNOWN CUSTOM CONTROL TYPE: {{ item.type }}</div>
|
||||
<div v-else><span class="error">UNKNOWN CUSTOM CONTROL TYPE: {{ item.type }}</span></div>
|
||||
</v-flex>
|
||||
</template>
|
||||
</v-layout>
|
||||
@@ -52,11 +58,15 @@
|
||||
*
|
||||
* 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);
|
||||
*
|
||||
public const string Currency = "currency";
|
||||
public const string Date = "date";
|
||||
public const string Time = "time";
|
||||
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" },
|
||||
{ "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" } ]
|
||||
|
||||
Reference in New Issue
Block a user