Skip to content

Commit

Permalink
Make sourcce record as shared when instance has been shared
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 committed May 14, 2024
1 parent e0bc47e commit 9418603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* Jest/RTL: Cover ModalContent components with unit tests. Refs UIIN-2669.
* Add callout noting user's active affiliation when it changes after selecting holding or item. Refs UIIN-2831, UIIN-2872.
* Jest/RTL: Cover LocationSelectionWithCheck components with unit tests. Refs UIIN-2670.
* Source record is local after instance is shared. Fixes UIIN-2900.

## [11.0.4](https://github.com/folio-org/ui-inventory/tree/v11.0.4) (2024-04-30)
[Full Changelog](https://github.com/folio-org/ui-inventory/compare/v11.0.3...v11.0.4)
Expand Down
7 changes: 5 additions & 2 deletions src/components/ViewSource/ViewSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ import {

import { useGoBack } from '../../common/hooks';

import { isUserInConsortiumMode } from '../../utils';
import {
isInstanceShadowCopy,
isUserInConsortiumMode,
} from '../../utils';
import MARC_TYPES from './marcTypes';

import styles from './ViewSource.css';
Expand Down Expand Up @@ -88,7 +91,7 @@ const ViewSource = ({
<FormattedMessage
id={`ui-inventory.marcSourceRecord.${marcType}`}
values={{
shared: isUserInConsortiumMode(stripes) ? instance.shared : null,
shared: isUserInConsortiumMode(stripes) ? (instance.shared || isInstanceShadowCopy(instance?.source)) : null,
}}
/>
);
Expand Down

0 comments on commit 9418603

Please sign in to comment.