This commit is contained in:
@@ -138,6 +138,9 @@ document.addEventListener("fetchEnd", function() {
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// FILTERS
|
||||
//
|
||||
|
||||
//TODO: These almost all need more work to format as proper numeric value (comma versus decimal etc)
|
||||
|
||||
Vue.filter("capitalize", function vueFilterCapitalize(value) {
|
||||
if (!value) return "";
|
||||
value = value.toString();
|
||||
@@ -154,7 +157,31 @@ Vue.filter("shortdatelocalized", function vueFilterShortDateLocalized(value) {
|
||||
.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) {
|
||||
if (!value) return "";
|
||||
@@ -173,7 +200,7 @@ Vue.filter("boolastext", function vueFilterBoolAsText(value) {
|
||||
|
||||
Vue.filter("enum", function vueFilterDecimal(value, enumtype) {
|
||||
if (!value) return "";
|
||||
return enumtype + "." + value;
|
||||
return enumtype + "." + value; //todo: actual values here
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user