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,
authenticated: true,
userId: Number(token.id),
translationId: authResponse.tid,
userName: authResponse.name,
roles: authResponse.roles,
userType: authResponse.usertype,

View File

@@ -278,8 +278,7 @@
ref="currencyName"
v-model="obj.currencyName"
:hint="
optionsObj.currencyName == null ||
optionsObj.currencyName == ''
obj.currencyName == null || obj.currencyName == ''
? locale().getCurrencyName()
: ''
"
@@ -351,16 +350,17 @@ export default {
quotestatus: [],
eventTypes: [],
deliveryMethods: [],
coreAyaTypes: []
coreAyaTypes: [],
translations: []
},
obj: {
id: 0,
concurrency: 0,
languageOverride: null,
timeZoneOverride: null,
currencyName: "USD",
hour12: true,
translationId: 1,
languageOverride: window.$gz.locale.getResolvedLanguage(),
timeZoneOverride: window.$gz.locale.getResolvedTimeZoneName(),
currencyName: window.$gz.locale.getCurrencyName(),
hour12: window.$gz.locale.getHour12(),
translationId: 3,
ayaType: 0,
eventType: 0,
advanceNotice: "00:00:00",
@@ -568,6 +568,9 @@ export default {
window.$gz.eventBus.$off("menu-click", clickHandler);
},
methods: {
goHelp() {
window.open(window.$gz.api.helpUrl() + "ay-start-localization", "_blank");
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
},
@@ -577,6 +580,9 @@ export default {
ayaTypes: function() {
return window.$gz.type;
},
locale() {
return window.$gz.locale;
},
form() {
return window.$gz.form;
},
@@ -888,5 +894,22 @@ async function populateSelectionLists(vm) {
} else {
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>