diff --git a/src_ts/components/app-shell/app-shell.ts b/src_ts/components/app-shell/app-shell.ts index b50abea7..934ae97c 100644 --- a/src_ts/components/app-shell/app-shell.ts +++ b/src_ts/components/app-shell/app-shell.ts @@ -39,6 +39,7 @@ import './footer/page-footer.js'; import './app-theme.js'; import {ToastNotificationHelper} from '../common/toast-notifications/toast-notification-helper'; +import '../common/etools-notifications/etools-notifications'; import user from '../../redux/reducers/user'; import commonData, {CommonDataState} from '../../redux/reducers/common-data'; import {SMALL_MENU_ACTIVE_LOCALSTORAGE_KEY} from '../../config/config'; @@ -185,6 +186,9 @@ export class AppShell extends connect(store)(LoadingMixin(LitElement)) { this.appToastsNotificationsHelper = new ToastNotificationHelper(); this.appToastsNotificationsHelper.addToastNotificationListeners(); + const etoolsNotifications = document.createElement('etools-notifications'); + document.querySelector('body')!.appendChild(etoolsNotifications); + const menuTypeStoredVal: string | null = localStorage.getItem(SMALL_MENU_ACTIVE_LOCALSTORAGE_KEY); if (!menuTypeStoredVal) { this.smallMenu = false; diff --git a/src_ts/components/common/etools-notifications/etools-notifications.ts b/src_ts/components/common/etools-notifications/etools-notifications.ts new file mode 100644 index 00000000..19aca018 --- /dev/null +++ b/src_ts/components/common/etools-notifications/etools-notifications.ts @@ -0,0 +1,124 @@ +import {LitElement, html, customElement, property} from 'lit-element'; +import {AnyObject} from '@unicef-polymer/etools-types'; + +/** + * @LitElement + * @customElement + */ +@customElement('etools-notifications') +export class EtoolsNotifications extends LitElement { + public render() { + // main template + // language=HTML + return html` + + + ${this.notifications.length + ? html`