diff --git a/src/app/remotes/announcement-list-active/announcement-list-active.component.html b/src/app/remotes/announcement-list-active/announcement-list-active.component.html index bc9f4ec..823790c 100644 --- a/src/app/remotes/announcement-list-active/announcement-list-active.component.html +++ b/src/app/remotes/announcement-list-active/announcement-list-active.component.html @@ -14,6 +14,9 @@ [class.pi-info-circle]="announcement.type === 'INFO'" [class.pi-calendar]="announcement.type === 'EVENT'" [class.pi-wrench]="announcement.type === 'SYSTEM_MAINTENANCE'" + [class.text-red-800]="announcement.priority === 'IMPORTANT'" + [class.text-yellow-800]="announcement.priority === 'NORMAL'" + [class.text-blue-800]="announcement.priority === 'LOW'" >
@@ -39,22 +42,32 @@ [showCloseIcon]="false" styleClass="sm:m-0 w-11 sm:max-w-28rem md:max-w-30rem lg:max-w-40rem announcement-overlay-position" > -
-
+
+
{{ announcement.title }}
-
- {{ announcement.content }} -
+
diff --git a/src/app/remotes/announcement-list-active/announcement-list-active.component.scss b/src/app/remotes/announcement-list-active/announcement-list-active.component.scss index 763adea..85f2e30 100644 --- a/src/app/remotes/announcement-list-active/announcement-list-active.component.scss +++ b/src/app/remotes/announcement-list-active/announcement-list-active.component.scss @@ -4,7 +4,8 @@ :host ::ng-deep { &.p-overlaypanel .p-overlaypanel-content { - padding: var(--panel-content-padding); + //padding: var(--panel-content-padding); + padding: 0; } @media screen and (min-width: 992px) { diff --git a/src/app/remotes/announcement-list-active/announcement-list-active.component.ts b/src/app/remotes/announcement-list-active/announcement-list-active.component.ts index 13d95fe..edc4a10 100644 --- a/src/app/remotes/announcement-list-active/announcement-list-active.component.ts +++ b/src/app/remotes/announcement-list-active/announcement-list-active.component.ts @@ -1,8 +1,9 @@ import { Component, Inject, Input } from '@angular/core' -import { Location } from '@angular/common' +import { CommonModule, Location } from '@angular/common' import { HttpClient } from '@angular/common/http' import { TranslateLoader, TranslateService } from '@ngx-translate/core' import { BehaviorSubject, Observable, ReplaySubject, catchError, map, mergeMap, of } from 'rxjs' +import { OverlayPanelModule } from 'primeng/overlaypanel' import { AppStateService } from '@onecx/angular-integration-interface' import { @@ -30,7 +31,7 @@ import { environment } from 'src/environments/environment' templateUrl: './announcement-list-active.component.html', styleUrls: ['./announcement-list-active.component.scss'], standalone: true, - imports: [AngularRemoteComponentsModule, PortalCoreModule, SharedModule], + imports: [AngularRemoteComponentsModule, CommonModule, PortalCoreModule, SharedModule, OverlayPanelModule], providers: [ { provide: BASE_URL, useValue: new ReplaySubject(1) }, provideTranslateServiceForRoot({ @@ -106,4 +107,8 @@ export class OneCXAnnouncementListActiveComponent implements ocxRemoteComponent, }) ) } + // display simple formatted text + public convertLineBreaks(text?: string) { + return text?.replace(/(?:\r\n|\r|\n)/g, '
') ?? '' + } }