From 611953b234bbba646dbf83c998288d5febf55188 Mon Sep 17 00:00:00 2001 From: Sean Sylver Date: Mon, 16 Dec 2024 18:19:41 -0800 Subject: [PATCH 1/3] WFNEWS-2513 Text changes for response type description and title --- ...ident-overview-panel-mobile.component.html | 3 +-- .../response-type-card.component.html | 19 ++----------------- .../src/main/angular/src/app/utils/index.ts | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-overview-panel-mobile/incident-overview-panel-mobile.component.html b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-overview-panel-mobile/incident-overview-panel-mobile.component.html index 09e2752a05..8a7c5edc52 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-overview-panel-mobile/incident-overview-panel-mobile.component.html +++ b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-overview-panel-mobile/incident-overview-panel-mobile.component.html @@ -4,8 +4,7 @@ {{incident.resourceDetail}}
-

Response Type

-

Response{{getResponseTypeTitle(incident.responseTypeCode)}}

+

Response

{{getResponseTypeDescription(incident.responseTypeCode)}}

diff --git a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-tabs/cards/response-type-card/response-type-card.component.html b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-tabs/cards/response-type-card/response-type-card.component.html index 1cd26a538c..abf9959650 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-tabs/cards/response-type-card/response-type-card.component.html +++ b/client/wfnews-war/src/main/angular/src/app/components/public-incident-page/incident-tabs/cards/response-type-card/response-type-card.component.html @@ -1,23 +1,8 @@ - +
- Response Type + Response
-
-
full response - Full Response -
-
monitored response - Monitored Response -
-
modified response - Modified Response -
- {{ responseText }}
-
\ No newline at end of file diff --git a/client/wfnews-war/src/main/angular/src/app/utils/index.ts b/client/wfnews-war/src/main/angular/src/app/utils/index.ts index ef8a76e863..31a7c14d94 100644 --- a/client/wfnews-war/src/main/angular/src/app/utils/index.ts +++ b/client/wfnews-war/src/main/angular/src/app/utils/index.ts @@ -455,7 +455,7 @@ export function convertToFireCentreDescription(code: string): string { } export function isMobileView() { - return ((window.innerWidth < 768 && window.innerHeight < 1024) || (window.innerWidth < 1024 && window.innerHeight < 768)) + return ((window.innerWidth < 768 && window.innerHeight < 1024) || (window.innerWidth < 1024 && window.innerHeight < 768)); } export async function snowPlowHelper(page: string, data: any = null) { @@ -666,9 +666,9 @@ export function getResponseTypeDescription(code: string) { if (code === 'MONITOR') { return 'When a fire is being monitored, this means BC Wildfire Service is observing and analyzing the fire but it\'s not immediately suppressed. It may be allowed to burn to achieve ecological or resource management objectives and is used on remote fires that do not threaten values.'; } else if (code === 'MODIFIED') { - return 'During a modified response, a wildfire is managed using a combination of techniques with the goal to minimize damage while maximizing ecological benefits from the fire. This response method is used when there is no immediate threat to values.'; + return 'This wildfire is being managed using a combination of techniques with the goal to minimize damage while maximizing ecological benefits from the fire. Suppression or values protection may occur in areas of an otherwise beneficial fire.'; } else if (code === 'FULL') { - return 'The BC Wildfire Service uses a full response when there is threat to public safety and/or property and other values, such as infrastructure or timber. Immediate action is taken. During a full response, a wildfire is suppressed and controlled until it is deemed "out".'; + return 'Suppression actions are being taken to limit the spread of this unwanted wildfire.'; } } @@ -791,7 +791,7 @@ export function getCurrentCondition( if (!conditions?.hourly) { return; } - return conditions.hourly.find(function (hc) { + return conditions.hourly.find(function(hc) { return hc.temp != null; }); } @@ -806,7 +806,9 @@ export function formatDate(timestamp: string | number): string { }; return date.toLocaleDateString('en-US', options); - } else return ''; + } else { +return ''; +} } export function hidePanel(panelClass: string) { @@ -839,8 +841,7 @@ export function displayItemTitle(identifyItem) { case 'fire-perimeters': return 'Wildfire'; } - } - else if (identifyItem.fireOfNoteInd !== undefined) { + } else if (identifyItem.fireOfNoteInd !== undefined) { return identifyItem.fireOfNoteInd ? 'Wildfire of Note' : 'Wildfire'; } } @@ -877,7 +878,7 @@ export function displayLocalAuthorityType(layerId: string) { } export function formatNumber(number) { - return number.toLocaleString('en-US') + return number.toLocaleString('en-US'); } export function addMarker(incident: any) { @@ -901,7 +902,7 @@ export function addMarker(incident: any) { [Number(incident.latitude), Number(incident.longitude)], { icon: pointerIcon }, ); - this.marker.on('add', function () { + this.marker.on('add', function() { const icon: any = document.querySelector('.animated-icon'); icon.style.backgroundColor = setDisplayColor(incident.stageOfControlCode); From 97199fc21f8e379dea3014bbe8c048380b3cfad1 Mon Sep 17 00:00:00 2001 From: Sean Sylver Date: Mon, 16 Dec 2024 18:24:56 -0800 Subject: [PATCH 2/3] Update getResponseTypeDescription function --- client/wfnews-war/src/main/angular/src/app/utils/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/utils/index.ts b/client/wfnews-war/src/main/angular/src/app/utils/index.ts index 31a7c14d94..7dd46cff9b 100644 --- a/client/wfnews-war/src/main/angular/src/app/utils/index.ts +++ b/client/wfnews-war/src/main/angular/src/app/utils/index.ts @@ -954,5 +954,3 @@ export function zoomInWithLocationPin(){ ).addTo(viewer.map); } } - - From c81979e3770c937e51735bb81590acfff57c48b0 Mon Sep 17 00:00:00 2001 From: Sean Sylver Date: Tue, 17 Dec 2024 13:10:11 -0800 Subject: [PATCH 3/3] Throw error for formatDate instead of returning empty string --- client/wfnews-war/src/main/angular/src/app/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/wfnews-war/src/main/angular/src/app/utils/index.ts b/client/wfnews-war/src/main/angular/src/app/utils/index.ts index 7dd46cff9b..7c63a8757a 100644 --- a/client/wfnews-war/src/main/angular/src/app/utils/index.ts +++ b/client/wfnews-war/src/main/angular/src/app/utils/index.ts @@ -807,7 +807,7 @@ export function formatDate(timestamp: string | number): string { return date.toLocaleDateString('en-US', options); } else { -return ''; +throw new Error('Unable to apply formatting to date'); } }