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: @@@@@@@@@@@ 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: 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 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 - https://github.com/vuetifyjs/vuetify/issues/3948

View File

@@ -17,20 +17,16 @@
> >
<!-- CURRENCY --> <!-- CURRENCY -->
<div v-if="item.type === 8"> <div v-if="item.type === 8">
TODO: CURRENCY CONTROL HERE <gz-currency
<!-- <v-text-field
v-model="_self[item.dataKey]" v-model="_self[item.dataKey]"
:readonly="readOnly" :readonly="readOnly"
:prefix="ltFormat().currencySymbol"
:label="lt(item.fld)" :label="lt(item.fld)"
:ref="item.fld" :ref="item.fld"
:error-messages="form().serverErrors(parentVM, item.fld)" :error-messages="form().serverErrors(parentVM, item.fld)"
:rules="[ :rules="[
form().customFieldsCheck(parentVM, item, _self, lt(item.fld)) form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
]" ]"
type="number" ></gz-currency>
step="any"
></v-text-field> -->
</div> </div>
<!-- DATE --> <!-- DATE -->
<div v-else-if="item.type === 2"> <div v-else-if="item.type === 2">
@@ -105,8 +101,7 @@
</div> </div>
<!-- DECIMAL --> <!-- DECIMAL -->
<div v-else-if="item.type === 7"> <div v-else-if="item.type === 7">
TODO: DECIMAL CONTROL HERE <gz-decimal
<!-- <v-text-field
v-model="_self[item.dataKey]" v-model="_self[item.dataKey]"
:readonly="readOnly" :readonly="readOnly"
:label="lt(item.fld)" :label="lt(item.fld)"
@@ -115,11 +110,7 @@
:rules="[ :rules="[
form().customFieldsCheck(parentVM, item, _self, lt(item.fld)) form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
]" ]"
clearable ></gz-decimal>
:counter="10"
type="number"
step="any"
></v-text-field> -->
</div> </div>
<!-- BOOL --> <!-- BOOL -->
<div v-else-if="item.type === 6"> <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 //Only process if value is non-null since all control types can handle null
if (ret != null) { if (ret != null) {
//check types that matter //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) { switch (ctrlType) {
//DateLike? //DateLike?
case "date": case 1:
case "time": case 2:
case "datetime": case 3:
//can it be parsed into a date using the same library as the components use? //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; ret = null;
} }
break; break;
case "bool": case 6:
//if it's not already a boolean //if it's not already a boolean
if (!window.$gz._.isBoolean(ret)) { if (!window.$gz._.isBoolean(ret)) {
//it's not a bool and it's not null, it came from some other data type, //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)) { if (window.$gz._.isString(ret)) {
ret = window.$gz.util.stringToBoolean(ret); ret = window.$gz.util.stringToBoolean(ret);
break; break;
@@ -247,10 +255,11 @@ export default {
} }
} }
break; break;
case "number": case 8:
case "currency": case 7:
if (!window.$gz._.isNumber(ret)) { if (!window.$gz._.isNumber(ret)) {
ret = window.$gz.util.stringToFloat(ret); ret = window.$gz.util.stringToFloat(ret);
break; break;
} }
break; break;