Skip to content

Commit

Permalink
UIOR-1330 Respect the 'tenantId' property when resolving holdings in …
Browse files Browse the repository at this point in the history
…central tenant mode (#1681)
  • Loading branch information
usavkov-epam committed Dec 4, 2024
1 parent 66a8021 commit 4312c63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## 7.1.0 (IN PROGRESS)

## 7.0.2 (IN PROGRESS)

* Add "Donor (Deprecated)" label for PO line search by Donor filed. Refs UIOR-1348.
* Respect the `tenantId` property when resolving holdings in central tenant mode. Refs UIOR-1330.

## [7.0.1](https://github.com/folio-org/ui-orders/tree/v7.0.1) (2024-11-14)
[Full Changelog](https://github.com/folio-org/ui-orders/compare/v7.0.0...v7.0.1)
Expand Down
14 changes: 11 additions & 3 deletions src/components/POLine/Location/LocationView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { useMemo } from 'react';
import find from 'lodash/find';
import keyBy from 'lodash/keyBy';
import PropTypes from 'prop-types';
import React, { useMemo } from 'react';
import { FormattedMessage } from 'react-intl';
import { find, keyBy } from 'lodash';

import {
Col,
Expand Down Expand Up @@ -36,7 +37,14 @@ const Location = ({
name: fieldName,
}) => {
const filteredLocation = locationsMap[location.locationId] || {};
const holding = find(holdings, ['id', location.holdingId]);
const holding = find(
holdings,
{
id: location.holdingId,
...(centralOrdering ? { tenantId: location.tenantId } : {}),
},
);

const { name, code } = filteredLocation;
const locationNameCode = name ? `${name} (${code})` : '';
const labelId = location.holdingId ? 'ui-orders.location.holding' : 'ui-orders.location.nameCode';
Expand Down

0 comments on commit 4312c63

Please sign in to comment.