From 99769eb80ed778a1e4a602ea9c066364866f54a8 Mon Sep 17 00:00:00 2001 From: Pendea Raul Date: Fri, 29 Nov 2024 12:20:52 +0200 Subject: [PATCH] Bug fixes ch38688 --- src_ts/app-shell.ts | 16 +++++++++++----- src_ts/components/appshell/page-header.ts | 2 +- src_ts/components/pages/view-fam.ts | 11 +++++++++++ src_ts/components/pages/view-fmm.ts | 11 +++++++++++ src_ts/components/pages/view-fmp.ts | 11 +++++++++++ src_ts/components/pages/view-partnerships.ts | 11 +++++++++++ 6 files changed, 56 insertions(+), 6 deletions(-) diff --git a/src_ts/app-shell.ts b/src_ts/app-shell.ts index 826c6580..aa295525 100644 --- a/src_ts/app-shell.ts +++ b/src_ts/app-shell.ts @@ -81,6 +81,9 @@ export class AppShell extends LoadingMixin(connect(store)(LitElement)) { :host-context([dir='rtl']) reason-display { --text-padding: 26px 80px 26px 24px; } + div[slot='tabs'] { + width: 100%; + } sl-tab-group { --indicator-color: var(--primary-color); max-width: calc(100% - 2px); @@ -159,7 +162,7 @@ export class AppShell extends LoadingMixin(connect(store)(LitElement)) {
- + ${this.tabs?.map( (t) => html` { if (user) { + if (!user.is_unicef_user) { + window.location.href = window.location.origin + '/menu/'; + } this.user = user; this.getCountryDetails(); - // Seems to not be used // this.getSectors(); // this.getDropdownsStaticData(); @@ -392,9 +397,10 @@ export class AppShell extends LoadingMixin(connect(store)(LitElement)) { } getCountryDetails() { - sendRequest({endpoint: Endpoints.userCountry}).then( - (resp) => (this.countryDetails = resp && resp.length ? resp[0] : {}) - ); + sendRequest({endpoint: Endpoints.userCountry}).then((resp) => { + this.countryDetails = resp && resp.length ? resp[0] : {}; + this.requestUpdate(); + }); } // Seems to not be used diff --git a/src_ts/components/appshell/page-header.ts b/src_ts/components/appshell/page-header.ts index 61b2b523..862df75f 100644 --- a/src_ts/components/appshell/page-header.ts +++ b/src_ts/components/appshell/page-header.ts @@ -38,7 +38,7 @@ export class PageHeader extends LitElement { } - +