From 0db7ceb4e9a45f4d7bbef29e55a049709c39456d Mon Sep 17 00:00:00 2001 From: Mike Simpson Date: Thu, 3 Aug 2023 15:12:12 +0100 Subject: [PATCH] Move Attachment Form Options to be consistent with the rest of the code --- app/src/frontend/building/data-containers/typology.tsx | 9 +-------- app/src/frontend/config/data-fields-config.ts | 6 ++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/frontend/building/data-containers/typology.tsx b/app/src/frontend/building/data-containers/typology.tsx index 7ccc6854..736f418e 100644 --- a/app/src/frontend/building/data-containers/typology.tsx +++ b/app/src/frontend/building/data-containers/typology.tsx @@ -13,13 +13,6 @@ import { DataEntryGroup } from '../data-components/data-entry-group'; import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry'; import { useDisplayPreferences } from '../../displayPreferences-context'; -const AttachmentFormOptions = [ - "Detached", - "Semi-Detached", - "End-Terrace", - "Mid-Terrace" -]; - /** * Type view/edit section */ @@ -290,7 +283,7 @@ const TypeView: React.FunctionComponent = (props) => { slug="building_attachment_form" value={props.building.building_attachment_form} tooltip={dataFields.building_attachment_form.tooltip} - options={AttachmentFormOptions} + options={dataFields.building_attachment_form.items} mode={props.mode} copy={props.copy} onChange={props.onChange} diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 9bc3deb0..66f913ec 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -314,6 +314,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ title: "Which description best explains the way the building is attached to others?", tooltip: "We have prepopulated these based on their current attachment. A building can either be detached, semi-detached or part of a terrace (middle or end)", example: "", + items: [ + "Detached", + "Semi-Detached", + "End-Terrace", + "Mid-Terrace" + ] }, building_attachment_source_type: { category: Category.Age,