From 05ad98818188681f3fa08f0f335d1c76a7885f70 Mon Sep 17 00:00:00 2001 From: Denys Bohdan Date: Tue, 31 Oct 2023 14:30:27 +0100 Subject: [PATCH] UIQM-571 Wait for PUT request to finish after deriving before redirecting to Inventory (#616) --- CHANGELOG.md | 5 +++++ src/QuickMarcEditor/utils.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d33d561..c1e1977e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change history for ui-quick-marc +## [7.0.3] (IN PROGRESS) + +* [UIQM-571](https://issues.folio.org/browse/UIQM-571) Added `marc-records-editor.item.put` to Derive and Create Bib permissions to fix issue with broken links after deriving or creating a record. + + ## [7.0.2](https://github.com/folio-org/ui-quick-marc/tree/v7.0.2) (2023-10-27) * [UIQM-571](https://issues.folio.org/browse/UIQM-571) Added `marc-records-editor.item.put` to Derive and Create Bib permissions to fix issue with broken links after deriving or creating a record. diff --git a/src/QuickMarcEditor/utils.js b/src/QuickMarcEditor/utils.js index 0e501454..91be5cc6 100644 --- a/src/QuickMarcEditor/utils.js +++ b/src/QuickMarcEditor/utils.js @@ -155,7 +155,7 @@ export const saveLinksToNewRecord = async (mutator, externalId, marcRecord) => { // request derived MARC Bib record const marcPromise = mutator.quickMarcEditMarcRecord.GET({ params: { externalId } }); - Promise.all([instancePromise, marcPromise]).then(([{ _version }, derivedRecord]) => { + return Promise.all([instancePromise, marcPromise]).then(([{ _version }, derivedRecord]) => { // copy linking data to new record derivedRecord.fields = derivedRecord.fields.map((field) => { // matching field from POST request