Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIBULKED-538 “Are you sure" form notification banner wording for the case of bulk editing MARC fields for FOLIO Instances (follow up) #644

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading