Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Remove unused relationships code (including relationships custom field) #446

Merged
merged 2 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@
"ADD_ANOTHER_FIELD": "Add another field",
"FEET_METERS_SELECTOR": "Feet/meters selector",
"INDIVIDUAL_SELECTOR": "Individual selector",
"RELATIONSHIPS_SELECTOR": "Relationships selector",
"INTEGER_LABEL": "Whole number",
"FILE_UPLOADER": "File uploader",
"LAT_LONG_SELECTOR": "Lat/long selector",
Expand Down Expand Up @@ -552,7 +551,6 @@
"SEX_IS": "Sex: {sex}",
"REGIONS_DESCRIPTION": "These regions will be available to choose from during submission and search. Region assignment is used to improve performance by allowing for matching against a reduced set up submissions. Click ↳ on a region to create a nested subregion.",
"DROPDOWN_CHOICE_HELPER_TEXT": "Each option needs a value and a label. Use the label field for a brief and well-formatted, English-language name (eg. 'Some scars'). The value field specifies how the option will be stored in databases and appear in data exports. Values cannot contain spaces or special characters (eg. 'somescars').",
"RELATIONSHIP_OPTIONS_HELPER_TEXT": "Each relationship type needs a value and a label. Use the label field for a brief and well-formatted, English-language name (eg. 'Best friend'). The value field specifies how the option will be stored in databases and appear in data exports. Values cannot contain spaces or special characters (eg. 'bestfriend').",
"FILETYPE_OPTIONS_HELPER_TEXT": "Enter the file types you wish to allow for this input, including the dot (ie. '.jpg' or '.wav'). If you skip this step, all file types will be permitted.",
"CHOOSE_FIELDS_DESCRIPTION": "The following fields are available for data import. Each field should be a column in your spreadsheet. Note that region, time, and time precision are required. For sighting time, use whatever columns are known. For example, if the full date is known but not the time of day, leave the hours, minutes, and seconds columns blank.",
"GENERATE_DISABLED_NO_LOCATION": "At least one location field must be selected (region, exact location, or location freeform).",
Expand All @@ -571,7 +569,6 @@
"CUSTOM_FIELD_SAME_LABEL_ERROR": "Error: two or more {fieldsetName}s have the same value.",
"CUSTOM_FIELD_SAME_VALUE_ERROR": "Error: two or more {fieldsetName}s have the same value.",
"FINISH": "Finish",
"RELATIONSHIP_OPTIONS": "Relationship options",
"MALE": "Male",
"FEMALE": "Female",
"OPTION": "Option",
Expand Down
110 changes: 0 additions & 110 deletions src/components/fields/edit/RelationshipsEditor.jsx

This file was deleted.

113 changes: 0 additions & 113 deletions src/components/inputs/RelationshipsInput.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/inputs/inputMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import LocationIdInput from './LocationIdInput';
import ComparatorInput from './ComparatorInput';
import DateInput from './DateInput';
import DateRangeInput from './DateRangeInput';
import RelationshipsInput from './RelationshipsInput';
import ColorInput from './ColorInput';
import CategoryListInput from './CategoryListInput';
import ProjectIdInput from './ProjectIdInput';
Expand All @@ -32,7 +31,6 @@ const inputMap = {
[fieldTypes.date]: DateInput,
[fieldTypes.daterange]: DateRangeInput,
[fieldTypes.feetmeters]: FeetMetersInput,
[fieldTypes.relationships]: RelationshipsInput,
Emily-Ke marked this conversation as resolved.
Show resolved Hide resolved
[fieldTypes.string]: TextInput,
[fieldTypes.longstring]: TextInput,
[fieldTypes.password]: TextInput,
Expand Down
18 changes: 0 additions & 18 deletions src/constants/fieldTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const fieldTypes = {
float: 'float',
feetmeters: 'feetmeters', // float represents meters, but GUI supports feet
individual: 'individual', // string (individual ID)
relationships: 'relationships', // { targetIndividualId: string, direction: enum, type: enum, id: int }
integer: 'integer',
file: 'file',
latlong: 'latlong', // [float, float] defines [lat, lng]
Expand Down Expand Up @@ -85,22 +84,6 @@ export const fieldTypeChoices = [
backendType: backendTypes.individual,
backendMultiple: false,
},
{
labelId: 'RELATIONSHIPS_SELECTOR',
value: fieldTypes.relationships,
defaultValue: [],
backendType: backendTypes.string,
backendMultiple: true,
configuration: [
{
labelId: 'RELATIONSHIP_OPTIONS',
descriptionId: 'RELATIONSHIP_OPTIONS_HELPER_TEXT',
Emily-Ke marked this conversation as resolved.
Show resolved Hide resolved
value: 'choices',
type: fieldTypes.optioneditor,
defaultValue: [],
},
],
},
{
labelId: 'INTEGER_LABEL',
value: fieldTypes.integer,
Expand Down Expand Up @@ -221,7 +204,6 @@ export const customFieldCategories = [
fieldTypes.file,
fieldTypes.individual,
fieldTypes.latlong,
fieldTypes.relationships,
fieldTypes.feetmeters,
],
},
Expand Down
17 changes: 0 additions & 17 deletions src/constants/fieldTypesNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const fieldTypes = {
boolean: 'boolean',
locationId: 'locationID', // nested array
individual: 'individual', // string (individual ID)
relationships: 'relationships', // { targetIndividualId: string, direction: enum, type: enum, id: int }
};

const backendTypes = {
Expand Down Expand Up @@ -83,14 +82,6 @@ export const fieldTypeInfo = {
canProvideDefaultValue: false,
exampleValue: null,
},
[fieldTypes.relationships]: {
labelId: 'RELATIONSHIPS_SELECTOR',
value: fieldTypes.relationships,
backendType: backendTypes.string,
backendMultiple: true,
canProvideDefaultValue: false,
exampleValue: null,
},
[fieldTypes.integer]: {
labelId: 'INTEGER_LABEL',
value: fieldTypes.integer,
Expand All @@ -100,14 +91,6 @@ export const fieldTypeInfo = {
initialDefaultValue: null,
exampleValue: 12,
},
// [fieldTypes.file]: {
// labelId: 'FILE_UPLOADER',
// value: fieldTypes.file,
// backendType: backendTypes.string,
// backendMultiple: false,
// canProvideDefaultValue: false,
// exampleValue: null,
// },
[fieldTypes.latlong]: {
labelId: 'LAT_LONG_SELECTOR',
value: fieldTypes.latlong,
Expand Down
Loading