Skip to content

Commit

Permalink
UIORGS-193 Add additional filters to support reporting requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
usavkov-epam committed Apr 17, 2024
1 parent 648284a commit 1f57802
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 5.2.0 (IN PROGRESS)

* UX Consistency: HTML Page Title display when the third pane (detail record) displays. Refs UIORGS-423.
* Add additional filters to support reporting requirements. Refs UIORG-193.

## [5.1.0](https://github.com/folio-org/ui-organizations/tree/v5.1.0) (2024-03-19)
[Full Changelog](https://github.com/folio-org/ui-organizations/compare/v5.0.0...v5.1.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import moment from 'moment';

Check failure on line 1 in src/Organizations/OrganizationsList/hooks/useOrganizations/useOrganizations.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

'moment' should be listed in the project's dependencies. Run 'npm i -S moment' to add it

Check failure on line 1 in src/Organizations/OrganizationsList/hooks/useOrganizations/useOrganizations.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

'moment' should be listed in the project's dependencies. Run 'npm i -S moment' to add it
import { useQuery } from 'react-query';
import { useLocation } from 'react-router';
import queryString from 'query-string';

import {
useNamespace,
useOkapiKy,
useStripes,
} from '@folio/stripes/core';
import {
getFiltersCount,
Expand All @@ -19,14 +21,20 @@ export const useOrganizations = ({
options = {},
}) => {
const ky = useOkapiKy();
const stripes = useStripes();
const [namespace] = useNamespace({ key: 'organizations-list' });

const { search } = useLocation();
const buildQuery = useBuildQuery();
const queryParams = queryString.parse(search);
const query = buildQuery(queryParams);
const filtersCount = getFiltersCount(queryParams);

moment.tz.setDefault(stripes.timezone);

const query = buildQuery(queryParams);

moment.tz.setDefault();

const defaultSearchParams = {
query,
limit: pagination.limit,
Expand Down
4 changes: 4 additions & 0 deletions translations/ui-organizations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"filterConfig.addressCategory": "Address category",
"filterConfig.contactPeopleCategory": "Contact people category",
"filterConfig.country": "Country",
"filterConfig.createdBy": "Created by",
"filterConfig.dateCreated": "Date created",
"filterConfig.dateUpdated": "Date updated",
"filterConfig.isVendor": "Is vendor",
"filterConfig.isDonor": "Is donor",
"filterConfig.languages": "Languages",
Expand All @@ -52,6 +55,7 @@
"filterConfig.boolean.true": "Yes",
"filterConfig.boolean.false": "No",
"filterConfig.types": "Types",
"filterConfig.updatedBy": "Updated by",

"search.keyword": "All",
"search.name": "Name",
Expand Down

0 comments on commit 1f57802

Please sign in to comment.