Skip to content

Commit

Permalink
POLIO-1803: update vaccine filter dropdowns
Browse files Browse the repository at this point in the history
  • Loading branch information
quang-le committed Dec 19, 2024
1 parent d40e273 commit cab5073
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { SingleSelect } from '../../../../components/Inputs/SingleSelect';
import MESSAGES from '../messages';
import { useSaveVaccineStock } from '../hooks/api';
import { useGetCountriesOptions } from '../../SupplyChain/hooks/api/vrf';
import { defaultVaccineOptions } from '../../SupplyChain/constants';
import { singleVaccinesList } from '../../SupplyChain/constants';

type Props = {
isOpen: boolean;
Expand Down Expand Up @@ -71,7 +71,7 @@ const CreateVaccineStock: FunctionComponent<Props> = ({
name="vaccine"
component={SingleSelect}
required
options={defaultVaccineOptions}
options={singleVaccinesList}
withMarginTop
// isLoading={isFetchingCountries}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { FilterButton } from '../../../../../../../../hat/assets/js/apps/Iaso/co
import { useFilterState } from '../../../../../../../../hat/assets/js/apps/Iaso/hooks/useFilterState';
import InputComponent from '../../../../../../../../hat/assets/js/apps/Iaso/components/forms/InputComponent';
import MESSAGES from '../messages';
import { polioVaccines } from '../../../../constants/virus';
import { useGetCountriesOptions } from '../../SupplyChain/hooks/api/vrf';
import { StockManagementListParams } from '../types';
import { baseUrls } from '../../../../constants/urls';
import { singleVaccinesList } from '../../SupplyChain/constants';

const baseUrl = baseUrls.stockManagement;
type Props = { params: StockManagementListParams };
Expand Down Expand Up @@ -46,10 +46,7 @@ export const VaccineStockManagementFilters: FunctionComponent<Props> = ({
keyValue="vaccine_type"
value={filters.vaccine_type}
onChange={handleChange}
options={polioVaccines.map(vaccine => ({
label: vaccine.label,
value: vaccine.value,
}))}
options={singleVaccinesList}
labelString={formatMessage(MESSAGES.vaccine)}
/>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { FilterButton } from '../../../../../../../../hat/assets/js/apps/Iaso/co
import { useFilterState } from '../../../../../../../../hat/assets/js/apps/Iaso/hooks/useFilterState';
import InputComponent from '../../../../../../../../hat/assets/js/apps/Iaso/components/forms/InputComponent';
import MESSAGES from '../messages';
import { polioVaccines } from '../../../../constants/virus';
import { apiDateFormat } from '../../../../../../../../hat/assets/js/apps/Iaso/utils/dates';
import { useGetCountriesOptions } from '../hooks/api/vrf';
import { useGetGroupDropdown } from '../../../../../../../../hat/assets/js/apps/Iaso/domains/orgUnits/hooks/requests/useGetGroups';
import { singleVaccinesList } from '../constants';

type Props = { params: any };

Expand Down Expand Up @@ -83,10 +83,7 @@ export const VaccineSupplyChainFilters: FunctionComponent<Props> = ({
keyValue="vaccine_type"
value={filters.vaccine_type}
onChange={handleChange}
options={polioVaccines.map(vaccine => ({
label: vaccine.label,
value: vaccine.value,
}))}
options={singleVaccinesList}
labelString={formatMessage(MESSAGES.vaccine)}
/>
<InputComponent
Expand Down

0 comments on commit cab5073

Please sign in to comment.