Skip to content

Commit

Permalink
UIREC-415 Do not call mod-search viewing member titles
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaSedyx committed Nov 4, 2024
1 parent f8c07b3 commit 5c1b822
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

## 6.1.0 (IN PROGRESS)

* Do not call mod-search viewing member titles. Refs UIREC-415.

## [6.0.0](https://github.com/folio-org/ui-receiving/tree/v6.0.0) (2024-10-31)
[Full Changelog](https://github.com/folio-org/ui-receiving/compare/v5.0.5...v6.0.0)

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -79,7 +79,6 @@
"configuration.entries.collection.get",
"consortium-search.campuses.collection.get",
"consortium-search.holdings.batch.collection.get",
"consortium-search.holdings.collection.get",
"consortium-search.institutions.collection.get",
"consortium-search.libraries.collection.get",
"consortium-search.locations.collection.get",
10 changes: 6 additions & 4 deletions src/ReceivingList/ReceivingListContainer.js
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ const ReceivingListContainer = () => {
const stripes = useStripes();

const {
isLoading: isSearchModeLoading,
crossTenant,
isCentralOrderingEnabled,
isTargetTenantCentral,
@@ -38,15 +39,16 @@ const ReceivingListContainer = () => {

const fetchReferences = useCallback(async (titles, ky) => {
const orderLinesResponse = await fetchTitleOrderLines(ky, titles, {});
const isConsortiaRequest = isCentralOrderingEnabled && isTargetTenantCentral;

const holdingsResponse = await (
isCentralOrderingEnabled
isConsortiaRequest
? fetchConsortiumOrderLineHoldings(ky, stripes)
: fetchOrderLineHoldings(ky)
)(orderLinesResponse);

const locationsResponse = await (
isCentralOrderingEnabled
isConsortiaRequest
? fetchConsortiumOrderLineLocations(ky, stripes)
: fetchOrderLineLocations(ky)
)(
@@ -99,7 +101,7 @@ const ReceivingListContainer = () => {
}, {});

return { orderLinesMap };
}, [invalidReferenceMessage, isCentralOrderingEnabled, stripes]);
}, [invalidReferenceMessage, isCentralOrderingEnabled, isTargetTenantCentral, stripes]);

const { pagination, changePage } = usePagination({ limit: RESULT_COUNT_INCREMENT, offset: 0 });
const {
@@ -112,7 +114,7 @@ const ReceivingListContainer = () => {
fetchReferences,
options: {
tenantId: targetTenantId,
enabled: Boolean(targetTenantId),
enabled: Boolean(targetTenantId) && !isSearchModeLoading,
},
});

0 comments on commit 5c1b822

Please sign in to comment.