Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
added region Options (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcaparas1630 authored Aug 13, 2024
1 parent deb9e56 commit edd0f42
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { faTractor } from '@fortawesome/free-solid-svg-icons';
import InputModuleProps from '@Interface/InputModuleProps';
import FarmDetailsInterface from '@Interface/FarmDetailsInterface';
import InputModuleInterface from '@Interface/InputModuleinterface';
import OptionInterface from '@Interface/OptionInterface';
import FarmRegionOptions from '@Constants/FarmRegionOptions';
import ComponentText from '@Constants/ComponentText';
import { FARM_INFORMATION } from '@Constants/ModuleIDs';
import CustomField from '@Commons/Input/Field/CustomField';
Expand All @@ -30,8 +30,6 @@ interface SubmissionValues {
FarmRegion: string;
}

const options: OptionInterface[] = [{ value: 'Vancouver Island', label: 'Vancouver Island' }];

const FarmInfoComponent: FC<InputModuleProps> = ({
farmDetails,
updateFarmDetails,
Expand Down Expand Up @@ -105,7 +103,7 @@ const FarmInfoComponent: FC<InputModuleProps> = ({
name="FarmRegion"
id="FarmRegion"
label="Region"
options={options}
options={FarmRegionOptions}
desktopWidth="468px"
mobileWidth="259px"
onChange={(e) => handleChange(e, setFieldValue)}
Expand Down
86 changes: 86 additions & 0 deletions frontend/src/Constants/FarmRegionOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import OptionInterface from '@Interface/OptionInterface';

const FarmRegionOptions: OptionInterface[] = [
{
value: '1',
label: 'Bulkley-Nechako',
},
{
value: '3',
label: 'Cariboo',
},
{
value: '6',
label: 'Columbia Shuswap',
},
{
value: '4',
label: 'Central Kootenay',
},
{
value: '9',
label: 'East Kooteay',
},
{
value: '13',
label: 'Kootenay Boundary',
},
{
value: '10',
label: 'Fraser Valley, East (including Abbotsford/Mission)',
},
{
value: '14',
label: 'Fraser Valley, West (Delta to Langley/Maple Ridge)',
},
{
value: '9',
label: 'Fraser-Fort George',
},
{
value: '12',
label: 'Kitimat-Stikine',
},
{
value: '5',
label: 'Central Okanagan',
},
{
value: '16',
label: 'North Okanagan',
},
{
value: '17',
label: 'Okanagan-Similkameen',
},
{
value: '18',
label: 'Peace River',
},
{
value: '19',
label: 'Squamish-Lilloeet',
},
{
value: '22',
label: 'Powell River/ qathet Region',
},
{
value: '23',
label: 'Sunshine Coast',
},
{
value: '20',
label: 'Thompson-Nicola',
},
{
value: '21',
label: 'Vancouver Island',
},
{
value: '2',
label: 'Northern Rockies',
},
];

export default FarmRegionOptions;

0 comments on commit edd0f42

Please sign in to comment.