Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

801 add life stage filter to encounter search #804

Merged
merged 1 commit into from
Sep 27, 2024
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
4 changes: 2 additions & 2 deletions frontend/src/components/filterFields/MetadataFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ export default function MetadataFilter({
<FormGroupMultiSelect
isMulti={true}
noDesc={true}
label="FILTER_ENCOUNTERS_STATUS"
label="FILTER_ENCOUNTERS_STATE"
options={encounterStatusOptions}
onChange={onChange}
term="terms"
field="state"
setFormFilters={setFormFilters}
formFilters={formFilters}
filterKey={"Encounter Status"}
filterKey={"Encounter State"}
/>
<FormGroupText
label="FILTER_SUBMITTER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export default function ObservationAttributeFilter({ onChange, data }) {
label: item,
};
}) || [];
const lifeStageOptions =
data?.lifeStage?.map((item) => {
return {
value: item,
label: item,
};
}) || [];
const genusAndSpeciesOptions =
data?.siteTaxonomies?.map((item) => {
return {
Expand Down Expand Up @@ -70,13 +77,23 @@ export default function ObservationAttributeFilter({ onChange, data }) {
/>
<FormGroupMultiSelect
isMulti={true}
label="FILTER_LIFE_STATUS"
label="FILTER_LIFE_STAGE"
noDesc={true}
options={lifeStageOptions}
onChange={onChange}
field="lifeStage"
term="terms"
filterKey="Life Stage"
/>
<FormGroupMultiSelect
isMulti={true}
label="FILTER_LIVING_STATUS"
noDesc={true}
options={livingStatusOptions}
onChange={onChange}
field="livingStatus"
term="terms"
filterKey="Life Status"
filterKey="Living Status"
/>

<FormGroupMultiSelect
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@
"FILTER_OBSERVATION_ATTRIBUTE": "Beobachtungsattribut",
"FILTER_OBSERVATION_ATTRIBUTE_DESC": "Verwenden Sie die folgenden Felder, um Ihre Suche nach beobachteten Attributen zu filtern",
"FILTER_SEX": "Geschlecht",
"FILTER_LIFE_STATUS": "Lebensstatus",
"FILTER_LIVING_STATUS": "Lebensstatus",
"FILTER_LIFE_STAGE": "Lebensstadium",
"FILTER_GENUS_AND_SPECIES": "Gattung und Art",
"FILTER_SIGHTING_ID": "Sichtung ID",
"FILTER_OBSERVATION_SEARCH": "Suche nach Beobachtungen",
Expand Down Expand Up @@ -197,7 +198,7 @@
"FILTER_RELATIONSHIP_ROLE": "Soziale Beziehungsrolle",
"FILTER_METADATA": "Metadaten",
"FILTER_METADATA_DESC": "Verwenden Sie die nachstehenden Felder, um Ihre Suche auf der Grundlage plattformbezogener Daten einzuschränken",
"FILTER_ENCOUNTERS_STATUS": "Begegnungsstatus",
"FILTER_ENCOUNTERS_STATE": "Begegnungsstatus",
"FILTER_SUBMITTER": "Einreicher, Fotograf oder E-Mail Adresse. Dieses Feld unterscheidet NICHT zwischen Groß- und Kleinschreibung",
"FILTER_ORGANIZATION_ID": "Organisations-ID",
"FILTER_PROJECT_NAME": "Projektname",
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@
"FILTER_OBSERVATION_ATTRIBUTE": "Observation Attribute",
"FILTER_OBSERVATION_ATTRIBUTE_DESC": "Use the fields below to filter your search based on observed attributes",
"FILTER_SEX": "Sex",
"FILTER_LIFE_STATUS": "Life Status",
"FILTER_LIVING_STATUS": "Living Status",
"FILTER_LIFE_STAGE": "Life Stage",
"FILTER_GENUS_AND_SPECIES": "Genus and Species",
"FILTER_SIGHTING_ID": "Sighting ID",
"FILTER_OBSERVATION_SEARCH": "Observation Search",
Expand Down Expand Up @@ -197,7 +198,7 @@
"FILTER_RELATIONSHIP_ROLE": "Social Relationship Role",
"FILTER_METADATA": "Metadata",
"FILTER_METADATA_DESC": "Use the fields below to limit your search based on platform-related data",
"FILTER_ENCOUNTERS_STATUS": "Encounter Status",
"FILTER_ENCOUNTERS_STATE": "Encounter State",
"FILTER_SUBMITTER": "Submitter, Photographer, or Email Address. This field is NOT case-sensitive",
"FILTER_ORGANIZATION_ID": "Organization ID",
"FILTER_PROJECT_NAME": "Project Name",
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@
"FILTER_OBSERVATION_ATTRIBUTE": "Atributo de Observación",
"FILTER_OBSERVATION_ATTRIBUTE_DESC": "Utilice los campos a continuación para filtrar su búsqueda por atributos observados",
"FILTER_SEX": "Sexo",
"FILTER_LIFE_STATUS": "Estado Vital",
"FILTER_LIVING_STATUS": "Estado de Vida",
"FILTER_LIFE_STAGE": "Etapa de Vida",
"FILTER_GENUS_AND_SPECIES": "Género y Especie",
"FILTER_SIGHTING_ID": "ID del Avistamiento",
"FILTER_OBSERVATION_SEARCH": "Búsqueda de Observación",
Expand Down Expand Up @@ -196,7 +197,7 @@
"FILTER_RELATIONSHIP_ROLE": "Rol de Relación Social",
"FILTER_METADATA": "Metadatos",
"FILTER_METADATA_DESC": "Utilice los campos a continuación para limitar su búsqueda basada en datos relacionados con la plataforma",
"FILTER_ENCOUNTERS_STATUS": "Estado del Encuentro",
"FILTER_ENCOUNTERS_STATE": "Estado del Encuentro",
"FILTER_SUBMITTER": "Remitente, Fotógrafo o Dirección de Correo Electrónico. Este campo NO distingue entre mayúsculas y minúsculas",
"FILTER_ORGANIZATION_ID": "ID de la Organización",
"FILTER_PROJECT_NAME": "Nombre del Proyecto",
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@
"FILTER_OBSERVATION_ATTRIBUTE": "Attribut d'Observation",
"FILTER_OBSERVATION_ATTRIBUTE_DESC": "Utilisez les champs ci-dessous pour filtrer votre recherche par attributs observés",
"FILTER_SEX": "Sexe",
"FILTER_LIFE_STATUS": "Statut Vital",
"FILTER_LIVING_STATUS": "Statut de Vie",
"FILTER_LIFE_STAGE": "Stade de Vie",
"FILTER_GENUS_AND_SPECIES": "Genre et Espèce",
"FILTER_SIGHTING_ID": "ID d'Observation",
"FILTER_OBSERVATION_SEARCH": "Recherche d'Observation",
Expand Down Expand Up @@ -196,7 +197,7 @@
"FILTER_RELATIONSHIP_ROLE": "Rôle de Relation Sociale",
"FILTER_METADATA": "Métadonnées",
"FILTER_METADATA_DESC": "Utilisez les champs ci-dessous pour limiter votre recherche basée sur des données liées à la plateforme",
"FILTER_ENCOUNTERS_STATUS": "Statut de la Rencontre",
"FILTER_ENCOUNTERS_STATE": "État de la Rencontre",
"FILTER_SUBMITTER": "Soumissionnaire, Photographe ou Adresse Email. Ce champ n'est pas sensible à la casse",
"FILTER_ORGANIZATION_ID": "ID de l'Organisation",
"FILTER_PROJECT_NAME": "Nom du Projet",
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/locale/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@
"FILTER_OBSERVATION_ATTRIBUTE": "Attributo di Osservazione",
"FILTER_OBSERVATION_ATTRIBUTE_DESC": "Utilizza i campi sottostanti per filtrare la tua ricerca in base agli attributi osservati",
"FILTER_SEX": "Sesso",
"FILTER_LIFE_STATUS": "Stato di Vita",
"FILTER_LIVING_STATUS": "Stato di Vita",
"FILTER_LIFE_STAGE": "Stadio di Vita",
"FILTER_GENUS_AND_SPECIES": "Genere e Specie",
"FILTER_SIGHTING_ID": "ID dell'Avvistamento",
"FILTER_OBSERVATION_SEARCH": "Ricerca di Osservazione",
Expand Down Expand Up @@ -196,7 +197,7 @@
"FILTER_RELATIONSHIP_ROLE": "Ruolo di Relazione Sociale",
"FILTER_METADATA": "Metadati",
"FILTER_METADATA_DESC": "Utilizza i campi sottostanti per limitare la tua ricerca in base ai dati relativi alla piattaforma",
"FILTER_ENCOUNTERS_STATUS": "Stato dell'Incontro",
"FILTER_ENCOUNTERS_STATE": "Stato dell'Incontro",
"FILTER_SUBMITTER": "Inviatore, Fotografo o Indirizzo Email. Questo campo non distingue tra maiuscole e minuscole",
"FILTER_ORGANIZATION_ID": "ID dell'Organizzazione",
"FILTER_PROJECT_NAME": "Nome del Progetto",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/EncounterSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default function EncounterSearch() {
{
clause: "filter",
filterId: "state",
filterKey: "Encounter Status",
filterKey: "Encounter State",
query: {
term: {
state: paramsObject.state,
Expand Down