tfabrica
Version:
library for TFabrica - TechSol
67 lines • 2.67 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TfabricaSettingsData = (function () {
function TfabricaSettingsData() {
this.basePath = "";
this.mainAppUrl = "/";
this.authenticationApiUrl = "/api/Auth/Authenticate";
this.translationsApiUrl = "/api/Config/Translations?lang=";
this.supportedLanguagesApiUrl = "/api/Config/SupportedLanguages";
this.userMenuApiUrl = "/api/Menu/UserMenu";
this.logApiUrl = "/api/Log/AddLog";
this.appName = "tApi";
this.appTitle = "tFabrica";
this.properties = new Array();
}
TfabricaSettingsData.prototype.getauthenticationApiUrl = function () {
if (this.authenticationApiUrl.startsWith("http")) {
return this.authenticationApiUrl;
}
return this.basePath + this.authenticationApiUrl;
};
TfabricaSettingsData.prototype.gettranslationsApiUrl = function () {
if (this.translationsApiUrl.startsWith("http")) {
return this.translationsApiUrl;
}
return this.basePath + this.translationsApiUrl;
};
TfabricaSettingsData.prototype.getsupportedLanguagesApiUrl = function () {
if (this.supportedLanguagesApiUrl.startsWith("http")) {
return this.supportedLanguagesApiUrl;
}
return this.basePath + this.supportedLanguagesApiUrl;
};
TfabricaSettingsData.prototype.getuserMenuApiUrl = function () {
if (this.userMenuApiUrl.startsWith("http")) {
return this.userMenuApiUrl;
}
return this.basePath + this.userMenuApiUrl;
};
TfabricaSettingsData.prototype.getlogApiUrl = function () {
if (this.logApiUrl.startsWith("http")) {
return this.logApiUrl;
}
return this.basePath + this.logApiUrl;
};
TfabricaSettingsData.prototype.getCommonApiValue = function (key) {
var that = this;
var value = "";
this.properties.forEach(function (property) {
if (property.key == key) {
if (property.value.startsWith("http")) {
value = property.value;
}
value = that.basePath + property.value;
}
});
return value;
};
TfabricaSettingsData.prototype.getAppTitle = function () {
if (this.appTitle != "")
return this.appTitle;
return this.appName;
};
return TfabricaSettingsData;
}());
exports.TfabricaSettingsData = TfabricaSettingsData;
//# sourceMappingURL=tfabrica.settings.model.js.map