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

move service unit filter next to basic search in leases view #477

43 changes: 21 additions & 22 deletions src/leases/components/search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,27 @@ class Search extends PureComponent<Props, State> {
/>
</Column>
</Row>
<SearchRow>
<SearchLabelColumn>
<SearchLabel>Palvelukokonaisuus</SearchLabel>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be something like Suodata palvelukokonaisuuden mukaan, to distinguish from the top nav bar filter. Should this label be put on a separate line above the field, just like in other fields?

You could also add a visible label for the search field above in the same way with text something like Hae hakusanalla or something else.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Headerissa voisi lukea Oma palvelukokonaisuus
Suodatuksessa voisi lukea Vuokrauspalvelu

</SearchLabelColumn>
<SearchInputColumn>
<FormField
autoBlur
disableDirty
fieldAttributes={{
label: 'Palvelukokonaisuus',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This label is repeated in many places, so it is recommended to use the enum in leases/enums.js

type: FieldTypes.CHOICE,
read_only: false,
}}
invisibleLabel
name='service_unit'
overrideValues={{
options: serviceUnitOptions,
}}
/>
</SearchInputColumn>
</SearchRow>
{!isBasicSearch &&
<Fragment>
<Row>
Expand Down Expand Up @@ -737,28 +758,6 @@ class Search extends PureComponent<Props, State> {
/>
</SearchInputColumn>
</SearchRow>

<SearchRow>
<SearchLabelColumn>
<SearchLabel>Palvelukokonaisuus</SearchLabel>
</SearchLabelColumn>
<SearchInputColumn>
<FormField
autoBlur
disableDirty
fieldAttributes={{
label: 'Palvelukokonaisuus',
type: FieldTypes.CHOICE,
read_only: false,
}}
invisibleLabel
name='service_unit'
overrideValues={{
options: serviceUnitOptions,
}}
/>
</SearchInputColumn>
</SearchRow>
</Column>
</Row>
</Fragment>
Expand Down