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

[VA-11591] Remove flipper facilities_ppms_suppress_pharmacies #23315

Closed
wants to merge 3 commits into from
Closed
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 @@ -10,10 +10,6 @@
"name": "facilityLocatorShowCommunityCares",
"value": true
},
{
"name": "facilitiesPpmsSuppressPharmacies",
"value": false
},
{
"name": "facilitiesPpmsSuppressCommunityCare",
"value": true
Expand Down
18 changes: 7 additions & 11 deletions src/applications/facility-locator/components/SearchControls.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useEffect, useRef, useState } from 'react';
import ServiceTypeAhead from './ServiceTypeAhead';
import recordEvent from 'platform/monitoring/record-event';
import omit from 'platform/utilities/data/omit';
import { LocationType } from '../constants';
import { focusElement } from 'platform/utilities/ui';
import classNames from 'classnames';
import Modal from '@department-of-veterans-affairs/component-library/Modal';
import {
healthServices,
benefitsServices,
Expand All @@ -11,9 +12,8 @@ import {
emergencyCareServices,
nonPPMSfacilityTypeOptions,
} from '../config';
import { focusElement } from 'platform/utilities/ui';
import classNames from 'classnames';
import Modal from '@department-of-veterans-affairs/component-library/Modal';
import { LocationType } from '../constants';
import ServiceTypeAhead from './ServiceTypeAhead';
import { setFocus } from '../utils/helpers';

const SearchControls = props => {
Expand Down Expand Up @@ -216,17 +216,13 @@ const SearchControls = props => {
};

const renderFacilityTypeDropdown = () => {
const { suppressCCP, suppressPharmacies, suppressPPMS } = props;
const { suppressCCP, suppressPPMS } = props;
const { facilityType, isValid, facilityTypeChanged } = currentQuery;
const locationOptions = suppressPPMS
? nonPPMSfacilityTypeOptions
: facilityTypesOptions;
const showError = !isValid && facilityTypeChanged && !facilityType;

if (suppressPharmacies) {
delete locationOptions.pharmacy;
}

if (suppressCCP) {
delete locationOptions.provider;
}
Expand Down Expand Up @@ -398,7 +394,7 @@ const SearchControls = props => {
}
/>
<form id="facility-search-controls" onSubmit={handleSubmit}>
<div className={'columns'}>
<div className="columns">
{renderLocationInputField()}
<div id="search-controls-bottom-row">
{renderFacilityTypeDropdown()}
Expand Down
10 changes: 2 additions & 8 deletions src/applications/facility-locator/containers/FacilitiesMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
import {
facilitiesPpmsSuppressAll,
facilitiesPpmsSuppressCommunityCare,
facilitiesPpmsSuppressPharmacies,
facilityLocatorPredictiveLocationSearch,
facilityLocatorLighthouseCovidVaccineQuery,
} from '../utils/featureFlagSelectors';
Expand Down Expand Up @@ -430,19 +429,15 @@ const FacilitiesMap = props => {
onSubmit={handleSearch}
suppressPPMS={props.suppressPPMS}
suppressCCP={props.suppressCCP}
suppressPharmacies={props.suppressPharmacies}
searchCovid19Vaccine={props.searchCovid19Vaccine}
clearSearchText={props.clearSearchText}
/>
{(isEmergencyCareType || isCppEmergencyCareTypes) && (
<div id="search-result-emergency-care-info">
<p className="search-result-emergency-care-subheader">
<strong>Note:</strong> If you think your life or health is in
danger, call{' '}
<a aria-label="9 1 1" href="tel:911">
911
</a>{' '}
or go to the nearest emergency department right away.
danger, call <va-telephone contact="911" /> or go to the nearest
emergency department right away.
</p>
</div>
)}
Expand Down Expand Up @@ -665,7 +660,6 @@ const FacilitiesMap = props => {
const mapStateToProps = state => ({
currentQuery: state.searchQuery,
suppressPPMS: facilitiesPpmsSuppressAll(state),
suppressPharmacies: facilitiesPpmsSuppressPharmacies(state),
suppressCCP: facilitiesPpmsSuppressCommunityCare(state),
usePredictiveGeolocation: facilityLocatorPredictiveLocationSearch(state),
searchCovid19Vaccine: facilityLocatorLighthouseCovidVaccineQuery(state),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import FEATURE_FLAG_NAMES from 'platform/utilities/feature-toggles/featureFlagNa
export const facilitiesPpmsSuppressAll = state =>
toggleValues(state)[FEATURE_FLAG_NAMES.facilitiesPpmsSuppressAll];

export const facilitiesPpmsSuppressPharmacies = state =>
toggleValues(state)[FEATURE_FLAG_NAMES.facilitiesPpmsSuppressPharmacies];

export const facilitiesPpmsSuppressCommunityCare = state =>
toggleValues(state)[FEATURE_FLAG_NAMES.facilitiesPpmsSuppressCommunityCare];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"name": "facilityLocatorShowCommunityCares",
"value": false
},
{
"name": "facilitiesPpmsSuppressPharmacies",
"value": false
},
{
"name": "facilitiesPpmsSuppressCommunityCare",
"value": false
Expand Down Expand Up @@ -172,4 +168,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"name": "facilityLocatorShowCommunityCares",
"value": true
},
{
"name": "facilitiesPpmsSuppressPharmacies",
"value": true
},
{
"name": "facilitiesPpmsSuppressCommunityCare",
"value": true
Expand Down Expand Up @@ -172,4 +168,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default Object.freeze({
facilitiesPpmsSuppressAll: 'facilities_ppms_suppress_all',
facilitiesPpmsSuppressCommunityCare:
'facilities_ppms_suppress_community_care',
facilitiesPpmsSuppressPharmacies: 'facilities_ppms_suppress_pharmacies',
facilityLocatorLatLongOnly: 'facility_locator_lat_long_only',
facilityLocatorLighthouseCovidVaccineQuery:
'facility_locator_lighthouse_covid_vaccine_query',
Expand Down