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-2513 Text changes for response type description and title #2153

Merged
merged 4 commits into from
Dec 17, 2024
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
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>
21 changes: 10 additions & 11 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 '';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we throw an exception instead of a blank string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, updated now

} else {
throw new Error('Unable to apply formatting to date');
}
}

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 Expand Up @@ -953,5 +954,3 @@ export function zoomInWithLocationPin(){
).addTo(viewer.map);
}
}


Loading