Change Explore the tool to Explore the map (#1552)

* Change Explore the tool to Explore the map

- update all snapshots
- update gherkin tests
- new en.json is created

* Update Alert copy

- update expiration date

* Update es.json ids from tool to map

* Commit latest es.json with local changes

* Rebase main, remove intl errors in console

- change from map to tool in side panel (3 places)
- make survey button route to spanish site
- make survey button open in new tab
- remove all intl errors in console on each page
- remove rebase artifact from es.json
- update all snapshots

* Correct wasterwater typo
This commit is contained in:
Vim 2022-05-10 20:23:23 -04:00 committed by GitHub
commit 1293a52b18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 888 additions and 868 deletions

View file

@ -1,8 +1,8 @@
/* eslint-disable quotes */
// External Libs:
import React from 'react';
import { useIntl } from 'gatsby-plugin-intl';
import { Accordion, Button } from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import {Accordion, Button} from '@trussworks/react-uswds';
// Components:
import Category from '../Category';
@ -41,7 +41,7 @@ export interface indicatorInfo {
threshold?: number,
}
const AreaDetail = ({ properties, hash }: IAreaDetailProps) => {
const AreaDetail = ({properties, hash}: IAreaDetailProps) => {
const intl = useIntl();
// console.log the properties of the census that is selected:
@ -72,44 +72,44 @@ const AreaDetail = ({ properties, hash }: IAreaDetailProps) => {
if (sidePanelState === constants.SIDE_PANEL_STATE_VALUES.ISLAND_AREAS) {
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD) ?
.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD) ?
properties[constants.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD) ?
.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD) ?
properties[constants.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD) ?
.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD) ?
properties[constants.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD) ?
.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD) ?
properties[constants.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD] : null;
}
}
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.LOW_MEDIAN_INCOME_PERCENTILE) ?
.LOW_MEDIAN_INCOME_PERCENTILE) ?
properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.UNEMPLOYMENT_PROPERTY_PERCENTILE) ?
.UNEMPLOYMENT_PROPERTY_PERCENTILE) ?
properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.POVERTY_BELOW_100_PERCENTILE) ?
.POVERTY_BELOW_100_PERCENTILE) ?
properties[constants.POVERTY_BELOW_100_PERCENTILE] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.HIGH_SCHOOL_PROPERTY_PERCENTILE) ?
.HIGH_SCHOOL_PROPERTY_PERCENTILE) ?
properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] : null;
}
};
@ -124,44 +124,44 @@ const AreaDetail = ({ properties, hash }: IAreaDetailProps) => {
if (sidePanelState === constants.SIDE_PANEL_STATE_VALUES.ISLAND_AREAS) {
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME) ?
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT) ?
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY) ?
.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.ISLAND_AREA_LOW_HS_EDU) ?
.ISLAND_AREA_LOW_HS_EDU) ?
properties[constants.ISLAND_AREA_LOW_HS_EDU] : null;
}
}
if (indicatorName === 'lowMedInc') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME) ?
.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME] : null;
}
if (indicatorName === 'unemploy') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT) ?
.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT] : null;
}
if (indicatorName === 'poverty') {
return properties.hasOwnProperty(constants
.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY) ?
.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY) ?
properties[constants.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY] : null;
}
if (indicatorName === 'highSchool') {
return properties.hasOwnProperty(constants
.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED) &&
.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED) &&
properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] == 1 ?
true : false;
}