-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
184 additions
and
12 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
frontend/src/components/filterFields/IndividualsObservationAttributeFilter.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import React from "react"; | ||
import Description from "../Form/Description"; | ||
import { FormattedMessage } from "react-intl"; | ||
import FormGroupMultiSelect from "../Form/FormGroupMultiSelect"; | ||
import FormGroupText from "../Form/FormGroupText"; | ||
import DynamicInputs from "../Form/DynamicInputs"; | ||
import { FormLabel, FormGroup } from "react-bootstrap"; | ||
import FormMeasurements from "../Form/FormMeasurements"; | ||
|
||
export default function ObservationAttributeFilter({ onChange, data }) { | ||
|
||
const measurementsOptions = data?.measurement || []; | ||
|
||
return ( | ||
<div | ||
style={{ | ||
overflow: "visible", | ||
}} | ||
> | ||
<h4> | ||
<FormattedMessage id="FILTER_OBSERVATION_ATTRIBUTE" /> | ||
</h4> | ||
<Description> | ||
<FormattedMessage id="FILTER_OBSERVATION_ATTRIBUTE_DESC" /> | ||
</Description> | ||
|
||
<FormGroupText | ||
label="FILTER_SIGHTING_ID" | ||
noDesc={true} | ||
onChange={onChange} | ||
term="match" | ||
field="occurrenceId" | ||
filterId={"occurrenceId"} | ||
filterKey={"Sighting ID"} | ||
/> | ||
|
||
<FormGroupText | ||
label="FILTER_SIGHTING_COMMENTS" | ||
noDesc={true} | ||
onChange={onChange} | ||
term="match" | ||
field="sightingcomments" | ||
filterId={"sightingcomments"} | ||
filterKey={"Sighting Comments"} | ||
/> | ||
|
||
<FormGroupText | ||
label="FILTER_VISIBILIY_INDEX" | ||
noDesc={true} | ||
onChange={onChange} | ||
term="match" | ||
field="visibilityIndex" | ||
filterId={"visibilityIndex"} | ||
filterKey={"Visibility Index"} | ||
/> | ||
|
||
<FormGroupText | ||
label="FILTER_OBSERVATION_COMMENTS" | ||
onChange={onChange} | ||
term="match" | ||
field="occurrenceRemarks" | ||
filterId={"occurrenceRemarks"} | ||
filterKey={"Observation Comments"} | ||
/> | ||
|
||
<FormGroup className="mt-2"> | ||
<FormLabel> | ||
<FormattedMessage id="FILTER_MEASUREMENTS" /> | ||
</FormLabel> | ||
<FormMeasurements | ||
data={measurementsOptions} | ||
onChange={onChange} | ||
filterId={"measurements"} | ||
field={"measurements"} | ||
/> | ||
</FormGroup> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
frontend/src/components/filterFields/SightingsLocationFilter.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from "react"; | ||
import LocationFilterMap from "./LocationFilterMap"; | ||
import LocationFilterText from "./LocationFilterText"; | ||
|
||
export default function LocationFilter({ onChange, data }) { | ||
return ( | ||
<div> | ||
<LocationFilterMap onChange={onChange} data={data} /> | ||
<LocationFilterText onChange={onChange} /> | ||
</div> | ||
); | ||
} |
79 changes: 79 additions & 0 deletions
79
frontend/src/components/filterFields/SightingsObservationAttributeFilter.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import React from "react"; | ||
import Description from "../Form/Description"; | ||
import { FormattedMessage } from "react-intl"; | ||
import FormGroupMultiSelect from "../Form/FormGroupMultiSelect"; | ||
import FormGroupText from "../Form/FormGroupText"; | ||
import DynamicInputs from "../Form/DynamicInputs"; | ||
import { FormLabel, FormGroup } from "react-bootstrap"; | ||
import FormMeasurements from "../Form/FormMeasurements"; | ||
|
||
export default function ObservationAttributeFilter({ onChange, data }) { | ||
|
||
const measurementsOptions = data?.measurement || []; | ||
|
||
return ( | ||
<div | ||
style={{ | ||
overflow: "visible", | ||
}} | ||
> | ||
<h4> | ||
<FormattedMessage id="FILTER_OBSERVATION_ATTRIBUTE" /> | ||
</h4> | ||
<Description> | ||
<FormattedMessage id="FILTER_OBSERVATION_ATTRIBUTE_DESC" /> | ||
</Description> | ||
|
||
<FormGroupText | ||
label="FILTER_SIGHTING_ID" | ||
noDesc={true} | ||
onChange={onChange} | ||
term="match" | ||
field="occurrenceId" | ||
filterId={"occurrenceId"} | ||
filterKey={"Sighting ID"} | ||
/> | ||
|
||
<FormGroupText | ||
label="FILTER_SIGHTING_COMMENTS" | ||
noDesc={true} | ||
onChange={onChange} | ||
term="match" | ||
field="sightingcomments" | ||
filterId={"sightingcomments"} | ||
filterKey={"Sighting Comments"} | ||
/> | ||
|
||
<FormGroupText | ||
label="FILTER_VISIBILIY_INDEX" | ||
noDesc={true} | ||
onChange={onChange} | ||
term="match" | ||
field="visibilityIndex" | ||
filterId={"visibilityIndex"} | ||
filterKey={"Visibility Index"} | ||
/> | ||
|
||
<FormGroupText | ||
label="FILTER_OBSERVATION_COMMENTS" | ||
onChange={onChange} | ||
term="match" | ||
field="occurrenceRemarks" | ||
filterId={"occurrenceRemarks"} | ||
filterKey={"Observation Comments"} | ||
/> | ||
|
||
<FormGroup className="mt-2"> | ||
<FormLabel> | ||
<FormattedMessage id="FILTER_MEASUREMENTS" /> | ||
</FormLabel> | ||
<FormMeasurements | ||
data={measurementsOptions} | ||
onChange={onChange} | ||
filterId={"measurements"} | ||
field={"measurements"} | ||
/> | ||
</FormGroup> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters