From 7a228a805287cbdef5a85dbcb3b27c4b3b86e799 Mon Sep 17 00:00:00 2001 From: Lucas Li <35748253+yzlucas@users.noreply.github.com> Date: Wed, 1 May 2024 16:01:24 -0700 Subject: [PATCH] wfnews-2158: Missing url if bulletinUrl is null (#1878) * wfnews-2158 * wfnews-2158 --- .../incident-info-panel/incident-info-panel.component.html | 4 ++-- .../incident-info-panel/incident-info-panel.component.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.html b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.html index 8ef9dbb09d..026274f2f7 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.html +++ b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.html @@ -86,8 +86,8 @@

Area Restrictions

Area Restriction Information
- {{area.name}} -

{{area.name}} Link: {{area.bulletinUrl}}

+ {{area.name}} +

{{area.name}} Link: {{area.bulletinUrl || areaRestrictionLink}}

There are no current area restrictions near this incident.
diff --git a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.ts b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.ts index be35499ba6..1af6ad5445 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.ts +++ b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-info-panel/incident-info-panel.component.ts @@ -43,6 +43,7 @@ export class IncidentInfoPanel implements AfterViewInit { public convertToYoutubeId = convertToYoutubeId; public isMobileView = isMobileView; getResponseTypeDescription = getResponseTypeDescription; + public areaRestrictionLink : string; public constructor( private publishedIncidentService: PublishedIncidentService, @@ -99,6 +100,9 @@ console.error(error); }); this.fetchPrimaryImage(); + this.areaRestrictionLink = this.appConfigService.getConfig().externalAppConfig[ + 'currentRestrictions' + ] as unknown as string } public getStageOfControlLabel(code: string) {