20031: Fix incorect const used for closing dialog, tweak copy/move file wording
authorStephen Smith <stephen@curii.com>
Mon, 1 May 2023 18:36:45 +0000 (14:36 -0400)
committerStephen Smith <stephen@curii.com>
Mon, 1 May 2023 18:36:45 +0000 (14:36 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/collections/collection-partial-copy-actions.ts
src/store/collections/collection-partial-move-actions.ts

index 5da7c8f1d66d2525dc3ff96257e5c1024edd6958..4005098f3b67f969eac87393fa5f5b8803898cd8 100644 (file)
@@ -175,8 +175,8 @@ export const copyCollectionPartialToSeparateCollections = ({ name, projectUuid }
 
         if (sourceCollection) {
             try {
-                dispatch(startSubmit(COLLECTION_PARTIAL_COPY_FORM_NAME));
-                dispatch(progressIndicatorActions.START_WORKING(COLLECTION_PARTIAL_COPY_FORM_NAME));
+                dispatch(startSubmit(COLLECTION_PARTIAL_COPY_TO_SEPARATE_COLLECTIONS));
+                dispatch(progressIndicatorActions.START_WORKING(COLLECTION_PARTIAL_COPY_TO_SEPARATE_COLLECTIONS));
 
                 // Get selected files
                 const paths = filterCollectionFilesBySelection(state.collectionPanelFiles, true)
@@ -188,7 +188,7 @@ export const copyCollectionPartialToSeparateCollections = ({ name, projectUuid }
                         sourceCollection.portableDataHash,
                         [path],
                         {
-                            name: `File split from collection ${name}${path}`,
+                            name: `File copied from collection ${name}${path}`,
                             ownerUuid: projectUuid,
                             uuid: undefined,
                         },
@@ -198,26 +198,26 @@ export const copyCollectionPartialToSeparateCollections = ({ name, projectUuid }
                 ));
                 dispatch(updateResources(collections));
 
-                dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
+                dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_TO_SEPARATE_COLLECTIONS }));
                 dispatch(snackbarActions.OPEN_SNACKBAR({
                     message: 'New collections created.',
                     hideDuration: 2000,
                     kind: SnackbarKind.SUCCESS
                 }));
-                dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PARTIAL_COPY_FORM_NAME));
+                dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PARTIAL_COPY_TO_SEPARATE_COLLECTIONS));
             } catch (e) {
                 const error = getCommonResourceServiceError(e);
                 console.log(e, error);
                 if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
                     dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Collection from one or more files already exists', hideDuration: 2000, kind: SnackbarKind.ERROR }));
                 } else if (error === CommonResourceServiceError.UNKNOWN) {
-                    dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
+                    dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_TO_SEPARATE_COLLECTIONS }));
                     dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not create a copy of collection', hideDuration: 2000, kind: SnackbarKind.ERROR }));
                 } else {
-                    dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
+                    dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_TO_SEPARATE_COLLECTIONS }));
                     dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Collection has been copied but may contain incorrect files.', hideDuration: 2000, kind: SnackbarKind.ERROR }));
                 }
-                dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PARTIAL_COPY_FORM_NAME));
+                dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PARTIAL_COPY_TO_SEPARATE_COLLECTIONS));
             }
         }
     };
index 8b4492efa4c6313a8e807d07951c764dff1fabbb..afd35461a6cbdc3757d32e006e97c0aa992c7b1c 100644 (file)
@@ -185,7 +185,7 @@ export const moveCollectionPartialToSeparateCollections = ({ name, projectUuid }
                         sourceCollection.portableDataHash,
                         [path],
                         {
-                            name: `File split from collection ${name}${path}`,
+                            name: `File moved from collection ${name}${path}`,
                             ownerUuid: projectUuid,
                             uuid: undefined,
                         },