This commit is contained in:
@@ -735,7 +735,7 @@ export default function initialize() {
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
//CACHE TRANSLATION SETTINGS
|
||||
//GET USER OPTIONS
|
||||
window.$gz.api
|
||||
.get("UserOptions/" + window.$gz.store.state.userId)
|
||||
.then(res => {
|
||||
@@ -788,6 +788,36 @@ export default function initialize() {
|
||||
throw error;
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
//GET GLOBAL SETTINGS
|
||||
window.$gz.api
|
||||
.get("GlobalBizSettings/client")
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
//In a form this would trigger a bunch of validation or error display code but for here and now:
|
||||
//convert error to human readable string for display and popup a notification to user
|
||||
var msg = window.$gz.api.apiErrorToHumanString(res.error);
|
||||
window.$gz.store.commit(
|
||||
"logItem",
|
||||
"Initialize::() fetch GlobalBizSettings/client -> error" + msg
|
||||
);
|
||||
window.$gz.eventBus.$emit("notify-error", msg);
|
||||
} else {
|
||||
//Check if overrides and use them here
|
||||
//or else use browser defaults
|
||||
|
||||
window.$gz.store.commit("setGlobalSettings", res.data);
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
.catch(function handleFetchClientGlobalSettingsError(error) {
|
||||
window.$gz.store.commit(
|
||||
"logItem",
|
||||
"Initialize::() fetch GlobalBizSettings/client -> error" + error
|
||||
);
|
||||
throw error;
|
||||
});
|
||||
})
|
||||
.catch(function handleIntializeError(error) {
|
||||
window.$gz.store.commit(
|
||||
"logItem",
|
||||
|
||||
Reference in New Issue
Block a user