colouring-montreal/app/src/frontend/building/data-containers/age.tsx

79 lines
2.5 KiB
TypeScript
Raw Normal View History

2019-08-23 09:09:23 -04:00
import React, { Fragment } from 'react';
import withCopyEdit from '../data-container';
import MultiDataEntry from '../data-components/multi-data-entry';
import NumericDataEntry from '../data-components/numeric-data-entry';
import SelectDataEntry from '../data-components/select-data-entry';
import TextboxDataEntry from '../data-components/textbox-data-entry';
import YearDataEntry from '../data-components/year-data-entry';
/**
* Age view/edit section
*/
const AgeView = (props) => (
2019-08-23 09:09:23 -04:00
<Fragment>
<YearDataEntry
year={props.building.date_year}
upper={props.building.date_upper}
lower={props.building.date_lower}
mode={props.mode}
2019-10-02 17:35:57 -04:00
copy={props.copy}
2019-10-16 16:13:50 -04:00
onChange={props.onUpdate}
2019-08-14 16:54:56 -04:00
/>
<NumericDataEntry
2019-08-14 16:54:56 -04:00
title="Facade year"
slug="facade_year"
value={props.building.facade_year}
mode={props.mode}
2019-08-14 16:54:56 -04:00
copy={props.copy}
2019-10-16 16:13:50 -04:00
onChange={props.onUpdate}
step={1}
2019-08-14 16:54:56 -04:00
tooltip="Best estimate"
/>
<SelectDataEntry
2019-08-14 16:54:56 -04:00
title="Source of information"
slug="date_source"
value={props.building.date_source}
mode={props.mode}
2019-08-14 16:54:56 -04:00
copy={props.copy}
2019-10-17 10:32:41 -04:00
onChange={props.onUpdate}
2019-08-14 16:54:56 -04:00
tooltip="Source for the main start date"
placeholder=""
options={[
"Survey of London",
"Pevsner Guides",
"Local history publication",
"National Heritage List for England",
"Historical map",
"Archive research",
"Expert knowledge of building",
"Other book",
"Other website",
"Other"
]}
2019-08-14 16:54:56 -04:00
/>
<TextboxDataEntry
2019-08-14 16:54:56 -04:00
title="Source details"
slug="date_source_detail"
value={props.building.date_source_detail}
mode={props.mode}
2019-08-14 16:54:56 -04:00
copy={props.copy}
onChange={props.onUpdate}
2019-08-14 16:54:56 -04:00
tooltip="References for date source (max 500 characters)"
/>
<MultiDataEntry
2019-08-14 16:54:56 -04:00
title="Text and Image Links"
slug="date_link"
value={props.building.date_link}
mode={props.mode}
2019-08-14 16:54:56 -04:00
copy={props.copy}
2019-08-23 12:46:22 -04:00
onChange={props.onUpdate}
2019-08-14 16:54:56 -04:00
tooltip="URL for age and date reference"
placeholder="https://..."
2019-08-14 16:54:56 -04:00
/>
2019-08-23 09:09:23 -04:00
</Fragment>
)
const AgeContainer = withCopyEdit(AgeView);
export default AgeContainer;