This commit is contained in:
@@ -50,6 +50,10 @@ SHELL / NAV / MENUS / LAYOUT
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TODO: main.js filters need to be finished
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TODO: GRIDS
|
TODO: GRIDS
|
||||||
- MAKE GRID AS GENERIC VUE COMPONENT
|
- MAKE GRID AS GENERIC VUE COMPONENT
|
||||||
- See gz-data-table.vue notes in component comments for it's own todo's
|
- See gz-data-table.vue notes in component comments for it's own todo's
|
||||||
|
|||||||
@@ -212,8 +212,10 @@ function buildRecords(listData, columndefinitions, filters) {
|
|||||||
display = filters.shortdatelocalized(display);
|
display = filters.shortdatelocalized(display);
|
||||||
break;
|
break;
|
||||||
case 2: //date only
|
case 2: //date only
|
||||||
|
display = filters.shortdateonlylocalized(display);
|
||||||
break;
|
break;
|
||||||
case 3: //time only
|
case 3: //time only
|
||||||
|
display = filters.shorttimeonlylocalized(display);
|
||||||
break;
|
break;
|
||||||
case 6: //bool
|
case 6: //bool
|
||||||
display = filters.boolastext(display);
|
display = filters.boolastext(display);
|
||||||
@@ -224,13 +226,13 @@ function buildRecords(listData, columndefinitions, filters) {
|
|||||||
case 8: //currency
|
case 8: //currency
|
||||||
display = filters.currency(display);
|
display = filters.currency(display);
|
||||||
break;
|
break;
|
||||||
case 10: //enum
|
case 10: //enum
|
||||||
display = filters.enum(display, columndefinitions[iColumn].et);
|
display = filters.enum(display, columndefinitions[iColumn].et);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//do nothing, allow it to stay as is
|
//do nothing, allow it to stay as is
|
||||||
}
|
}
|
||||||
o["c" + iColumn.toString()] = column.v;
|
o["c" + iColumn.toString()] = display;
|
||||||
}
|
}
|
||||||
ret.push(o);
|
ret.push(o);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,6 +138,9 @@ document.addEventListener("fetchEnd", function() {
|
|||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// FILTERS
|
// FILTERS
|
||||||
//
|
//
|
||||||
|
|
||||||
|
//TODO: These almost all need more work to format as proper numeric value (comma versus decimal etc)
|
||||||
|
|
||||||
Vue.filter("capitalize", function vueFilterCapitalize(value) {
|
Vue.filter("capitalize", function vueFilterCapitalize(value) {
|
||||||
if (!value) return "";
|
if (!value) return "";
|
||||||
value = value.toString();
|
value = value.toString();
|
||||||
@@ -154,7 +157,31 @@ Vue.filter("shortdatelocalized", function vueFilterShortDateLocalized(value) {
|
|||||||
.format(locale.format().shortDateAndTime);
|
.format(locale.format().shortDateAndTime);
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO: These need more work to format as proper numeric value (comma versus decimal etc)
|
//Convert date to localized value and return as short date format chosen
|
||||||
|
Vue.filter("shortdateonlylocalized", function vueFilterShortDateOnlyLocalized(
|
||||||
|
value
|
||||||
|
) {
|
||||||
|
//TODO NOT DONE
|
||||||
|
if (!value) return "";
|
||||||
|
|
||||||
|
return dayjs
|
||||||
|
.utc(value)
|
||||||
|
.add(locale.format().timeZoneOffset, "hour")
|
||||||
|
.format(locale.format().shortDateAndTime);
|
||||||
|
});
|
||||||
|
|
||||||
|
//Convert date to localized value and return as short date format chosen
|
||||||
|
Vue.filter("shorttimeonlylocalized", function vueFilterShortTimeOnlyLocalized(
|
||||||
|
value
|
||||||
|
) {
|
||||||
|
//TODO NOT DONE
|
||||||
|
if (!value) return "";
|
||||||
|
|
||||||
|
return dayjs
|
||||||
|
.utc(value)
|
||||||
|
.add(locale.format().timeZoneOffset, "hour")
|
||||||
|
.format(locale.format().shortDateAndTime);
|
||||||
|
});
|
||||||
|
|
||||||
Vue.filter("currency", function vueFilterCurrency(value) {
|
Vue.filter("currency", function vueFilterCurrency(value) {
|
||||||
if (!value) return "";
|
if (!value) return "";
|
||||||
@@ -173,7 +200,7 @@ Vue.filter("boolastext", function vueFilterBoolAsText(value) {
|
|||||||
|
|
||||||
Vue.filter("enum", function vueFilterDecimal(value, enumtype) {
|
Vue.filter("enum", function vueFilterDecimal(value, enumtype) {
|
||||||
if (!value) return "";
|
if (!value) return "";
|
||||||
return enumtype + "." + value;
|
return enumtype + "." + value; //todo: actual values here
|
||||||
});
|
});
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user