This commit is contained in:
@@ -18,6 +18,14 @@ export default new Vuex.Store({
|
||||
userName: "NOT AUTHENTICATED",
|
||||
roles: 0,
|
||||
localeText: {},
|
||||
locale: {
|
||||
decimalSeparator: ".",
|
||||
currencySymbol: "$",
|
||||
shortDate: "YYYY-MM-DD",
|
||||
shortTime: "hh:mm:ss A",
|
||||
shortDateAndTime: "YYYY-MM-DD hh:mm:ss A",
|
||||
timeZoneOffset: -7 //timeZoneOffset is in decimal hours
|
||||
},
|
||||
navItems: [],
|
||||
logArray: []
|
||||
},
|
||||
@@ -39,6 +47,12 @@ export default new Vuex.Store({
|
||||
state.navItems = [];
|
||||
state.localeText = {};
|
||||
state.apiUrl = "";
|
||||
state.locale.decimalSeparator = ".";
|
||||
state.locale.currencySymbol = "$";
|
||||
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) {
|
||||
state.navItems.push(data);
|
||||
@@ -46,6 +60,15 @@ export default new Vuex.Store({
|
||||
addLocaleText(state, data) {
|
||||
state.localeText[data.key] = data.value;
|
||||
},
|
||||
setLocale(state, data) {
|
||||
// mutate state
|
||||
state.locale.decimalSeparator = data.decimalSeparator;
|
||||
state.locale.currencySymbol = data.currencySymbol;
|
||||
state.locale.shortDate = data.shortDate;
|
||||
state.locale.shortTime = data.shortTime;
|
||||
state.locale.shortDateAndTime = data.shortDateAndTime;
|
||||
state.locale.timeZoneOffset = data.timeZoneOffset;
|
||||
},
|
||||
setAPIURL(state, data) {
|
||||
state.apiUrl = data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user