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

Fix status filter #1707

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
- The responsive design of the coordinate segment in the detail view was broken.
- When clicking the select all checkbox in the borehole table, only the boreholes on the current page were selected.
- Some filter chips were missing translations or where not displayed correctly.
- Filtering striae for "not specified" returned wrong results.
- Filtering striae for `not specified` returned wrong results.
- Filtering by `borehole status` did not work.

## v2.1.870 - 2024-09-27

Expand Down
2 changes: 1 addition & 1 deletion src/client/src/pages/detail/detailHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const DetailHeader = ({
<Typography variant="h2"> {borehole?.alternateName}</Typography>
{!auth.anonymousModeEnabled && (
<Typography variant={"subtitle2"}>
{t("lastUpdated")}: <DateText date={borehole?.updated} /> {t("by")} {borehole?.updatedBy.name}{" "}
{t("lastUpdated")}: <DateText date={borehole?.updated} /> {t("by")} {borehole?.updatedBy?.name}
</Typography>
)}
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,27 @@ class StatusFilter extends Component {
{capitalizeFirstLetter(t("alls"))}
</span>
</Form.Field>
{["statuseditor", "statuscontroller", "statusvalidator", "statuspublisher"].map(role => (
<Form.Field key={"sec-" + role}>
{[
{ name: "EDIT", translationKey: "statuseditor" },
{ name: "CONTROL", translationKey: "statuscontroller" },
{ name: "VALID", translationKey: "statusvalidator" },
{ name: "PUBLIC", translationKey: "statuspublic" },
].map(role => (
<Form.Field key={"sec-" + role.translationKey}>
<Radio
checked={search.filter.role === role.replace("status", "").toUpperCase()}
checked={search.filter.role === role.name}
label={""}
name="radioGroup"
onChange={() => {
this.props.setFilter("role", role.replace("status", "").toUpperCase());
this.props.setFilter("role", role.name);
}}
/>
<span
style={{
color: "black",
fontSize: "1.1em",
}}>
{capitalizeFirstLetter(t(role))}
{capitalizeFirstLetter(t(role.translationKey))}
</span>
</Form.Field>
))}
Expand Down
Loading