Skip to content

Commit

Permalink
WFNEWS-2514, Assoicate fire navigate does not work on area restrictio…
Browse files Browse the repository at this point in the history
…n page
  • Loading branch information
yzlucas committed Dec 14, 2024
1 parent 8aefcbd commit a121a87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="info"><img height="20" width="20" class="icon" src="/assets/images/svg-icons/location-pin.svg"
alt="Location Pin" />{{restrictionData?.fireCentre}}</div>
<div class="info"><img height="20" width="20" class="icon" src="/assets/images/svg-icons/carbon_calendar.svg"
alt="Calendar" />Discovered on {{incident.discoveryDate}}<img height="20" width="20" class="arrow-button"
alt="Calendar" />Discovered on {{incident.discoveryDate}}<img height="20" width="20" class="arrow-button" (click)="navToIncident(incident)"
alt="icon" src="/assets/images/svg-icons/forward-arrow-grey.svg"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';
import { Router as Route } from '@angular/router';
import { Router as Route, Router } from '@angular/router';
import { LocationData } from '@app/components/wildfires-list-header/filter-by-location/filter-by-location-dialog.component';
import { AGOLService, AgolOptions } from '@app/services/AGOL-service';
import { PublishedIncidentService } from '@app/services/published-incident-service';
Expand Down Expand Up @@ -61,6 +61,8 @@ export class AreaRestrictionsFullDetailsComponent implements OnInit {
private watchlistService: WatchlistService,
private commonUtilityService: CommonUtilityService,
private metaService: Meta,
protected router: Router,

) {}

async ngOnInit(): Promise<void> {
Expand Down Expand Up @@ -182,6 +184,19 @@ export class AreaRestrictionsFullDetailsComponent implements OnInit {
}
this.cdr.detectChanges();
}
navToIncident(incident: any) {
console.log(incident);
this.router.navigate([ResourcesRoutes.PUBLIC_INCIDENT], {
queryParams: {
fireYear: incident.fireYear,
incidentNumber: incident.incidentNumberLabel,
source: [ResourcesRoutes.FULL_DETAILS],
sourceId: this.id,
sourceType: 'area-restriction',
name: this.name
},
});
}

async populateAreaRestrictionByID(options: AgolOptions = null) {
this.restrictionData = null;
Expand Down

0 comments on commit a121a87

Please sign in to comment.