Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/remove-db-abstract'
Browse files Browse the repository at this point in the history
* origin/feature/remove-db-abstract:
  Added the app version to the BO app.
  • Loading branch information
ruslanbaidan committed Oct 4, 2024
2 parents 8b385b4 + c139937 commit e2cdedb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/BackofficeApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ angular
$rootScope.languages = ConfigService.getLanguages();
var uiLang = UserService.getUiLanguage();
$rootScope.mospApiUrl = ConfigService.getMospApiUrl();
$rootScope.appVersion = ConfigService.getVersion();

if (uiLang === undefined || uiLang === null) {
gettextCatalog.setCurrentLanguage('en');
Expand Down
18 changes: 16 additions & 2 deletions src/ConfigService.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
languages: null,
defaultLanguageIndex: null,
mospApiUrl: null,
appVersion: null,
};

var loadConfig = function (success) {
Expand All @@ -24,9 +25,13 @@
name: ISO6391.getName(code),
index: lang,
}
self.config.languages[lang] = AddLang;
self.config.languages[lang] = AddLang;
}
}

if (data.data.appVersion) {
self.config.appVersion = data.data.appVersion;
}
if (data.data.defaultLanguageIndex) {
self.config.defaultLanguageIndex = data.data.defaultLanguageIndex;
}
Expand Down Expand Up @@ -74,12 +79,21 @@
}
};

var getVersion = function () {
if (self.config.appVersion) {
return self.config.appVersion;
} else {
return '';
}
};

return {
loadConfig: loadConfig,
isLoaded: isLoaded,
getLanguages: getLanguages,
getDefaultLanguageIndex: getDefaultLanguageIndex,
getMospApiUrl: getMospApiUrl
getMospApiUrl: getMospApiUrl,
getVersion: getVersion,
};
}

Expand Down
9 changes: 7 additions & 2 deletions views/index.backoffice.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@

<md-divider></md-divider>

<p class="md-caption txtcenter">Copyright 2012-2022 <a href="https://www.nc3.lu" target="_blank" rel="noopener noreferrer">NC3</a></p>
<p class="md-caption txtcenter"><a href="https://www.monarc.lu" target="_blank" rel="noopener noreferrer">MONARC</a></p>
<p class="md-caption txtcenter">Copyright 2012-2024 <a href="https://www.nc3.lu" target="_blank" rel="noopener noreferrer">NC3</a></p>
<p class="md-caption txtcenter">
<a href="https://www.monarc.lu" title="MONARC Website" target="_blank" rel="noopener noreferrer">
MONARC
</a>
v. {{ appVersion }}
</p>
</md-list>
</md-sidenav>
<md-content layout="column" class="md-main-content" flex ng-controller="BackofficeAccountCtrl">
Expand Down

0 comments on commit e2cdedb

Please sign in to comment.