Skip to content

Commit

Permalink
WFNEWS-2513 Text changes for response type description and title
Browse files Browse the repository at this point in the history
  • Loading branch information
ssylver93 committed Dec 17, 2024
1 parent 11ec7e3 commit 611953b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
{{incident.resourceDetail}}
</div>
<div *ngIf="incident.responseTypeCode" class="content-panel-stack">
<h1>Response Type</h1>
<h4><img class="icon" src={{getResponseImage(incident.responseTypeCode)}} alt="Response"/>{{getResponseTypeTitle(incident.responseTypeCode)}}</h4>
<h1>Response</h1>
<div class="description">{{getResponseTypeDescription(incident.responseTypeCode)}}</div>
<hr>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
<content-card-container class="response-type-card" [ngSwitch]="responseTypeCode">
<content-card-container class="response-type-card">
<div class="header">
<span class="title">Response Type</span>
<span class="title">Response</span>
</div>

<div class="content">
<div *ngSwitchCase="responseTypes.full" class="content-title"><img class="icon"
src="/assets/images/svg-icons/full_response.svg" alt="full response">
Full Response
</div>
<div *ngSwitchCase="responseTypes.monitored" class="content-title"><img class="icon"
src="/assets/images/svg-icons/monitored_response.svg" alt="monitored response">
Monitored Response
</div>
<div *ngSwitchCase="responseTypes.modified" class="content-title"><img class="icon"
src="/assets/images/svg-icons/modified_response.svg" alt="modified response">
Modified Response
</div>

<span class="content-text">{{ responseText }}</span>
</div>

</content-card-container>
19 changes: 10 additions & 9 deletions client/wfnews-war/src/main/angular/src/app/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.';
}
}

Expand Down Expand Up @@ -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;
});
}
Expand All @@ -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) {
Expand Down Expand Up @@ -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';
}
}
Expand Down Expand Up @@ -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) {
Expand All @@ -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);

Expand Down

0 comments on commit 611953b

Please sign in to comment.