This commit is contained in:
2020-02-28 22:58:50 +00:00
parent fe10783573
commit 6caac2b1af
2 changed files with 30 additions and 24 deletions

View File

@@ -45,9 +45,6 @@ CURRENT TODOs
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
todo: datatable activation of layout for narrow format is fucked. Layout not starting narrow for grid much fuckery
- It would not start narrow when I first opened it on my phone, then had all sorts of issues staying wide for no apparent reason after navigation back and forth
- Narrow detection on initial entry is bad and recognizing it during switch is also bad
todo: custom fields currency type control NOT implement yet, are there others too?
todo: apparently I can change the buttons to display the text not uppercase with class="text-none" or something
- https://github.com/vuetifyjs/vuetify/issues/3948

View File

@@ -17,20 +17,16 @@
>
<!-- CURRENCY -->
<div v-if="item.type === 8">
TODO: CURRENCY CONTROL HERE
<!-- <v-text-field
<gz-currency
v-model="_self[item.dataKey]"
:readonly="readOnly"
:prefix="ltFormat().currencySymbol"
:label="lt(item.fld)"
:ref="item.fld"
:error-messages="form().serverErrors(parentVM, item.fld)"
:rules="[
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
]"
type="number"
step="any"
></v-text-field> -->
></gz-currency>
</div>
<!-- DATE -->
<div v-else-if="item.type === 2">
@@ -105,8 +101,7 @@
</div>
<!-- DECIMAL -->
<div v-else-if="item.type === 7">
TODO: DECIMAL CONTROL HERE
<!-- <v-text-field
<gz-decimal
v-model="_self[item.dataKey]"
:readonly="readOnly"
:label="lt(item.fld)"
@@ -115,11 +110,7 @@
:rules="[
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
]"
clearable
:counter="10"
type="number"
step="any"
></v-text-field> -->
></gz-decimal>
</div>
<!-- BOOL -->
<div v-else-if="item.type === 6">
@@ -216,21 +207,38 @@ export default {
//Only process if value is non-null since all control types can handle null
if (ret != null) {
//check types that matter
/*
NoType = 0,
DateTime = 1,
Date = 2,
Time = 3,
Text = 4,
Integer = 5,
Bool = 6,
Decimal = 7,
Currency = 8,
Tags = 9,
Enum = 10,
EmailAddress = 11,
HTTP = 12,
InternalId = 13
*/
switch (ctrlType) {
//DateLike?
case "date":
case "time":
case "datetime":
case 1:
case 2:
case 3:
//can it be parsed into a date using the same library as the components use?
if (!window.$gz.DateTime.fromISO(ret).isValid()) {
//window.$gz.DateTime.fromISO(valueStart);
if (!window.$gz.DateTime.fromISO(ret).isValid) {
ret = null;
}
break;
case "bool":
case 6:
//if it's not already a boolean
if (!window.$gz._.isBoolean(ret)) {
//it's not a bool and it's not null, it came from some other data type,
//perhaps though, it's a truty string so check for that before giving up and nulling
//perhaps though, it's a truthy string so check for that before giving up and nulling
if (window.$gz._.isString(ret)) {
ret = window.$gz.util.stringToBoolean(ret);
break;
@@ -247,10 +255,11 @@ export default {
}
}
break;
case "number":
case "currency":
case 8:
case 7:
if (!window.$gz._.isNumber(ret)) {
ret = window.$gz.util.stringToFloat(ret);
break;
}
break;