From 1c3ffe6bb2ceba1d1fcda57ff856a51535e6bd95 Mon Sep 17 00:00:00 2001 From: Vadym Shchekotilin <86330150+vashjs@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:04:28 +0100 Subject: [PATCH] =?UTF-8?q?UIBULKED-538=20=E2=80=9CAre=20you=20sure"=20for?= =?UTF-8?q?m=20notification=20banner=20wording=20for=20the=20case=20of=20b?= =?UTF-8?q?ulk=20editing=20MARC=20fields=20for=20FOLIO=20Instances=20(foll?= =?UTF-8?q?ow=20up)=20(#644)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 7b4adbaba0ae9b5e33313318fdf6f4b26013ff1f) --- src/components/BulkEditActionMenu/BulkEditActionMenu.js | 4 ++-- .../BulkEditInAppPreviewModal/BulkEditPreviewModalList.js | 5 ++--- src/constants/core.js | 1 + translations/ui-bulk-edit/en.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/BulkEditActionMenu/BulkEditActionMenu.js b/src/components/BulkEditActionMenu/BulkEditActionMenu.js index cfbedd08..55585cca 100644 --- a/src/components/BulkEditActionMenu/BulkEditActionMenu.js +++ b/src/components/BulkEditActionMenu/BulkEditActionMenu.js @@ -76,9 +76,9 @@ const BulkEditActionMenu = ({ const isStartBulkInAppActive = hasEditPerm && isInitialStep - && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES].includes(bulkDetails?.status); + && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES, JOB_STATUSES.REVIEWED_NO_MARC_RECORDS].includes(bulkDetails?.status); const isStartMarkActive = (isStartBulkInAppActive || hasInstanceAndMarcEditPerm || hasInventoryAndMarcEditPerm) && currentRecordType === CAPABILITIES.INSTANCE && isInitialStep - && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES].includes(bulkDetails?.status); + && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES, JOB_STATUSES.REVIEWED_NO_MARC_RECORDS].includes(bulkDetails?.status); const isStartManualButtonVisible = isStartBulkCsvActive && isInitialStep && countOfRecords > 0 && criteria !== CRITERIA.QUERY && !isESC; diff --git a/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js b/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js index acf04be5..ebb59768 100644 --- a/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js +++ b/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js @@ -17,7 +17,6 @@ import { PREVIEW_COLUMN_WIDTHS } from '../../../PermissionsModal/constants/lists import css from './BulkEditInAppPreviewModal.css'; import { usePagination } from '../../../../hooks/usePagination'; import { - CAPABILITIES, EDITING_STEPS, JOB_STATUSES, PAGINATION_CONFIG @@ -53,7 +52,7 @@ export const BulkEditPreviewModalList = ({ }); const visibleColumnKeys = getVisibleColumnsKeys(visibleColumns); - const enabled = bulkDetails?.status === JOB_STATUSES.REVIEW_CHANGES; + const enabled = [JOB_STATUSES.REVIEWED_NO_MARC_RECORDS, JOB_STATUSES.REVIEW_CHANGES].includes(bulkDetails?.status); const { contentData, @@ -81,7 +80,7 @@ export const BulkEditPreviewModalList = ({ if (!contentData) return ; const renderMessageBanner = () => { - if (!bulkDetails?.processedNumOfRecords && currentRecordType === CAPABILITIES.INSTANCE) { + if (bulkDetails?.status === JOB_STATUSES.REVIEWED_NO_MARC_RECORDS) { return ( diff --git a/src/constants/core.js b/src/constants/core.js index 8bf67bda..d25570b0 100644 --- a/src/constants/core.js +++ b/src/constants/core.js @@ -50,6 +50,7 @@ export const JOB_STATUSES = { SAVING_RECORDS_LOCALLY: 'SAVING_RECORDS_LOCALLY', DATA_MODIFICATION: 'DATA_MODIFICATION', REVIEW_CHANGES: 'REVIEW_CHANGES', + REVIEWED_NO_MARC_RECORDS: 'REVIEWED_NO_MARC_RECORDS', APPLY_CHANGES: 'APPLY_CHANGES', SUSPENDED: 'SUSPENDED', COMPLETED: 'COMPLETED', diff --git a/translations/ui-bulk-edit/en.json b/translations/ui-bulk-edit/en.json index 6e018c0c..e1f8d9f2 100644 --- a/translations/ui-bulk-edit/en.json +++ b/translations/ui-bulk-edit/en.json @@ -431,7 +431,7 @@ "actionMenu.placeholder": "Search column name", "previewModal.message": "{count, number} records will be changed if the Commit changes button is clicked. You may choose Download preview to review all changes prior to saving.", - "previewModal.message.empty.marc": "All instances have source FOLIO. Use “Instances and Administrative data” option for bulk edit.", + "previewModal.message.empty.marc": "All instances have source FOLIO. Use “Instances and Administrative data” option for bulk edit.", "previewModal.previewToBeChanged": "Preview of records to be changed", "previewModal.keepEditing": "Keep editing", "previewModal.downloadPreview": "Download preview",