Add field labels to multi edit view

This commit is contained in:
Maciej Ziarkowski 2019-10-25 18:07:24 +01:00
parent 09c343f91d
commit 86b252f186

View File

@ -7,6 +7,7 @@ import Sidebar from './sidebar';
import InfoBox from '../components/info-box'; import InfoBox from '../components/info-box';
import { BackIcon }from '../components/icons'; import { BackIcon }from '../components/icons';
import DataEntry from './data-components/data-entry'; import DataEntry from './data-components/data-entry';
import { dataFields } from '../data_fields';
const MultiEdit = (props) => { const MultiEdit = (props) => {
@ -63,9 +64,10 @@ const MultiEdit = (props) => {
<InfoBox msg='Click buildings one at a time to colour using the data below' /> <InfoBox msg='Click buildings one at a time to colour using the data below' />
{ {
Object.keys(data).map((key => { Object.keys(data).map((key => {
const info = dataFields[key] || {};
return ( return (
<DataEntry <DataEntry
title={key} title={info.title || `Unknown field (${key})`}
slug={key} slug={key}
disabled={true} disabled={true}
value={data[key]} value={data[key]}