15768: made new dialog for multi-copy Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
[arvados-workbench2.git] / src / store / collections / collection-copy-actions.ts
index a482b9a79c483acc7b62d2831bf7d782eab738c7..d4e647f86219af4f6e03c730f2817660a6b8c75b 100644 (file)
@@ -19,7 +19,6 @@ export const COLLECTION_COPY_FORM_NAME = "collectionCopyFormName";
 export const COLLECTION_MULTI_COPY_FORM_NAME = "collectionMultiCopyFormName";
 
 export const openCollectionCopyDialog = (resource: { name: string; uuid: string; isSingle?: boolean }) => (dispatch: Dispatch) => {
-    //here
     dispatch<any>(resetPickerProjectTree());
     dispatch<any>(initProjectsTreePicker(COLLECTION_COPY_FORM_NAME));
     const initialData: CopyFormDialogData = { name: `Copy of: ${resource.name}`, ownerUuid: "", uuid: resource.uuid, isSingle: resource.isSingle };
@@ -28,7 +27,6 @@ export const openCollectionCopyDialog = (resource: { name: string; uuid: string;
 };
 
 export const openMultiCollectionCopyDialog = (resource: { name: string; uuid: string; isSingle?: boolean }) => (dispatch: Dispatch) => {
-    //here
     dispatch<any>(resetPickerProjectTree());
     dispatch<any>(initProjectsTreePicker(COLLECTION_MULTI_COPY_FORM_NAME));
     const initialData: CopyFormDialogData = { name: `Copy of: ${resource.name}`, ownerUuid: "", uuid: resource.uuid, isSingle: resource.isSingle };
@@ -38,9 +36,8 @@ export const openMultiCollectionCopyDialog = (resource: { name: string; uuid: st
 
 export const copyCollection =
     (resource: CopyFormDialogData) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        console.log("IN COPY COLLECTION", resource);
         const formName = resource.isSingle ? COLLECTION_COPY_FORM_NAME : COLLECTION_MULTI_COPY_FORM_NAME;
-        dispatch(startSubmit(COLLECTION_COPY_FORM_NAME));
+        dispatch(startSubmit(formName));
         let collection = getResource<CollectionResource>(resource.uuid)(getState().resources);
         try {
             if (!collection) {