var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var Unibase; (function (Unibase) { let Themes; (function (Themes) { let Compact; (function (Compact) { let Components; (function (Components) { class Nav extends Unibase.Platform.Core.BaseComponent { constructor() { super(); this.indexInstance = Unibase.Themes.Compact.Components.Index.Instance(); this.layoutIndex = this.indexInstance.layoutIndex; this.leftLayout = this.indexInstance.leftLayout; this.topLayout = this.indexInstance.topLayout; this.topLeftLayout = this.indexInstance.topLeftLayout; this.currentTheme = this.indexInstance.currentTheme; this.Logo = this.indexInstance.Logo; this.desktopMode = this.indexInstance.desktopMode; this.tabMode = this.indexInstance.tabMode; this.switchToSecondary = false; this.isRestrictHidden = ''; this.initialLoad = false; this.isList = false; this.isDshboardBck = false; this.isDshboardBckArray = []; this.dashboards = []; this.apps = []; this.createapps = []; this.fileCacheHelper.loadCssFile("tenants/themes/compact/components/nav/nav.style.css", null); } cssFiles() { return []; } jsFiles() { return []; } html(id, containerid) { var _a, _b, _c, _d; var instance = this; var BranchName = "NA"; var TrimmedBranchName = "NA"; if (Unibase.Platform.Membership.Infos.Identity.getCurrentUser().settings != null) { var branch = Unibase.Platform.Membership.Infos.Identity.getCurrentUser().settings.find(x => x.settingName == "branchname"); if (branch != undefined) { BranchName = branch.settingValue; TrimmedBranchName = BranchName.length > 20 ? branch.settingValue.substring(0, 20) + "..." : BranchName; } } var branchshortcode = "NA"; if (Unibase.Platform.Membership.Infos.Identity.getCurrentUser().settings != null) { var branchname = Unibase.Platform.Membership.Infos.Identity.getCurrentUser().settings.find(x => x.settingName == "branchcode"); if (branchname != undefined && branchname != null) { branchshortcode = branchname.settingValue; } } var TrimmedUserName = ""; var UserName = Unibase.Platform.Membership.Infos.Identity.getCurrentUser().name; if (UserName != null && UserName != undefined && UserName != "") { TrimmedUserName = UserName.length > 20 ? UserName.substring(0, 20) + "..." : UserName; } if (Unibase.Platform.Membership.Infos.Identity.currentUser.isRestrictedUser) { instance.isRestrictHidden = 'd-none'; } var adminHtml = ''; let html = `
`; return html; } loadimage() { var _a; var userImage = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.photoUrl; if (userImage != null && userImage != undefined && userImage != "") { $("#loginUserImg").attr("src", userImage); } else { $("#loginUserImg").attr("src", "tenants/themes/compact/imgs/avatar.svg"); } } load(id, containerid, callback) { const instance = this; var html = this.html(0, containerid); if (this.layoutIndex == instance.leftLayout) { $("#" + containerid).html(html); } $(window).on('orientationchange', function () { if ((screen.width < 1198 || isMobileApp) && screen.width > screen.height) { var msg = 'Screen Rotation detectedNo Dashboards Found!
${createDbHtml}