This commit is contained in:
2020-02-07 23:32:22 +00:00
parent 82f2defc7e
commit 9a15ae5cec
11 changed files with 61 additions and 103 deletions

View File

@@ -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,

View File

@@ -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")