Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_step into develop

This commit is contained in:
Paolo Possanzini
2018-01-18 12:06:43 +01:00
2 changed files with 7 additions and 1 deletions
@@ -33,6 +33,11 @@ export default class UserInfo extends Vue {
mounted() {
this.currentLanguage = (this.$store.state as AppModel).localization.currentLanguage;
this.reloadLanguages();
}
async reloadLanguages(){
await awaiter( new LocalizationService().getLanguages());
}
async save() {
@@ -2,6 +2,7 @@ import Vue from "vue";
import { baseRestService } from "src/_base/baseRestService";
import { store, languageModel, localizationModelActions, AppModel } from "src/store";
import Factory from "src/_base/factoryService";
import { awaiter } from "src/_base";
export class LocalizationService extends baseRestService {
@@ -11,7 +12,7 @@ export class LocalizationService extends baseRestService {
async init() {
// preload all avaiable languages
await this.getLanguages();
await awaiter (this.getLanguages());
let state = store.state as AppModel;