This commit is contained in:
2022-03-06 18:33:16 +00:00
parent 426e8d86df
commit af53eb7ff8
2 changed files with 32 additions and 8 deletions

View File

@@ -51,6 +51,7 @@ export function processLogin(authResponse, loggedInWithKnownPassword) {
apiToken: authResponse.token, apiToken: authResponse.token,
authenticated: true, authenticated: true,
userId: Number(token.id), userId: Number(token.id),
translationId: authResponse.tid,
userName: authResponse.name, userName: authResponse.name,
roles: authResponse.roles, roles: authResponse.roles,
userType: authResponse.usertype, userType: authResponse.usertype,

View File

@@ -278,8 +278,7 @@
ref="currencyName" ref="currencyName"
v-model="obj.currencyName" v-model="obj.currencyName"
:hint=" :hint="
optionsObj.currencyName == null || obj.currencyName == null || obj.currencyName == ''
optionsObj.currencyName == ''
? locale().getCurrencyName() ? locale().getCurrencyName()
: '' : ''
" "
@@ -351,16 +350,17 @@ export default {
quotestatus: [], quotestatus: [],
eventTypes: [], eventTypes: [],
deliveryMethods: [], deliveryMethods: [],
coreAyaTypes: [] coreAyaTypes: [],
translations: []
}, },
obj: { obj: {
id: 0, id: 0,
concurrency: 0, concurrency: 0,
languageOverride: null, languageOverride: window.$gz.locale.getResolvedLanguage(),
timeZoneOverride: null, timeZoneOverride: window.$gz.locale.getResolvedTimeZoneName(),
currencyName: "USD", currencyName: window.$gz.locale.getCurrencyName(),
hour12: true, hour12: window.$gz.locale.getHour12(),
translationId: 1, translationId: 3,
ayaType: 0, ayaType: 0,
eventType: 0, eventType: 0,
advanceNotice: "00:00:00", advanceNotice: "00:00:00",
@@ -568,6 +568,9 @@ export default {
window.$gz.eventBus.$off("menu-click", clickHandler); window.$gz.eventBus.$off("menu-click", clickHandler);
}, },
methods: { methods: {
goHelp() {
window.open(window.$gz.api.helpUrl() + "ay-start-localization", "_blank");
},
canSave: function() { canSave: function() {
return this.formState.valid && this.formState.dirty; return this.formState.valid && this.formState.dirty;
}, },
@@ -577,6 +580,9 @@ export default {
ayaTypes: function() { ayaTypes: function() {
return window.$gz.type; return window.$gz.type;
}, },
locale() {
return window.$gz.locale;
},
form() { form() {
return window.$gz.form; return window.$gz.form;
}, },
@@ -888,5 +894,22 @@ async function populateSelectionLists(vm) {
} else { } else {
vm.selectLists.quotestatus = res.data.all; vm.selectLists.quotestatus = res.data.all;
} }
res = await window.$gz.api.get("translation/list");
if (res.error) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
vm.selectLists.translations = res.data;
}
//get current user's translation id to use as default
res = await window.$gz.api.get("user-option/" + vm.$store.state.userId);
if (res.error) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
vm.obj.translationId = res.data.translationId;
}
} }
</script> </script>