This commit is contained in:
@@ -50,80 +50,32 @@ SHELL / NAV / MENUS / LAYOUT
|
|||||||
TODO: LOCALIZATION
|
TODO: LOCALIZATION
|
||||||
- TODO ACTIONS
|
- TODO ACTIONS
|
||||||
|
|
||||||
- Move localization methods to the LOCALE object and then call it from the filters
|
- Decimal OUTPUT for grid not done yet, only currency I think
|
||||||
- Browser languages in locale:
|
- Currency / decimal INPUT handle commas test to see if working fully
|
||||||
- some functions are better called with the full array of browser languages because sometimes it needs to use a fallback
|
- needs to parse the currency, maybe I can cobble that together since the number portion stays the same?? (arabic?)
|
||||||
- Only the date picker seems to have an issue with handling the full array of languages, the javascript number and date formatters do not and expect a full range
|
- INPUT currency / decimal can a german user input a currency as 1.234,56 ? (comma is the decimal separator and decimal is the thousands separator)
|
||||||
- Need a manual override setting for locale tag "en-US" etc as some browsers seem to be shitty at it
|
- vuetify currency field: https://gist.github.com/Christilut/1143d453ea070f7e8fa345f7ada1b999
|
||||||
|
- Not vuetify specifically but may have stealable code: https://dm4t2.github.io/vue-currency-input/
|
||||||
- TODO: get time zone from browser with user override option
|
|
||||||
- use browser default unless overridden
|
|
||||||
- Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
||||||
|
|
||||||
- How to handle dates and times
|
|
||||||
- All dates stored in UTC format at server and transmitted that way
|
|
||||||
- Change to timestamp?
|
|
||||||
- CLIENT DISPLAY:
|
|
||||||
- Client uses the built in browser tolocale* methods to display dates to user both in their desired format and desired time zone, i.e. NO HOUR ADJUSTMENTS USED
|
|
||||||
-- Proper way to definitevely display a date in desired time zone: DATE.toLocaleString('en-GB', { timeZone: 'UTC', dateStyle: "short",timeStyle: "short", hour12: false })
|
|
||||||
|
|
||||||
- CUSTOM DATE FIELD NOT SETTING TIME NOW??
|
|
||||||
- SB able to ditch the dayjs library entirely once done!
|
|
||||||
|
|
||||||
- CURRENCY code, need to be able to set currency as a user option, no way to deduce it except maybe a default through deduction of locale
|
|
||||||
- AM PM or 24 hour time sb a setting in locale
|
|
||||||
|
|
||||||
- Make functional user settings form so can test shit out
|
|
||||||
- Need override for locale, currency setting, 12hr clock etc etc
|
|
||||||
|
|
||||||
|
- Get rid of timezone numeric override and any other deprecated stuff (currency symbol, decimal symbol etc) and associated code at client and server
|
||||||
|
- Add the new overrides for language and timezone and currency code and 12hour at client and server
|
||||||
|
- Make functional user settings form with all overrides so can test shit out
|
||||||
- Need a browser check on opening the login page that will check to ensure the browser can do the date conversions properly etc and tell user browser is unsuitable if it isn't
|
- Need a browser check on opening the login page that will check to ensure the browser can do the date conversions properly etc and tell user browser is unsuitable if it isn't
|
||||||
|
|
||||||
- TRY AN ALTERNATE LANGUAGE IN VUETIFY USING THEIR METHOD, SEE WHATS INVOLVED
|
|
||||||
- Find out how to override the default locale for vuetify to set specific items to our localized text version
|
|
||||||
- this saves having to use a whole locale for just the calendar etc
|
|
||||||
- DATE / TIME PICKERS
|
|
||||||
- Find out what locale keys the date and time pickers are using so they can be replaced / overridden
|
|
||||||
- Test that date / time picker is using the proper locales
|
|
||||||
- Currency INPUT / DECIMALS
|
|
||||||
- Find out how or if the currency input can be set to use alternate decimal and group symbols and accept and display that way
|
|
||||||
- FILTERS
|
|
||||||
- cobble together my own currency and decimal display filters
|
|
||||||
- PARSERS
|
- PARSERS
|
||||||
- Update / test own parser for currency and decimal for validation purposes
|
- Update / test own parser for currency and decimal for validation purposes
|
||||||
- already something in there for currency I think
|
- already something in there for currency I think
|
||||||
|
|
||||||
- PLANNING
|
|
||||||
- Proper way to definitevely display a date in desired time zone: DATE.toLocaleString('en-GB', { timeZone: 'UTC', dateStyle: "short",timeStyle: "short", hour12: false })
|
|
||||||
|
|
||||||
- NEED to accept and display numbers and dates and times, nothing else really matters
|
|
||||||
- NUMBER FORMATTING REQUIRED INFO
|
|
||||||
- USEROPTIONS: Currency symbol
|
|
||||||
- USEROPTIONS: digit grouping symbol (thousands separator)
|
|
||||||
- USEROPTIONS: decimal symbol
|
|
||||||
- DATE TIME FORMATTING REQUIRED INFO
|
|
||||||
- LOCALETEXT: Month names in full
|
|
||||||
- Month abbreviations 3 characters maybe can just use first 3 of names above
|
|
||||||
- LOCALETEXT: Day of week
|
|
||||||
- First letter of day of week and first three letters of day of week are used in date input
|
|
||||||
- LOCALETEXT: AM / PM symbols
|
|
||||||
- USEROPTIONS: Short date template
|
|
||||||
- USEROPTIONS: Short time template
|
|
||||||
|
|
||||||
|
|
||||||
- All major browsers support Intl api now:
|
|
||||||
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl
|
|
||||||
- IDENTIFY: what needs to be localized besides display titles?
|
|
||||||
- Currency input, display
|
|
||||||
- decimal number input, display
|
|
||||||
- Date and times MONTH names in input (and some ancillary text maybe like "year")
|
|
||||||
- Date and time display
|
|
||||||
|
|
||||||
- INPUT currency / decimal can a german user input a currency as 1.234,56 ? (comma is the decimal separator and decimal is the thousands separator)
|
|
||||||
- vuetify currency field: https://gist.github.com/Christilut/1143d453ea070f7e8fa345f7ada1b999
|
TODO: CUSTOMIZE not working on widget edit form
|
||||||
- Not vuetify specifically but may have stealable code: https://dm4t2.github.io/vue-currency-input/
|
TODO: CUSTOM DATE FIELD NOT SETTING NOW??
|
||||||
- Grid display currency
|
|
||||||
- INPUT Date Months localized
|
|
||||||
- Display Date time in localized format?
|
|
||||||
|
|
||||||
TODO: toolbar above grid for filters, refresh etc (make it a standard component?)
|
TODO: toolbar above grid for filters, refresh etc (make it a standard component?)
|
||||||
TODO: main.js filters need to be finished
|
TODO: main.js filters need to be finished
|
||||||
|
|||||||
5
ayanova/package-lock.json
generated
5
ayanova/package-lock.json
generated
@@ -7857,11 +7857,6 @@
|
|||||||
"integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==",
|
"integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"dayjs": {
|
|
||||||
"version": "1.8.18",
|
|
||||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.18.tgz",
|
|
||||||
"integrity": "sha512-JBMJZghNK8TtuoPnKNIzW9xavVVigld/zmZNpZSyQbkb2Opp55YIfZUpE4OEqPF/iyUVQTKcn1bC2HtC8B7s3g=="
|
|
||||||
},
|
|
||||||
"de-indent": {
|
"de-indent": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.6.1",
|
"core-js": "^3.6.1",
|
||||||
"dayjs": "^1.8.18",
|
|
||||||
"jwt-decode": "^2.2.0",
|
"jwt-decode": "^2.2.0",
|
||||||
"luxon": "^1.22.0",
|
"luxon": "^1.22.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
|
|||||||
@@ -244,8 +244,6 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// valueStart = window.$gz.dayjs(valueStart);
|
|
||||||
// valueEnd = window.$gz.dayjs(valueEnd);
|
|
||||||
valueStart = window.$gz.DateTime.fromISO(valueStart);
|
valueStart = window.$gz.DateTime.fromISO(valueStart);
|
||||||
valueEnd = window.$gz.DateTime.fromISO(valueEnd);
|
valueEnd = window.$gz.DateTime.fromISO(valueEnd);
|
||||||
|
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ export default {
|
|||||||
case "time":
|
case "time":
|
||||||
case "datetime":
|
case "datetime":
|
||||||
//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.dayjs(ret).isValid()) {
|
if (!window.$gz.DateTime.fromISO(ret).isValid()) {
|
||||||
ret = null;
|
ret = null;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -97,14 +97,6 @@ export default {
|
|||||||
this.hour12
|
this.hour12
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// formatDate() {
|
|
||||||
// return this.value
|
|
||||||
// ? window.$gz.dayjs
|
|
||||||
// .utc(this.value)
|
|
||||||
// .add(window.$gz.locale.format().timeZoneOffset, "hour")
|
|
||||||
// .format(window.$gz.locale.format().shortDate)
|
|
||||||
// : "";
|
|
||||||
// },
|
|
||||||
formatTime() {
|
formatTime() {
|
||||||
return window.$gz.locale.utcDateToShortTimeLocalized(
|
return window.$gz.locale.utcDateToShortTimeLocalized(
|
||||||
this.value,
|
this.value,
|
||||||
|
|||||||
@@ -10,10 +10,7 @@ import "./registerServiceWorker";
|
|||||||
import errorHandler from "./api/errorhandler";
|
import errorHandler from "./api/errorhandler";
|
||||||
import NProgress from "nprogress";
|
import NProgress from "nprogress";
|
||||||
import "nprogress/nprogress.css";
|
import "nprogress/nprogress.css";
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
import UTC from "dayjs/plugin/utc"; // load on demand
|
|
||||||
dayjs.extend(UTC); // use plugin
|
|
||||||
import lodash from "./libs/lodash.min.js";
|
import lodash from "./libs/lodash.min.js";
|
||||||
|
|
||||||
//my libs
|
//my libs
|
||||||
@@ -57,7 +54,6 @@ window.$gz = {
|
|||||||
menu: gzmenu,
|
menu: gzmenu,
|
||||||
dialog: gzdialog,
|
dialog: gzdialog,
|
||||||
util: gzutil,
|
util: gzutil,
|
||||||
dayjs: dayjs,
|
|
||||||
DateTime: DateTime,
|
DateTime: DateTime,
|
||||||
_: lodash,
|
_: lodash,
|
||||||
api: gzapi,
|
api: gzapi,
|
||||||
|
|||||||
Reference in New Issue
Block a user