This commit is contained in:
@@ -50,16 +50,14 @@ SHELL / NAV / MENUS / LAYOUT
|
||||
TODO: LOCALIZATION
|
||||
- TODO ACTIONS
|
||||
|
||||
- Currency / decimal INPUT handle commas test to see if working fully
|
||||
- needs to parse the currency, maybe I can cobble that together since the number portion stays the same?? (arabic?)
|
||||
- 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)
|
||||
- https://dm4t2.github.io/vue-currency-input/guide/#installation
|
||||
- PARSERS
|
||||
- Update / test own parser for currency and decimal for validation purposes
|
||||
- already something in there for currency I think
|
||||
|
||||
|
||||
- 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
|
||||
- CurrencyName (only one can't be inferred)
|
||||
- Time zone name
|
||||
- language name
|
||||
- 12hr time
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
export default {
|
||||
version: "8.0.0-alpha.2020.Jan.31",
|
||||
version: "8.0.0-alpha.2020.Feb-07",
|
||||
copyright:
|
||||
"Copyright © 1999-2020, Ground Zero Tech-Works Inc. All Rights Reserved",
|
||||
browser: {
|
||||
platform: window.navigator.platform,
|
||||
userAgent: window.navigator.userAgent,
|
||||
language: window.navigator.language,
|
||||
languages: window.navigator.languages,
|
||||
tz: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
oscpu: window.navigator.oscpu,
|
||||
maxTouchPoints: window.navigator.maxTouchPoints,
|
||||
webdriver: window.navigator.webdriver,
|
||||
|
||||
@@ -158,24 +158,7 @@ export default {
|
||||
"AM",
|
||||
"PM"
|
||||
],
|
||||
decimalValidate(required) {
|
||||
return { required: required, decimal: [2, this.format().decimalSeparator] };
|
||||
},
|
||||
decimalParse(v) {
|
||||
if (v) {
|
||||
if (
|
||||
this.decimalSeparator != "." &&
|
||||
v.includes(this.format().decimalSeparator)
|
||||
) {
|
||||
v = v.replace(this.format().decimalSeparator, ".");
|
||||
}
|
||||
v = parseFloat(v);
|
||||
}
|
||||
return v;
|
||||
},
|
||||
format() {
|
||||
return window.$gz.store.state.locale;
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// Take in a string that contains one or more
|
||||
//locale keys between square brackets
|
||||
@@ -224,6 +207,12 @@ export default {
|
||||
getCurrencyName() {
|
||||
return window.$gz.store.state.locale.currencyName;
|
||||
},
|
||||
//////////////////////////////////////////////////
|
||||
// Get the user's chosen 12hr clock
|
||||
//
|
||||
getHour12() {
|
||||
return window.$gz.store.state.locale.hour12;
|
||||
},
|
||||
///////////////////////////////////////////
|
||||
// Turn a utc date into a displayable
|
||||
// short date and time
|
||||
@@ -246,7 +235,7 @@ export default {
|
||||
}
|
||||
|
||||
if (!hour12) {
|
||||
hour12 = window.$gz.store.state.locale.hour12;
|
||||
hour12 = this.getHour12();
|
||||
}
|
||||
|
||||
//parse the date which is identified as utc ("2020-02-06T18:18:49.148011Z")
|
||||
@@ -306,7 +295,7 @@ export default {
|
||||
}
|
||||
|
||||
if (!hour12) {
|
||||
hour12 = window.$gz.store.state.locale.hour12;
|
||||
hour12 = this.getHour12();
|
||||
}
|
||||
|
||||
//parse the date which is identified as utc ("2020-02-06T18:18:49.148011Z")
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
>
|
||||
<!-- CURRENCY -->
|
||||
<div v-if="item.type === 8">
|
||||
<v-text-field
|
||||
TODO: CURRENCY CONTROL HERE
|
||||
<!-- <v-text-field
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:prefix="ltFormat().currencySymbol"
|
||||
@@ -29,7 +30,7 @@
|
||||
]"
|
||||
type="number"
|
||||
step="any"
|
||||
></v-text-field>
|
||||
></v-text-field> -->
|
||||
</div>
|
||||
<!-- DATE -->
|
||||
<div v-else-if="item.type === 2">
|
||||
@@ -104,7 +105,8 @@
|
||||
</div>
|
||||
<!-- DECIMAL -->
|
||||
<div v-else-if="item.type === 7">
|
||||
<v-text-field
|
||||
TODO: DECIMAL CONTROL HERE
|
||||
<!-- <v-text-field
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
@@ -117,7 +119,7 @@
|
||||
:counter="10"
|
||||
type="number"
|
||||
step="any"
|
||||
></v-text-field>
|
||||
></v-text-field> -->
|
||||
</div>
|
||||
<!-- BOOL -->
|
||||
<div v-else-if="item.type === 6">
|
||||
@@ -167,9 +169,6 @@ export default {
|
||||
lt: function(ltkey) {
|
||||
return window.$gz.locale.get(ltkey);
|
||||
},
|
||||
ltFormat() {
|
||||
return window.$gz.locale.format();
|
||||
},
|
||||
form() {
|
||||
//nothing
|
||||
return window.$gz.form;
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<v-time-picker
|
||||
scrollable
|
||||
ampm-in-title
|
||||
:format="ampmFormat"
|
||||
:format="hour12 ? 'ampm' : '24hr'"
|
||||
v-model="timeOnly"
|
||||
>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -87,9 +87,10 @@ export default {
|
||||
//cache display format stuff
|
||||
timeZoneName: window.$gz.locale.getTimeZoneName(),
|
||||
languageName: window.$gz.locale.getBrowserLanguages(),
|
||||
hour12: window.$gz.store.state.locale.hour12,
|
||||
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0],
|
||||
ampmFormat: window.$gz.locale.format().hour12 ? "ampm" : "24hr"
|
||||
hour12: window.$gz.locale.getHour12(),
|
||||
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
|
||||
// ampmFormat: window.$gz.locale.getHour12() ? "ampm" : "24hr"
|
||||
//:format="ampmFormat"
|
||||
}),
|
||||
props: {
|
||||
label: String,
|
||||
|
||||
@@ -331,9 +331,6 @@ export default {
|
||||
lt(ltKey) {
|
||||
return window.$gz.locale.get(ltKey);
|
||||
},
|
||||
ltFormat() {
|
||||
return window.$gz.locale.format();
|
||||
},
|
||||
|
||||
getDataFromApi() {
|
||||
var that = this;
|
||||
|
||||
@@ -212,9 +212,6 @@ Actual in inspector browser code:
|
||||
lt(ltKey) {
|
||||
return window.$gz.locale.get(ltKey);
|
||||
},
|
||||
ltFormat() {
|
||||
return window.$gz.locale.format();
|
||||
},
|
||||
newItem() {
|
||||
this.$router.push({
|
||||
name: "inventory-widget-edit",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<v-time-picker
|
||||
scrollable
|
||||
ampm-in-title
|
||||
:format="ampmFormat"
|
||||
:format="hour12 ? 'ampm' : '24hr'"
|
||||
v-model="timeOnly"
|
||||
>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -51,9 +51,8 @@ export default {
|
||||
//cache display format stuff
|
||||
timeZoneName: window.$gz.locale.getTimeZoneName(),
|
||||
languageName: window.$gz.locale.getBrowserLanguages(),
|
||||
hour12: window.$gz.store.state.locale.hour12,
|
||||
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0],
|
||||
ampmFormat: window.$gz.locale.format().hour12 ? "ampm" : "24hr"
|
||||
hour12: window.$gz.locale.getHour12(),
|
||||
defaultLocale: window.$gz.locale.getBrowserFirstLanguage().split("-", 1)[0]
|
||||
}),
|
||||
props: {
|
||||
label: String,
|
||||
|
||||
@@ -154,7 +154,6 @@ Vue.filter("currency", function vueFilterCurrency(value) {
|
||||
style: "currency",
|
||||
currency: "EUR"
|
||||
});
|
||||
// return locale.format().currencySymbol + value.toFixed(2);
|
||||
});
|
||||
|
||||
Vue.filter("decimal", function vueFilterDecimal(value) {
|
||||
|
||||
@@ -21,14 +21,10 @@ export default new Vuex.Store({
|
||||
homePage: undefined,
|
||||
localeText: {},
|
||||
locale: {
|
||||
tag: "en-US",
|
||||
decimalSeparator: ".",
|
||||
languageOverride: "en-US",
|
||||
timeZoneOverride: ".",
|
||||
currencyName: "USD",
|
||||
hour12: true,
|
||||
// shortDate: "YYYY-MM-DD",
|
||||
// shortTime: "hh:mm:ss A",
|
||||
// shortDateAndTime: "YYYY-MM-DD hh:mm:ss A",
|
||||
timeZoneOffset: -7 //timeZoneOffset is in decimal hours
|
||||
hour12: true
|
||||
},
|
||||
navItems: [],
|
||||
logArray: [],
|
||||
|
||||
@@ -16,107 +16,92 @@
|
||||
<v-card id="ayaNovaVersioncard">
|
||||
<v-subheader>{{ lt("ClientApp") }}</v-subheader>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("Version") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("Version") }}: </span>
|
||||
<span class="body-2">{{ clientInfo.version }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("User") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("User") }}: </span>
|
||||
<span class="body-2">{{ this.$store.state.userName }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">12h:</span>
|
||||
<span class="ml-6 body-1">12h: </span>
|
||||
<span class="body-2">
|
||||
{{ ltFormat().hour12 }}
|
||||
{{ locale().getHour12() }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("UserTimeZoneOffset") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("TimeZone") }}: </span>
|
||||
<span class="body-2">
|
||||
{{ ltFormat().timeZoneOffset }}
|
||||
{{ locale().getTimeZoneName() }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("DecimalSeparator") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().decimalSeparator }}</span>
|
||||
<span class="ml-6 body-1">{{ lt("LanguageCode") }}: </span>
|
||||
<span class="body-2">{{ locale().getBrowserFirstLanguage() }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("CurrencySymbol") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().currencySymbol }}</span>
|
||||
<span class="ml-6 body-1">{{ lt("CurrencyCode") }}: </span>
|
||||
<span class="body-2">{{ locale().getCurrencyName() }}</span>
|
||||
</div>
|
||||
|
||||
<!-- <div>
|
||||
<span class="ml-6 body-1">{{ lt("ShortDateFormat") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().shortDate }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("ShortTimeFormat") }}:</span>
|
||||
<span class="body-2">{{ ltFormat().shortTime }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("ShortDateAndTimeFormat") }}: </span>
|
||||
<span class="body-2">{{ ltFormat().shortDateAndTime }}</span>
|
||||
</div> -->
|
||||
|
||||
<v-divider class="mt-6"></v-divider>
|
||||
<v-subheader>{{ lt("Browser") }}</v-subheader>
|
||||
<div v-for="(value, name) in clientInfo.browser" :key="name">
|
||||
<span class="ml-6 body-1">{{ name }}:</span>
|
||||
<span class="ml-6 body-1">{{ name }}: </span>
|
||||
<span class="body-2">{{ value }}</span>
|
||||
</div>
|
||||
|
||||
<v-divider class="mt-6"></v-divider>
|
||||
<v-subheader>{{ lt("Server") }}</v-subheader>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("ServerAddress") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("ServerAddress") }}: </span>
|
||||
<span class="body-2">{{ this.$store.state.apiUrl }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("Version") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("Version") }}: </span>
|
||||
<span class="body-2">{{ serverInfo.serverVersion }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("SchemaVersion") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("SchemaVersion") }}: </span>
|
||||
<span class="body-2">{{ serverInfo.dbSchemaVersion }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("ServerTime") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("ServerTime") }}: </span>
|
||||
<span class="body-2">{{ serverInfo.serverLocalTime }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("TimeZone") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("TimeZone") }}: </span>
|
||||
<span class="body-2">{{ serverInfo.serverTimeZone }}</span>
|
||||
</div>
|
||||
|
||||
<v-divider class="mt-6"></v-divider>
|
||||
<v-subheader>{{ lt("HelpLicense") }}</v-subheader>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("RegisteredUser") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("RegisteredUser") }}: </span>
|
||||
<span class="body-2">{{
|
||||
serverInfo.license.license.licensedTo
|
||||
}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("DatabaseID") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("DatabaseID") }}: </span>
|
||||
<span class="body-2">{{ serverInfo.license.license.dbId }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("LicenseSerial") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("LicenseSerial") }}: </span>
|
||||
<span class="body-2">{{ serverInfo.license.license.keySerial }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("LicenseExpiration") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("LicenseExpiration") }}: </span>
|
||||
<span class="body-2">{{
|
||||
serverInfo.license.license.licenseExpiration
|
||||
}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="ml-6 body-1">{{ lt("SupportedUntil") }}:</span>
|
||||
<span class="ml-6 body-1">{{ lt("SupportedUntil") }}: </span>
|
||||
<span class="body-2">{{
|
||||
serverInfo.license.license.maintenanceExpiration
|
||||
}}</span>
|
||||
@@ -198,12 +183,9 @@ export default {
|
||||
"Log",
|
||||
"User",
|
||||
"Browser",
|
||||
"UserTimeZoneOffset",
|
||||
"DecimalSeparator",
|
||||
"CurrencySymbol",
|
||||
"ShortDateFormat",
|
||||
"ShortTimeFormat",
|
||||
"ShortDateAndTimeFormat"
|
||||
"LanguageCode",
|
||||
"TimeZone",
|
||||
"CurrencyCode"
|
||||
])
|
||||
.then(function() {
|
||||
vm.formState.ready = true;
|
||||
@@ -269,8 +251,8 @@ export default {
|
||||
lt(ltKey) {
|
||||
return window.$gz.locale.get(ltKey);
|
||||
},
|
||||
ltFormat() {
|
||||
return window.$gz.locale.format();
|
||||
locale() {
|
||||
return window.$gz.locale;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user