diff --git a/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/active-fires-widget/active-fires-widget.component.ts b/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/active-fires-widget/active-fires-widget.component.ts index 0d6c66bc62..37b6f6687f 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/active-fires-widget/active-fires-widget.component.ts +++ b/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/active-fires-widget/active-fires-widget.component.ts @@ -29,7 +29,7 @@ export class ActiveFiresWidget implements AfterViewInit { public chartSize = 180; - constructor(private publishedIncidentService: PublishedIncidentService) {} + constructor(private publishedIncidentService: PublishedIncidentService) { } ngAfterViewInit(): void { this.queryData(); @@ -40,7 +40,7 @@ export class ActiveFiresWidget implements AfterViewInit { const fireCentre = this.selectedFireCentreCode && this.selectedFireCentreCode !== '' ? FireCentres.find((fc) => fc.code === this.selectedFireCentreCode) - .description + .description : 'BC'; Promise.all([ @@ -134,35 +134,35 @@ export class ActiveFiresWidget implements AfterViewInit { this.activeFireOfNote = currentYearActiveFoN + previousYearActiveFoN; this.activeOutOfControl = (stats.reduce( - (n, { activeOutOfControlFires }) => n + activeOutOfControlFires, + (n, { activeOutOfControlFires, activeOutOfControlFiresOfNote }) => n + activeOutOfControlFires + activeOutOfControlFiresOfNote, 0, ) || 0) + (previousYearStats.reduce( - (n, { activeOutOfControlFires }) => n + activeOutOfControlFires, + (n, { activeOutOfControlFires, activeOutOfControlFiresOfNote }) => n + activeOutOfControlFires + activeOutOfControlFiresOfNote, 0, ) || 0); this.activeBeingHeld = (stats.reduce( - (n, { activeBeingHeldFires }) => n + activeBeingHeldFires, + (n, { activeBeingHeldFires, activeBeingHeldFiresOfNote }) => n + activeBeingHeldFires + activeBeingHeldFiresOfNote, 0, ) || 0) + (previousYearStats.reduce( - (n, { activeBeingHeldFires }) => n + activeBeingHeldFires, + (n, { activeBeingHeldFires, activeBeingHeldFiresOfNote }) => n + activeBeingHeldFires + activeBeingHeldFiresOfNote, 0, ) || 0); this.activeUnderControl = (stats.reduce( - (n, { activeUnderControlFires }) => n + activeUnderControlFires, + (n, { activeUnderControlFires, activeUnderControlFiresOfNote }) => n + activeUnderControlFires + activeUnderControlFiresOfNote, 0, ) || 0) + (previousYearStats.reduce( - (n, { activeUnderControlFires }) => n + activeUnderControlFires, + (n, { activeUnderControlFires, activeUnderControlFiresOfNote }) => n + activeUnderControlFires + activeUnderControlFiresOfNote, 0, ) || 0); this.outOfControlData = [ { name: 'Out of Control', value: this.activeOutOfControl }, - { name: 'All Fires Minus', value: this.activeFires - this.activeOutOfControl}, + { name: 'All Fires Minus', value: this.activeFires - this.activeOutOfControl }, ]; this.beingHeldData = [ { name: 'Being Held', value: this.activeBeingHeld },