From: Lisa Knox Date: Wed, 11 Oct 2023 15:24:42 +0000 (-0400) Subject: 15768: restored error snackbar on copy collection 422 Arvados-DCO-1.1-Signed-off... X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/350def36fb45c1448e98c4a0bf3f149dee2d5405 15768: restored error snackbar on copy collection 422 Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- diff --git a/src/store/collections/collection-copy-actions.ts b/src/store/collections/collection-copy-actions.ts index f2f5569a4b..9386fe3cf0 100644 --- a/src/store/collections/collection-copy-actions.ts +++ b/src/store/collections/collection-copy-actions.ts @@ -14,6 +14,7 @@ import { progressIndicatorActions } from "store/progress-indicator/progress-indi import { initProjectsTreePicker } from "store/tree-picker/tree-picker-actions"; import { getResource } from "store/resources/resources"; import { CollectionResource } from "models/collection"; +import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions"; export const COLLECTION_COPY_FORM_NAME = "collectionCopyFormName"; export const COLLECTION_MULTI_COPY_FORM_NAME = "collectionMultiCopyFormName"; @@ -65,6 +66,13 @@ export const copyCollection = ownerUuid: "A collection with the same name already exists in the target project.", } as FormErrors) ); + dispatch( + snackbarActions.OPEN_SNACKBAR({ + message: "Could not copy the collection.", + hideDuration: 2000, + kind: SnackbarKind.ERROR, + }) + ); } else { dispatch(dialogActions.CLOSE_DIALOG({ id: formName })); throw new Error("Could not copy the collection.");