From c139937c2237178720b167477a245c39b46ddcb1 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 4 Oct 2024 17:12:47 +0200 Subject: [PATCH] Added the app version to the BO app. --- src/BackofficeApp.js | 1 + src/ConfigService.js | 18 ++++++++++++++++-- views/index.backoffice.html | 9 +++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/BackofficeApp.js b/src/BackofficeApp.js index 095c366..4c56e11 100644 --- a/src/BackofficeApp.js +++ b/src/BackofficeApp.js @@ -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'); diff --git a/src/ConfigService.js b/src/ConfigService.js index 30a4518..d3a661a 100644 --- a/src/ConfigService.js +++ b/src/ConfigService.js @@ -10,6 +10,7 @@ languages: null, defaultLanguageIndex: null, mospApiUrl: null, + appVersion: null, }; var loadConfig = function (success) { @@ -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; } @@ -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, }; } diff --git a/views/index.backoffice.html b/views/index.backoffice.html index b2c543b..1fcf99e 100644 --- a/views/index.backoffice.html +++ b/views/index.backoffice.html @@ -63,8 +63,13 @@ -

Copyright 2012-2022 NC3

-

MONARC

+

Copyright 2012-2024 NC3

+

+ + MONARC + + v. {{ appVersion }} +