Skip to content

Commit

Permalink
wfnews-2158: Missing url if bulletinUrl is null (bcgov#1878)
Browse files Browse the repository at this point in the history
* wfnews-2158

* wfnews-2158
  • Loading branch information
yzlucas authored and sukhpalp committed May 2, 2024
1 parent d7242aa commit 7a228a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ <h1>Area Restrictions
</h1>
<div class="content-panel-subtitle">Area Restriction Information</div>
<div *ngFor="let area of areaRestrictions">
<a [href]="area.bulletinUrl" target="_blank" rel="noopener" class="content-panel-link no-print">{{area.name}}</a>
<p class="show-print">{{area.name}} Link: <a [href]="area.bulletinUrl" target="_blank" rel="noopener" class="content-panel-link show-print">{{area.bulletinUrl}}</a></p>
<a [href]="area.bulletinUrl || areaRestrictionLink" target="_blank" rel="noopener" class="content-panel-link no-print">{{area.name}}</a>
<p class="show-print">{{area.name}} Link: <a [href]="area.bulletinUrl || areaRestrictionLink" target="_blank" rel="noopener" class="content-panel-link show-print">{{area.bulletinUrl || areaRestrictionLink}}</a></p>
</div>
<div *ngIf="!areaRestrictions || areaRestrictions.length <= 0">There are no current area restrictions near this incident.</div>
<div style="padding: 10px;"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -99,6 +100,9 @@ console.error(error);
});

this.fetchPrimaryImage();
this.areaRestrictionLink = this.appConfigService.getConfig().externalAppConfig[
'currentRestrictions'
] as unknown as string
}

public getStageOfControlLabel(code: string) {
Expand Down

0 comments on commit 7a228a8

Please sign in to comment.