Skip to content

Commit

Permalink
UIREC-415 Do not call mod-search viewing member titles (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaSedyx authored and usavkov-epam committed Nov 8, 2024
1 parent f8c07b3 commit a6eeb85
Show file tree
Hide file tree
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
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 6 additions & 4 deletions src/ReceivingList/ReceivingListContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ReceivingListContainer = () => {
const stripes = useStripes();

const {
isLoading: isSearchModeLoading,
crossTenant,
isCentralOrderingEnabled,
isTargetTenantCentral,
Expand All @@ -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)
)(
Expand Down Expand Up @@ -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 {
Expand All @@ -112,7 +114,7 @@ const ReceivingListContainer = () => {
fetchReferences,
options: {
tenantId: targetTenantId,
enabled: Boolean(targetTenantId),
enabled: Boolean(targetTenantId) && !isSearchModeLoading,
},
});

Expand Down

0 comments on commit a6eeb85

Please sign in to comment.