diff --git a/app/src/frontend/building/data-components/user-opinion-data-entry.tsx b/app/src/frontend/building/data-components/user-opinion-data-entry.tsx index d8978d1f..c0be79f8 100644 --- a/app/src/frontend/building/data-components/user-opinion-data-entry.tsx +++ b/app/src/frontend/building/data-components/user-opinion-data-entry.tsx @@ -1,7 +1,6 @@ import React, { Fragment } from 'react'; import { NavLink } from 'react-router-dom'; -import { AggregationDescriptionConfig, buildingUserFields, dataFields } from '../../config/data-fields-config'; import { CopyProps } from '../data-containers/category-view-props'; import { DataTitleCopyable } from './data-title'; @@ -11,8 +10,6 @@ interface UserOpinionEntryProps { title: string; mode: 'view' | 'edit' | 'multi-edit'; userValue: boolean; - aggregateValue: number; - aggregationDescriptions: AggregationDescriptionConfig; copy: CopyProps; onChange: (key: string, value: boolean) => void; } @@ -34,28 +31,6 @@ const UserOpinionEntry: React.FunctionComponent = (props) onChange={e => props.onChange(props.slug, e.target.checked)} /> Yes -
- -
); }; diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 863f3c8d..fb288a46 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -32,8 +32,6 @@ const CommunityView: React.FunctionComponent = (props) => { title={buildingUserFields.community_like.title} userValue={props.building.community_like} - aggregateValue={props.building.likes_total} - aggregationDescriptions={dataFields.likes_total.aggregationDescriptions} onChange={props.onSaveChange} mode={props.mode} @@ -76,8 +74,6 @@ const CommunityView: React.FunctionComponent = (props) => { title={buildingUserFields.community_local_significance.title} userValue={props.building.community_local_significance} - aggregateValue={props.building.community_local_significance_total} - aggregationDescriptions={dataFields.community_local_significance_total.aggregationDescriptions} onChange={props.onSaveChange} mode={props.mode} diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 893508f0..6061977e 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -1,12 +1,6 @@ import { Category } from './categories-config'; -export interface AggregationDescriptionConfig { - zero: string; - one: string; - many: string; -} - /** * This interface is used only in code which uses dataFields, not in the dataFields definition itself * Cannot make dataFields an indexed type ({[key: string]: DataFieldDefinition}), @@ -65,14 +59,6 @@ export interface DataFieldDefinition { * By default this is false - fields are treated as not user-specific. */ perUser?: boolean; - - /** - * Only for fields that are aggregations of a building-user field. - * specify what text should be added to the number of users calculated by the aggregation. - * E.g. for user likes, if zero="like this building" then for a building with 0 likes, - * the result will be "0 people like this building" - */ - aggregationDescriptions?: AggregationDescriptionConfig; } export const buildingUserFields = { @@ -516,29 +502,6 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ //tooltip: , }, - likes_total: { - category: Category.Community, - title: "Total number of likes", - example: 100, - tooltip: "People who like the building and think it contributes to the city.", - aggregationDescriptions: { - zero: "like this building", - one: "likes this building", - many: "like this building" - } - }, - - community_local_significance_total: { - category: Category.Community, - title: "People who think the building should be recorded as one of local significance", - example: 100, - aggregationDescriptions: { - zero: "think this building should be classified as a locally listed heritage asset", - one: "thinks this building should be classified as a locally listed heritage asset", - many: "think this building should be classified as a locally listed heritage asset" - } - }, - community_activities: { category: Category.Community, title: "Has the building ever been used for community activities?",