Skip to content

Commit

Permalink
Wfnews 2101 (#1814)
Browse files Browse the repository at this point in the history
* add out-fires into preview panel

* pop up preview panel on mobile as list

* fix dashboard page totals this year number
  • Loading branch information
yzlucas authored Apr 22, 2024
1 parent 434e7de commit 5cd80b3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,22 @@ export class FireCentreStatsWidget implements AfterViewInit {
n,
{
activeBeingHeldFires,
activeBeingHeldFiresOfNote,
activeOutOfControlFires,
activeOutOfControlFiresOfNote,
activeUnderControlFires,
activeUnderControlFiresOfNote,
outFires,
},
) =>
n +
activeBeingHeldFires +
activeBeingHeldFiresOfNote +
activeOutOfControlFires +
activeUnderControlFires,
activeOutOfControlFiresOfNote +
activeUnderControlFires +
activeUnderControlFiresOfNote +
outFires,
0,
) || 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,20 @@ export class FireTotalsWidget implements AfterViewInit {
n,
{
activeBeingHeldFires,
activeBeingHeldFiresOfNote,
activeOutOfControlFires,
activeOutOfControlFiresOfNote,
activeUnderControlFires,
activeUnderControlFiresOfNote
},
) =>
n +
activeBeingHeldFires +
activeBeingHeldFiresOfNote +
activeOutOfControlFires +
activeUnderControlFires,
activeOutOfControlFiresOfNote +
activeUnderControlFires +
activeUnderControlFiresOfNote,
0,
) || 0;
const currentYearOut =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,21 @@ export class HistoricalComparisonWidget implements AfterViewInit {
n,
{
activeBeingHeldFires,
activeBeingHeldFiresOfNote,
activeOutOfControlFires,
activeOutOfControlFiresOfNote,
activeUnderControlFires,
activeUnderControlFiresOfNote,
outFires,
},
) =>
n +
activeBeingHeldFires +
activeBeingHeldFiresOfNote +
activeOutOfControlFires +
activeOutOfControlFiresOfNote +
activeUnderControlFires +
activeUnderControlFiresOfNote +
outFires,
0,
) || 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div>
<div class="draggable-panel" *ngIf="showPanel && currentIncidentRefs && currentIncidentRefs.length > 1">
<div class="draggable-panel" *ngIf="showPanel && currentIncidentRefs && currentIncidentRefs.length >= 1">
<div class="panel-container" >
<div class="draggable-panel-title">
{{currentIncidentRefs.length}} Results <mat-icon svgIcon="cancel" (click)="closePanel()"></mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
height: 22px;
}
}
&.bcws-activefires-publicview-inactive {
&.bcws-activefires-publicview-inactive, &.active-wildfires-out {
background-color: #5c6671;
border: 1px solid black;
border-radius: 50%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class DraggablePanelComponent implements OnInit, OnChanges, OnDestroy {
'active-wildfires-under-control',
'bcws-activefires-publicview-inactive',
'fire-perimeters',
"active-wildfires-out"
];
convertToDateYear = convertToDateYear;
convertToDateTime = convertToDateTime;
Expand Down Expand Up @@ -155,7 +156,9 @@ export class DraggablePanelComponent implements OnInit, OnChanges, OnDestroy {
}
}
}
if (this.currentIncidentRefs.length === 1) {
if (this.currentIncidentRefs.length === 1 && this.allowBackToIncidentsPanel) {
// only show preview detial if it is through openPreviewPanel(). We will always the preview list page by clicking on map, even there is only single item.
this.showPanel = true;
const viewer = getActiveMap().$viewer;
for (const polygon of this.highlightPolygons) {
viewer.map.removeLayer(polygon);
Expand Down Expand Up @@ -384,6 +387,7 @@ export class DraggablePanelComponent implements OnInit, OnChanges, OnDestroy {
case 'active-wildfires-under-control':
case 'bcws-activefires-publicview-inactive':
case 'active-wildfires-holding':
case 'active-wildfires-out':
return 'Wildfire';
}
}
Expand Down Expand Up @@ -677,6 +681,7 @@ return 'Unknown';
case 'active-wildfires-out-of-control':
case 'active-wildfires-holding':
case 'active-wildfires-under-control':
case 'active-wildfires-out':
if (
item.properties.fire_year &&
item.properties.incident_number_label
Expand Down

0 comments on commit 5cd80b3

Please sign in to comment.