Skip to content

Commit

Permalink
UIORGS-392 Search organization on bank account number
Browse files Browse the repository at this point in the history
  • Loading branch information
usavkov-epam committed Nov 24, 2023
1 parent d156c4b commit 29922d4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Implement organization's banking information details view. Refs UIORGS-389.
* Modify summary display in organization view mode. Refs UIORGS-398.
* Protection of viewing and changes of banking information by permissions. Refs UIORGS-388.
* Search organization on bank account number. Refs UIORGS-392.

## [5.0.0](https://github.com/folio-org/ui-organizations/tree/v5.0.0) (2023-10-12)
[Full Changelog](https://github.com/folio-org/ui-organizations/compare/v4.0.0...v5.0.0)
Expand Down
6 changes: 5 additions & 1 deletion src/Organizations/OrganizationsList/OrganizationsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import {
useLocationSorting,
} from '@folio/stripes-acq-components';
import {
getSearchableIndexes,
OrganizationsListFilter,
searchableIndexes,
} from '@folio/plugin-find-organization';

import {
Expand Down Expand Up @@ -105,6 +105,10 @@ const OrganizationsList = ({

const { isFiltersOpened, toggleFilters } = useFiltersToogle('ui-organizations/filters');

const searchableIndexes = useMemo(() => (
getSearchableIndexes(stripes)
), [stripes]);

const urlParams = useMemo(() => (
matchPath(location.pathname, { path: `${VIEW_ORG_DETAILS}:id` })
), [location.pathname]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { useCallback } from 'react';

import {
makeQueryBuilder,
} from '@folio/stripes-acq-components';
import { useStripes } from '@folio/stripes/core';
import { makeQueryBuilder } from '@folio/stripes-acq-components';
import {
filterMap,
getKeywordQuery,
Expand All @@ -16,14 +15,16 @@ const CUSTOM_SORT_MAP = {
};

export const useBuildQuery = () => {
const stripes = useStripes()

Check failure on line 18 in src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

Missing semicolon

Check failure on line 18 in src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

Missing semicolon

return useCallback(makeQueryBuilder(

Check warning on line 20 in src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead

Check warning on line 20 in src/Organizations/OrganizationsList/hooks/useBuildQuery/useBuildQuery.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead
'cql.allRecords=1',
(query, qindex) => {
if (qindex) {
return `(${qindex}=${query}*)`;
}

return getKeywordQuery(query);
return getKeywordQuery(query, stripes);
},
'sortby name/sort.ascending',
filterMap,
Expand Down
1 change: 1 addition & 0 deletions translations/ui-organizations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"search.erpCode": "Accounting code",
"search.taxId": "Tax ID",
"search.interfaces": "Interfaces",
"search.bankingInformation.bankAccountNumber": "Bank account number",
"search.placeholder.language": "Search with language code",

"organization.delete.heading": "Delete {organizationName}?",
Expand Down

0 comments on commit 29922d4

Please sign in to comment.