Skip to content

Commit 210f78f

Browse files
Fix filter labeling (#1699)
2 parents 7bc8503 + 8b3882f commit 210f78f

File tree

7 files changed

+44
-2
lines changed

7 files changed

+44
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
- There was an internal error alert when navigating back from the borehole detail to the borehole table in anonymous mode.
3131
- The responsive design of the coordinate segment in the detail view was broken.
3232
- When clicking the select all checkbox in the borehole table, only the boreholes on the current page were selected.
33+
- Some filter chips were missing translations or where not displayed correctly.
3334

3435
## v2.1.870 - 2024-09-27
3536

src/client/public/locale/de/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@
212212
"from": "von",
213213
"fromDepthMasl": "Von Tiefe [m ü.M.]",
214214
"fromdepth": "Von Tiefe [m MD]",
215+
"fromdepth_from": "Von Tiefe [m MD](von)",
216+
"fromdepth_to": "Von Tiefe [m MD](bis)",
215217
"fromdiameter": "von Durchmesser",
216218
"fromelevation": "von Höhe",
217219
"general": "Generell",
@@ -368,10 +370,13 @@
368370
"publish": "Veröffentlichen",
369371
"purpose": "Bohrzweck",
370372
"qt_depth": "+/- Bohrlochlänge [m MD]",
373+
"qt_reference_elevation": "+/- Referenz Ansatzhöhe [m]",
371374
"qt_total_depth_tvd": "+/- Bohrendteufe [m TVD]",
372375
"quantity": "Menge",
373376
"reference_elevation": "Referenz Ansatzhöhe [m ü.M.]",
377+
"reference_elevation_from": "Referenz Ansatzhöhe (von)",
374378
"reference_elevation_qt": "+/- Referenz Ansatzhöhe [m]",
379+
"reference_elevation_to": "Referenz Ansatzhöhe (bis)",
375380
"reference_elevation_type": "Typ der Referenz Ansatzhöhe",
376381
"refresh": "Aktualisieren",
377382
"registration": "Erfassung",
@@ -437,6 +442,8 @@
437442
"to": "bis",
438443
"toDepthMasl": "Bis Tiefe [m ü.M.]",
439444
"todepth": "Bis Tiefe [m MD]",
445+
"todepth_from": "Bis Tiefe [m MD](von)",
446+
"todepth_to": "Bis Tiefe [m MD](bis)",
440447
"todiameter": "bis Durchmesser",
441448
"toelevation": "bis Höhe",
442449
"topView": "Aufsicht",

src/client/public/locale/en/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@
212212
"from": "from",
213213
"fromDepthMasl": "From depth [m a.s.l.]",
214214
"fromdepth": "From depth [m MD]",
215+
"fromdepth_from": "From depth [m MD] (from)",
216+
"fromdepth_to": "From depth [m MD] (to)",
215217
"fromdiameter": "from diameter",
216218
"fromelevation": "from elevation",
217219
"general": "General",
@@ -368,6 +370,7 @@
368370
"publish": "Publish",
369371
"purpose": "Drilling purpose",
370372
"qt_depth": "+/- Borehole length [m MD]",
373+
"qt_reference_elevation": "+/- Reference Elevation [m]",
371374
"qt_top_bedrock": "Top bedrock (weathered) [m MD]",
372375
"qt_top_bedrock_from": "Top Bedrock (weathered) [m MD] (from)",
373376
"qt_top_bedrock_to": "Top Bedrock (weathered) [m MD] (to)",
@@ -376,7 +379,9 @@
376379
"qt_total_depth_tvd": "+/- Total Depth [m TVD]",
377380
"quantity": "Quantity",
378381
"reference_elevation": "Reference elevation [m a.s.l.]",
382+
"reference_elevation_from": "Reference Elevation (from)",
379383
"reference_elevation_qt": "+/- Reference elevation [m]",
384+
"reference_elevation_to": "Reference Elevation (to)",
380385
"reference_elevation_type": "Reference elevation type",
381386
"refresh": "Refresh",
382387
"registration": "Registration",
@@ -442,6 +447,8 @@
442447
"to": "to",
443448
"toDepthMasl": "To depth [m a.s.l.]",
444449
"todepth": "To depth [m MD]",
450+
"todepth_from": "To depth [m MD] (from)",
451+
"todepth_to": "To depth [m MD] (to)",
445452
"todiameter": "to diameter",
446453
"toelevation": "to elevation",
447454
"topView": "Top view",

src/client/public/locale/fr/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@
212212
"from": "de",
213213
"fromDepthMasl": "De la profondeur [m s.m.]",
214214
"fromdepth": "De la profondeur [m MD]",
215+
"fromdepth_from": "De la profondeur [m MD] (de)",
216+
"fromdepth_to": "De la profondeur [m MD] (à)",
215217
"fromdiameter": "à partir du diamètre",
216218
"fromelevation": "de l'altitude",
217219
"general": "Général",
@@ -368,10 +370,13 @@
368370
"publish": "Publier",
369371
"purpose": "But du forage",
370372
"qt_depth": "+/- Longueur du forage [m MD]",
373+
"qt_reference_elevation": "+/- Référence altitudinale [m]",
371374
"qt_total_depth_tvd": "+/- Profondeur totale [m TVD]",
372375
"quantity": "Quantité",
373376
"reference_elevation": "Référence altitudinale [m s.m.]",
377+
"reference_elevation_from": "Référence altitudinale (de)",
374378
"reference_elevation_qt": "+/- Référence altitudinale [m]",
379+
"reference_elevation_to": "Référence altitudinale (à)",
375380
"reference_elevation_type": "Type de référence altitudinale",
376381
"refresh": "Actualiser",
377382
"registration": "Enregistrement",
@@ -437,6 +442,8 @@
437442
"to": "à",
438443
"toDepthMasl": "À la profondeur [m s.m.]",
439444
"todepth": "À la profondeur [m MD]",
445+
"todepth_from": "De la profondeur [m MD] (de)",
446+
"todepth_to": "De la profondeur [m MD] (à)",
440447
"todiameter": "jusqu'au diamètre",
441448
"toelevation": "jusqu'à l'altitude",
442449
"topView": "Vue en plan",

src/client/public/locale/it/common.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@
212212
"from": "da",
213213
"fromDepthMasl": "Dalla profondità [m s.l.m.]",
214214
"fromdepth": "Dalla profondità [m MD]",
215+
"fromdepth_from": "Dalla profondità [m MD](da)",
216+
"fromdepth_to": "Dalla profondità [m MD](a)",
215217
"fromdiameter": "a partire dal diametro",
216218
"fromelevation": "a partire dalla quota",
217219
"general": "Generale",
@@ -368,10 +370,13 @@
368370
"publish": "Pubblicare",
369371
"purpose": "Scopo della perforazione",
370372
"qt_depth": "+/- Lunghezza della perforazione [m MD]",
373+
"qt_reference_elevation": "+/- Riferimento della quota [m]",
371374
"qt_total_depth_tvd": "+/- Profondità totale [m TVD]",
372375
"quantity": "Quantità",
373376
"reference_elevation": "Riferimento della quota [m s.l.m.]",
377+
"reference_elevation_from": "Riferimento della quota (da)",
374378
"reference_elevation_qt": "+/- Riferimento della quota [m]",
379+
"reference_elevation_to": "Riferimento della quota (a)",
375380
"reference_elevation_type": "Tipo di riferimento della quota",
376381
"refresh": "Attualizzare",
377382
"registration": "Cattura",
@@ -437,6 +442,8 @@
437442
"to": "fino a",
438443
"toDepthMasl": "Alla profondità [m s.l.m.]",
439444
"todepth": "Alla profondità [m MD]",
445+
"todepth_from": "Alla profondità [m MD](da)",
446+
"todepth_to": "Alla profondità [m MD](a)",
440447
"todiameter": "fino al diametro",
441448
"toelevation": "fino alla quota",
442449
"topView": "Vista dall'alto",

src/client/src/pages/overview/sidePanelContent/filter/FilterChips.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,19 @@ const FilterChips = ({ activeFilters, setFilter }: FilterChipsProps) => {
2929
return (
3030
<Box sx={{ marginBottom: activeFilters.length > 0 ? "14px" : undefined }}>
3131
{activeFilters.map((filter, index) => {
32-
const filterLabel = filter.key === "role" ? t("status") : t(filter.key);
32+
const customFilterLabels: { [key: string]: string } = {
33+
role: "status",
34+
status: "boreholeStatus",
35+
description_quality: "completeness",
36+
layer_gradation: "gradation",
37+
layer_depth_from_from: "fromdepth_from",
38+
layer_depth_from_to: "fromdepth_to",
39+
layer_depth_to_to: "todepth_to",
40+
layer_depth_to_from: "todepth_from",
41+
};
42+
43+
const filterLabel = t(customFilterLabels[filter.key] || filter.key);
44+
3345
return (
3446
<Tooltip key={index} title={filterLabel.length > 15 && filterLabel}>
3547
<Chip

src/client/src/pages/overview/sidePanelContent/filter/filterComponent.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ class FilterComponent extends React.Component {
115115
const activeFilters = Object.entries(search.filter)
116116
.filter(
117117
([key, value]) =>
118-
value != null && value !== "" && value !== -1 && !["refresh"].includes(key) && value !== "all",
118+
(value != null && value !== "" && value !== -1 && !["refresh"].includes(key) && value !== "all") ||
119+
(["national_interest", "groundwater", "striae"].includes(key) && value === null),
119120
)
120121
.map(([key, value]) => ({ key: key, value: value }));
121122
this.context.setActiveFilterLength(activeFilters.length);

0 commit comments

Comments
 (0)