From edd0f422fb39c3831554d7c7cf14556c1c819b10 Mon Sep 17 00:00:00 2001 From: Kent Caparas <144957476+kcaparas1630@users.noreply.github.com> Date: Mon, 12 Aug 2024 19:41:48 -0700 Subject: [PATCH] added region Options (#346) --- .../FarmInformation/FarmInformation.tsx | 6 +- frontend/src/Constants/FarmRegionOptions.ts | 86 +++++++++++++++++++ 2 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 frontend/src/Constants/FarmRegionOptions.ts diff --git a/frontend/src/Commons/Forms/InputModules/FarmInformation/FarmInformation.tsx b/frontend/src/Commons/Forms/InputModules/FarmInformation/FarmInformation.tsx index 5846e9b1..183887b1 100644 --- a/frontend/src/Commons/Forms/InputModules/FarmInformation/FarmInformation.tsx +++ b/frontend/src/Commons/Forms/InputModules/FarmInformation/FarmInformation.tsx @@ -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'; @@ -30,8 +30,6 @@ interface SubmissionValues { FarmRegion: string; } -const options: OptionInterface[] = [{ value: 'Vancouver Island', label: 'Vancouver Island' }]; - const FarmInfoComponent: FC = ({ farmDetails, updateFarmDetails, @@ -105,7 +103,7 @@ const FarmInfoComponent: FC = ({ name="FarmRegion" id="FarmRegion" label="Region" - options={options} + options={FarmRegionOptions} desktopWidth="468px" mobileWidth="259px" onChange={(e) => handleChange(e, setFieldValue)} diff --git a/frontend/src/Constants/FarmRegionOptions.ts b/frontend/src/Constants/FarmRegionOptions.ts new file mode 100644 index 00000000..47b822f7 --- /dev/null +++ b/frontend/src/Constants/FarmRegionOptions.ts @@ -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;