This commit is contained in:
@@ -50,6 +50,9 @@ SHELL / NAV / MENUS / LAYOUT
|
|||||||
TODO: LOCALIZATION
|
TODO: LOCALIZATION
|
||||||
- TODO ACTIONS
|
- TODO ACTIONS
|
||||||
|
|
||||||
|
- Need to determine actual hours of time zone adjustment for grid filtering with relative times so can send to server
|
||||||
|
- Now no longer have user's own timezone offset stored
|
||||||
|
- Or should server calculate it based on timezone
|
||||||
|
|
||||||
- Get rid of timezone numeric override and any other deprecated stuff (currency symbol, decimal symbol etc) and associated code at client and server
|
- 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
|
- Add the new overrides for language and timezone and currency code and 12hour at client and server
|
||||||
|
|||||||
@@ -747,47 +747,11 @@ export default function initialize() {
|
|||||||
);
|
);
|
||||||
window.$gz.eventBus.$emit("notify-error", msg);
|
window.$gz.eventBus.$emit("notify-error", msg);
|
||||||
} else {
|
} else {
|
||||||
// //TODO: also need the other locale settings such as number and date formats etc
|
|
||||||
// var localOffset = new Date().getTimezoneOffset();
|
|
||||||
// if (localOffset != 0) {
|
|
||||||
// localOffset = (localOffset / 60) * -1; //time is in minutes and reversed from what we want or expect
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (res.data.timeZoneOffset != localOffset) {
|
|
||||||
// //TODO: localize message and also actually have a fix for it here
|
|
||||||
// //so this should be a confirm prompt but for now will just show it
|
|
||||||
|
|
||||||
// //for now just show the message
|
|
||||||
// window.$gz.eventBus.$emit(
|
|
||||||
// "notify-info",
|
|
||||||
// "Time zone offset for your account is set to " +
|
|
||||||
// res.data.timeZoneOffset +
|
|
||||||
// " which doesn't match the local timezone offset of " +
|
|
||||||
// localOffset,
|
|
||||||
// window.$gz.store.state.helpUrl + "intro/#searching"
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// window.$gz.eventBus.$emit("notify-success", "Success");
|
|
||||||
// window.$gz.eventBus.$emit(
|
|
||||||
// "notify-warning",
|
|
||||||
// "This is a very long warning, it has a lot of text and goes on and on and on. Hard to understand why anyone would do it this way but whatever right?@!"
|
|
||||||
// );
|
|
||||||
// window.$gz.eventBus.$emit(
|
|
||||||
// "notify-error",
|
|
||||||
// "This is a medium error"
|
|
||||||
// );
|
|
||||||
|
|
||||||
//Store offset in locale data
|
|
||||||
//TODO: also need the other locale settings such as number and date formats etc to be added at server
|
|
||||||
window.$gz.store.commit("setLocale", {
|
window.$gz.store.commit("setLocale", {
|
||||||
decimalSeparator: ".",
|
languageOverride: "en-US",
|
||||||
currencyName: "EUR",
|
timeZoneOverride: "America/New_York",
|
||||||
hour12: true,
|
currencyName: "USD",
|
||||||
// shortDate: "YYYY-MM-DD",
|
hour12: true
|
||||||
// shortTime: "hh:mm:ss A",
|
|
||||||
// shortDateAndTime: "YYYY-MM-DD hh:mm:ss A",
|
|
||||||
timeZoneOffset: res.data.timeZoneOffset
|
|
||||||
});
|
});
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default new Vuex.Store({
|
|||||||
localeText: {},
|
localeText: {},
|
||||||
locale: {
|
locale: {
|
||||||
languageOverride: "en-US",
|
languageOverride: "en-US",
|
||||||
timeZoneOverride: ".",
|
timeZoneOverride: "America/New_York",
|
||||||
currencyName: "USD",
|
currencyName: "USD",
|
||||||
hour12: true
|
hour12: true
|
||||||
},
|
},
|
||||||
@@ -54,14 +54,10 @@ export default new Vuex.Store({
|
|||||||
state.localeText = {};
|
state.localeText = {};
|
||||||
state.formCustomTemplate = {};
|
state.formCustomTemplate = {};
|
||||||
state.apiUrl = "";
|
state.apiUrl = "";
|
||||||
state.locale.tag = "en-US";
|
state.locale.languageOverride = "en-US";
|
||||||
state.locale.decimalSeparator = ".";
|
state.locale.timeZoneOverride = "America/New_York";
|
||||||
state.locale.currencyName = "USD";
|
state.locale.currencyName = "USD";
|
||||||
state.locale.hour12 = true;
|
state.locale.hour12 = true;
|
||||||
// state.locale.shortDate = "YYYY-MM-DD";
|
|
||||||
// state.locale.shortTime = "hh:mm:ss A";
|
|
||||||
// state.locale.shortDateAndTime = "YYYY-MM-DD hh:mm:ss A";
|
|
||||||
state.locale.timeZoneOffset = -7;
|
|
||||||
},
|
},
|
||||||
addNavItem(state, data) {
|
addNavItem(state, data) {
|
||||||
state.navItems.push(data);
|
state.navItems.push(data);
|
||||||
@@ -76,14 +72,10 @@ export default new Vuex.Store({
|
|||||||
},
|
},
|
||||||
setLocale(state, data) {
|
setLocale(state, data) {
|
||||||
// mutate state
|
// mutate state
|
||||||
state.locale.decimalSeparator = data.decimalSeparator;
|
state.locale.languageOverride = data.languageOverride;
|
||||||
state.locale.currencyName = data.currencyName;
|
state.locale.currencyName = data.currencyName;
|
||||||
state.locale.hour12 = data.hour12;
|
state.locale.hour12 = data.hour12;
|
||||||
// state.locale.shortDate = data.shortDate;
|
state.locale.timeZoneOverride = data.timeZoneOverride;
|
||||||
// state.locale.shortTime = data.shortTime;
|
|
||||||
// state.locale.shortDateAndTime = data.shortDateAndTime;
|
|
||||||
state.locale.timeZoneOffset = data.timeZoneOffset;
|
|
||||||
state.locale.tag = data.tag;
|
|
||||||
},
|
},
|
||||||
setAPIURL(state, data) {
|
setAPIURL(state, data) {
|
||||||
state.apiUrl = data;
|
state.apiUrl = data;
|
||||||
|
|||||||
Reference in New Issue
Block a user