Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wfnews 1036 #1181

Merged
merged 10 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions client/wfnews-war/src/main/angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ export const ICON = {
MORE: 'more',
REPORT: 'report',
SAVED: 'saved',
ARROW: 'arrow',
CANCEL: 'cancel',
AREA_RESTRICTION: 'area-restriction',
BAN: 'ban',
FIRE_DANGER_VERY_LOW: 'fire-danger-very-low',
FIRE_DANGER_LOW: 'fire-danger-low',
FIRE_DANGER_MODERATE: 'fire-danger-moderate',
FIRE_DANGER_HIGH: 'fire-danger-high',
FIRE_DANGER_EXTREME: 'fire-danger-extreme',
ROAD_EVENT: 'road-event',
CLOSED_RECREATION_SITE: 'closed-recreation-site',
REGIONAL_DISTRICTS: 'regional-districts',
BROWN_SQUARE: 'brown-square',
INDIAN_RESERVE: 'indian-reserve',

};

@Component({
Expand Down Expand Up @@ -455,6 +470,62 @@ export class AppComponent implements OnDestroy, OnInit, AfterViewInit {
ICON.SAVED,
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/images/svg-icons/saved.svg')
);
this.matIconRegistry.addSvgIcon(
ICON.ARROW,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/arrow.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.CANCEL,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/cancel.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.AREA_RESTRICTION,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/area-restriction.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.BAN,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/ban.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.FIRE_DANGER_VERY_LOW,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/fire-danger-very-low.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.FIRE_DANGER_LOW,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/fire-danger-low.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.FIRE_DANGER_MODERATE,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/fire-danger-moderate.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.FIRE_DANGER_HIGH,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/fire-danger-high.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.FIRE_DANGER_EXTREME,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/fire-danger-extreme.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.ROAD_EVENT,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/road-event.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.CLOSED_RECREATION_SITE,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/closed-recreation-site.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.REGIONAL_DISTRICTS,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/regional-districts.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.BROWN_SQUARE,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/brown-square.svg")
);
this.matIconRegistry.addSvgIcon(
ICON.INDIAN_RESERVE,
this.domSanitizer.bypassSecurityTrustResourceUrl("assets/images/svg-icons/indian-reserve.svg")
);
}

isAdminPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,29 +132,241 @@ <h2 class="wildfire-count">
<div class="mobile-wildfire-count">
<span style="margin: auto; display: flex;"><span class='material-icons-outlined fire-icon'>local_fire_department</span>{{ activeFireCount | async }} Active Wildfires</span>
</div>
<wf-map-container class="map-container" [mapConfig]="mapConfig" (mapInitialized)="initMap($event)" (toggleAccordion)="onToggleAccordion()"></wf-map-container>
<wf-map-container class="map-container" [mapConfig]="mapConfig" (mapInitialized)="initMap($event)" (toggleAccordion)="onToggleAccordion()" (selectIncidents)="onSelectIncidents($event)"></wf-map-container>
</div>
<div #resizeBox id="draggable-panel" class="draggable-panel" cdkDragLockAxis="y" (cdkDragMoved)="dragMove($event)" (cdkDragEnded)="dragDropped($event)" cdkDrag>
<div class="grab-container" cdkDragHandle>
<div id="grabber" class="drag-grabber"></div>
<div style="text-align: center; padding: 7px;">{{selectedPanel === 'wildfire-stage-of-control' ? 'Wildfires' :
selectedPanel === 'evacuation-orders-and-alerts' ? 'Evacuation Orders' :
selectedPanel === 'area-restrictions' ? 'Area Restrictions' :
selectedPanel === 'bans-and-prohibitions' ? 'Bans &amp; Prohibitions' :
selectedPanel === 'smoke-forecast' ? 'smoke-forecast' :
selectedPanel === 'fire-danger' ? 'Fire Danger' :
selectedPanel === 'routes-impacted' ? 'Drive BC' :
selectedPanel === 'local-authorities' ? 'Local Authorities' : ''}}</div>
</div>
<div class="panel-container" style="padding-top: 10px;">
<panel-wildfire-stage-of-control-container-desktop *ngIf="selectedPanel === 'wildfire-stage-of-control'"></panel-wildfire-stage-of-control-container-desktop>
<panel-evacuation-orders-and-alerts *ngIf="selectedPanel === 'evacuation-orders-and-alerts'"></panel-evacuation-orders-and-alerts>
<panel-area-restrictions *ngIf="selectedPanel === 'area-restrictions'"></panel-area-restrictions>
<panel-bans-prohibitions *ngIf="selectedPanel === 'bans-and-prohibitions'"></panel-bans-prohibitions>
<panel-smoke-forecast *ngIf="selectedPanel === 'smoke-forecast'"></panel-smoke-forecast>
<panel-fire-danger *ngIf="selectedPanel === 'fire-danger'"></panel-fire-danger>
<panel-road-conditions *ngIf="selectedPanel === 'routes-impacted'"></panel-road-conditions>
<panel-local-authority *ngIf="selectedPanel === 'local-authorities'"></panel-local-authority>
<div #resizeBox id="draggable-panel" class="draggable-panel" cdkDragLockAxis="y" (cdkDragMoved)="dragMove($event)" (cdkDragEnded)="dragDropped($event)" cdkDrag *ngIf="showPanel && incidentRefs && incidentRefs.length">

<div class="panel-container" style="padding-top: 10px;" cdkDragHandle>
<div class="draggable-panel-title">
{{incidentRefs.length}} Results <mat-icon svgIcon="cancel" (click)="closePanel()"></mat-icon>
</div>
<div *ngIf="filteredWildfires && filteredWildfires.length">
<div class="criteria-title">Wildfires</div>
<div *ngFor="let wildfire of filteredWildfires" class="widget-card">
<div class="widget-row">
<div class="left-content">
<img *ngIf="wildfire.layerId === 'active-wildfires-fire-of-note'" class="incident-icon" height="20" width="20" src="/assets/images/local_fire_department.png" alt="local_fire_department">
<span class="circle-icon {{wildfire.layerId}}"></span>
{{wildfire.properties.incident_name ? wildfire.properties.incident_name : wildfire.properties.incident_number_label + ' Wildfire'}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredFirePerimeters && filteredFirePerimeters.length">
<div class="criteria-title">Fire Perimeters</div>
<div *ngFor="let firePerimeter of filteredFirePerimeters" class="widget-card">
<div class="widget-row">
<div class="left-content">
{{firePerimeter.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredEvacs && filteredEvacs.length">
<div class="criteria-title">Evacuations</div>
<div *ngFor="let evac of filteredEvacs" class="widget-card">
<div class="widget-row">
<div class="left-content">
<img *ngIf="evac.properties.ORDER_ALERT_STATUS === 'Alert'" class="incident-icon" height="20" width="20" src="/assets/images/svg-icons/evacuation-alert.svg" alt="Order">
<img *ngIf="evac.properties.ORDER_ALERT_STATUS === 'Order'" class="incident-icon" height="20" width="20" src="/assets/images/svg-icons/evacuation-order.svg" alt="Order">

Evacuation {{evac.properties.ORDER_ALERT_STATUS}} for {{evac.properties.ORDER_ALERT_NAME}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredAreaRestrictions && filteredAreaRestrictions.length">
<div class="criteria-title">Area Restrictions</div>
<div *ngFor="let areaRestriction of filteredAreaRestrictions" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="area-restriction" alt="Area Restrictions"></mat-icon>
{{areaRestriction.properties.NAME}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredBansAndProhibitions && filteredBansAndProhibitions.length">
<div class="criteria-title">Fire Bans and Prohibitions</div>
<div *ngFor="let ban of filteredBansAndProhibitions" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="ban" alt="Ban"></mat-icon>
Fire Ban on {{ban.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredDangerRatings && filteredDangerRatings.length">
<div class="criteria-title">Fire Danger Rating</div>
<div *ngFor="let danger of filteredDangerRatings" class="widget-card">
<div class="widget-row">
<div class="left-content">
<div *ngIf = "danger.properties.DANGER_RATING_DESC === 'Extreme'">
<mat-icon class="incident-icon" svgIcon="fire-danger-extreme" alt="Fire Danger"></mat-icon>
{{danger.properties.DANGER_RATING_DESC}} Fire Danger
</div>
<div *ngIf = "danger.properties.DANGER_RATING_DESC === 'High'">
<mat-icon class="incident-icon" svgIcon="fire-danger-high" alt="Fire Danger"></mat-icon>
{{danger.properties.DANGER_RATING_DESC}} Fire Danger
</div>
<div *ngIf = "danger.properties.DANGER_RATING_DESC === 'Moderate'">
<mat-icon class="incident-icon" svgIcon="fire-danger-moderate" alt="Fire Danger"></mat-icon>
{{danger.properties.DANGER_RATING_DESC}} Fire Danger
</div>
<div *ngIf = "danger.properties.DANGER_RATING_DESC === 'Low'">
<mat-icon class="incident-icon" svgIcon="fire-danger-low" alt="Fire Danger"></mat-icon>
{{danger.properties.DANGER_RATING_DESC}} Fire Danger
</div>
<div *ngIf = "danger.properties.DANGER_RATING_DESC === 'Very Low'">
<mat-icon class="incident-icon" svgIcon="fire-danger-very-low" alt="Fire Danger"></mat-icon>
{{danger.properties.DANGER_RATING_DESC}} Fire Danger
</div>
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredRoadEvents && filteredRoadEvents.length">
<div class="criteria-title">Road Events</div>
<div *ngFor="let event of filteredRoadEvents" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="road-event" alt="Ban"></mat-icon>
{{event.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredClosedRecreationSites && filteredClosedRecreationSites.length">
<div class="criteria-title">Closed Recreation Sites</div>
<div *ngFor="let closedRecreationSite of filteredClosedRecreationSites" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="closed-recreation-site" alt="closed-recreation-site"></mat-icon>
{{closedRecreationSite.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredForestServiceRoads && filteredForestServiceRoads.length">
<div class="criteria-title">Forest Service Roads</div>
<div *ngFor="let forestServiceRoad of filteredForestServiceRoads" class="widget-card">
<div class="widget-row">
<div class="left-content">
{{forestServiceRoad.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredProtectedLandsAccessRestrictions && filteredProtectedLandsAccessRestrictions.length">
<div class="criteria-title">Protected Lands Access Restrictions</div>
<div *ngFor="let protectedLandsAccessRestriction of filteredProtectedLandsAccessRestrictions" class="widget-card">
<div class="widget-row">
<div class="left-content">
{{protectedLandsAccessRestriction.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredRegionalDistricts && filteredRegionalDistricts.length">
<div class="criteria-title">Regional Districts</div>
<div *ngFor="let regionalDistrict of filteredRegionalDistricts" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="regional-districts" alt="regional-districts"></mat-icon>
{{regionalDistrict.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredMunicipalities && filteredMunicipalities.length">
<div class="criteria-title">Municipalities</div>
<div *ngFor="let municipality of filteredMunicipalities" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="regional-districts" alt="municipalities"></mat-icon>
{{municipality.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredFirstNationsTreatyLand && filteredFirstNationsTreatyLand.length">
<div class="criteria-title">First Nations Treaty Land</div>
<div *ngFor="let firstNationsTreatyLand of filteredFirstNationsTreatyLand" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="brown-square" alt="first-nations-treaty-land"></mat-icon>
{{firstNationsTreatyLand.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>

<div *ngIf="filteredIndianReserve && filteredIndianReserve.length">
<div class="criteria-title">Indian Reserve</div>
<div *ngFor="let indianReserve of filteredIndianReserve" class="widget-card">
<div class="widget-row">
<div class="left-content">
<mat-icon class="incident-icon" svgIcon="indian-reserve" alt="indian-reserve"></mat-icon>
{{indianReserve.title}}
</div>
<div class="right-content">
<mat-icon svgIcon='arrow'></mat-icon>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
Loading
Loading