Skip to content

Commit

Permalink
UIDATIMP-1564: Display item information without holdings (#1498)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2cd0d55)
  • Loading branch information
OleksandrHladchenko1 authored and mariia-aloshyna committed Nov 9, 2023
1 parent 018f912 commit 0d8e33c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* The '[number of records] - records found' subtitle is displayed after clicking on the textLink error counter (UIDATIMP-1549)
* Display loading spinners while running jobs and job log displays are loading. (UIDATIMP-1557)
* Resolve long loading times for running jobs and job log displays. (UIDATIMP-1557)
* Invalid log when attempting to create item without SRS and Instance. (UIDATIMP-1564)

## [7.0.2](https://github.com/folio-org/ui-data-import/tree/v7.0.2) (2023-11-07)

Expand Down
11 changes: 10 additions & 1 deletion src/routes/JobSummary/components/RecordsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export const RecordsTable = ({
holdingsData,
itemData,
} = getRelatedInfo(jobLogRecords, sourceRecordId);
const instanceId = instanceData?.idList[0];

const isGeneralItemError = isGeneralItemsError(itemData, itemActionStatus);

Expand Down Expand Up @@ -228,8 +229,16 @@ export const RecordsTable = ({
);
}

if (isEmpty(holdingsData)) {
return (
<ItemCell
sortedItemData={[itemData]}
instanceId={instanceId}
/>
);
}

const itemInfo = itemData ? [...itemData] : [{}];
const instanceId = instanceData?.idList[0];

holdingsData?.forEach(holdings => {
const isDiscarded = holdings.actionStatus === RECORD_ACTION_STATUS.DISCARDED;
Expand Down

0 comments on commit 0d8e33c

Please sign in to comment.