Move Attachment Form Options to be consistent with the rest of the code

This commit is contained in:
Mike Simpson 2023-08-03 15:12:12 +01:00
parent 6d13ab8048
commit 0db7ceb4e9
2 changed files with 7 additions and 8 deletions

View File

@ -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<CategoryViewProps> = (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}

View File

@ -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,