Skip to content

Commit

Permalink
UIBULKED-538 “Are you sure" form notification banner wording for the …
Browse files Browse the repository at this point in the history
…case of bulk editing MARC fields for FOLIO Instances (follow up) (#644)

(cherry picked from commit 7b4adba)
  • Loading branch information
vashjs committed Nov 15, 2024
1 parent f0ccb0d commit 1c3ffe6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/BulkEditActionMenu/BulkEditActionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -81,7 +80,7 @@ export const BulkEditPreviewModalList = ({
if (!contentData) return <Preloader />;

const renderMessageBanner = () => {
if (!bulkDetails?.processedNumOfRecords && currentRecordType === CAPABILITIES.INSTANCE) {
if (bulkDetails?.status === JOB_STATUSES.REVIEWED_NO_MARC_RECORDS) {
return (
<MessageBanner type="warning">
<FormattedMessage id="ui-bulk-edit.previewModal.message.empty.marc" />
Expand Down
1 change: 1 addition & 0 deletions src/constants/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion translations/ui-bulk-edit/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1c3ffe6

Please sign in to comment.