--- /dev/null
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { Dispatch } from "redux";
+import { reset, startSubmit, stopSubmit } from "redux-form";
+import { RootState } from '~/store/store';
+import { uploadCollectionFiles } from '~/store/collections/uploader/collection-uploader-actions';
+import { projectPanelActions } from "~/store/project-panel/project-panel-action";
+import { snackbarActions } from "~/store/snackbar/snackbar-actions";
+import { dialogActions } from "~/store/dialog/dialog-actions";
+import { CollectionResource } from '~/models/collection';
+import { ServiceRepository } from '~/services/services';
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+
+export interface CollectionCreateFormDialogData {
+ name: string;
+ description: string;
+ files: File[];
+}
+
+export const COLLECTION_CREATE_FORM_NAME = "collectionCreateDialog";
+
+export const openCreateModal = () =>
+ (dispatch: Dispatch) => {
+ dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_CREATE_FORM_NAME, data: {} }));
+ };
+
+export const addCollection = (data: CollectionCreateFormDialogData) =>
+ async (dispatch: Dispatch) => {
+ await dispatch<any>(createCollection(data));
+ dispatch(snackbarActions.OPEN_SNACKBAR({
+ message: "Collection has been successfully created.",
+ hideDuration: 2000
+ }));
+ };
+
+export const createCollection = (collection: Partial<CollectionResource>) =>
+ async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+ dispatch(startSubmit(COLLECTION_CREATE_FORM_NAME));
+ try {
+ const newCollection = await services.collectionService.create(collection);
+ await dispatch<any>(uploadCollectionFiles(newCollection.uuid));
+ dispatch(projectPanelActions.REQUEST_ITEMS());
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_CREATE_FORM_NAME }));
+ dispatch(reset(COLLECTION_CREATE_FORM_NAME));
+ // return newCollection;
+ } catch (e) {
+ const error = getCommonResourceServiceError(e);
+ if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+ dispatch(stopSubmit(COLLECTION_CREATE_FORM_NAME, { name: 'Collection with the same name already exists.' }));
+ }
+ }
+ };
\ No newline at end of file
// SPDX-License-Identifier: AGPL-3.0
import { Dispatch } from "redux";
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
-import { ServiceRepository } from "~/services/services";
-import { CollectionResource } from '~/models/collection';
-import { RootState } from "~/store/store";
import { initialize, startSubmit, stopSubmit } from 'redux-form';
+import { RootState } from "~/store/store";
import { collectionPanelActions } from "~/store/collection-panel/collection-panel-action";
import { updateDetails } from "~/store/details-panel/details-panel-action";
import { dialogActions } from "~/store/dialog/dialog-actions";
import { snackbarActions } from "~/store/snackbar/snackbar-actions";
import { ContextMenuResource } from '~/store/context-menu/context-menu-reducer';
import { PROJECT_PANEL_ID } from "~/views/project-panel/project-panel";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+import { ServiceRepository } from "~/services/services";
+import { CollectionResource } from '~/models/collection';
export interface CollectionUpdateFormDialogData {
uuid: string;
description: string;
}
-export const COLLECTION_FORM_NAME = 'collectionEditDialog';
+export const COLLECTION_UPDATE_FORM_NAME = 'collectionUpdateDialog';
-export const openUpdater = (resource: ContextMenuResource) =>
+export const openUpdateModal = (resource: ContextMenuResource) =>
(dispatch: Dispatch) => {
- dispatch(initialize(COLLECTION_FORM_NAME, resource));
- dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_FORM_NAME, data: {} }));
+ dispatch(initialize(COLLECTION_UPDATE_FORM_NAME, resource));
+ dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_UPDATE_FORM_NAME, data: {} }));
};
export const editCollection = (data: CollectionUpdateFormDialogData) =>
export const updateCollection = (collection: Partial<CollectionResource>) =>
async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
const uuid = collection.uuid || '';
- dispatch(startSubmit(COLLECTION_FORM_NAME));
+ dispatch(startSubmit(COLLECTION_UPDATE_FORM_NAME));
try {
const updatedCollection = await services.collectionService.update(uuid, collection);
dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item: updatedCollection as CollectionResource }));
dispatch<any>(updateDetails(updatedCollection));
dispatch(dataExplorerActions.REQUEST_ITEMS({ id: PROJECT_PANEL_ID }));
- dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_FORM_NAME }));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_UPDATE_FORM_NAME }));
} catch(e) {
const error = getCommonResourceServiceError(e);
if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
- dispatch(stopSubmit(COLLECTION_FORM_NAME, { name: 'Collection with the same name already exists.' }));
+ dispatch(stopSubmit(COLLECTION_UPDATE_FORM_NAME, { name: 'Collection with the same name already exists.' }));
}
}
};
\ No newline at end of file
// SPDX-License-Identifier: AGPL-3.0
import { combineReducers } from 'redux';
-import { collectionCreatorReducer, CollectionCreatorState } from "./creator/collection-creator-reducer";
import { collectionUploaderReducer, CollectionUploaderState } from "./uploader/collection-uploader-reducer";
export type CollectionsState = {
- creator: CollectionCreatorState;
uploader: CollectionUploaderState
};
export const collectionsReducer = combineReducers({
- creator: collectionCreatorReducer,
uploader: collectionUploaderReducer
});
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import { default as unionize, ofType, UnionOf } from "unionize";
-import { Dispatch } from "redux";
-
-import { RootState } from "../../store";
-import { CollectionResource } from '~/models/collection';
-import { ServiceRepository } from "~/services/services";
-import { uploadCollectionFiles } from '../uploader/collection-uploader-actions';
-import { reset } from "redux-form";
-
-export const collectionCreateActions = unionize({
- OPEN_COLLECTION_CREATOR: ofType<{ ownerUuid: string }>(),
- CLOSE_COLLECTION_CREATOR: ofType<{}>(),
- CREATE_COLLECTION: ofType<{}>(),
- CREATE_COLLECTION_SUCCESS: ofType<{}>(),
-}, {
- tag: 'type',
- value: 'payload'
- });
-
-export type CollectionCreateAction = UnionOf<typeof collectionCreateActions>;
-
-export const createCollection = (collection: Partial<CollectionResource>, files: File[]) =>
- async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
- const { ownerUuid } = getState().collections.creator;
- const collectiontData = { ownerUuid, ...collection };
- dispatch(collectionCreateActions.CREATE_COLLECTION(collectiontData));
- const newCollection = await services.collectionService.create(collectiontData);
- await dispatch<any>(uploadCollectionFiles(newCollection.uuid));
- dispatch(collectionCreateActions.CREATE_COLLECTION_SUCCESS(collection));
- dispatch(reset('collectionCreateDialog'));
- return newCollection;
- };
-
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import { collectionCreatorReducer } from "./collection-creator-reducer";
-import { collectionCreateActions } from "./collection-creator-action";
-
-describe('collection-reducer', () => {
-
- it('should open collection creator dialog', () => {
- const initialState = { opened: false, ownerUuid: "" };
- const collection = { opened: true, ownerUuid: "" };
-
- const state = collectionCreatorReducer(initialState, collectionCreateActions.OPEN_COLLECTION_CREATOR(initialState));
- expect(state).toEqual(collection);
- });
-
- it('should close collection creator dialog', () => {
- const initialState = { opened: true, ownerUuid: "" };
- const collection = { opened: false, ownerUuid: "" };
-
- const state = collectionCreatorReducer(initialState, collectionCreateActions.CLOSE_COLLECTION_CREATOR());
- expect(state).toEqual(collection);
- });
-
- it('should reset collection creator dialog props', () => {
- const initialState = { opened: true, ownerUuid: "test" };
- const collection = { opened: false, ownerUuid: "" };
-
- const state = collectionCreatorReducer(initialState, collectionCreateActions.CREATE_COLLECTION_SUCCESS());
- expect(state).toEqual(collection);
- });
-});
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import { collectionCreateActions, CollectionCreateAction } from './collection-creator-action';
-
-export interface CollectionCreatorState {
- opened: boolean;
- ownerUuid: string;
-}
-
-const updateCreator = (state: CollectionCreatorState, creator?: Partial<CollectionCreatorState>) => ({
- ...state,
- ...creator
-});
-
-const initialState: CollectionCreatorState = {
- opened: false,
- ownerUuid: ''
-};
-
-export const collectionCreatorReducer = (state: CollectionCreatorState = initialState, action: CollectionCreateAction) => {
- return collectionCreateActions.match(action, {
- OPEN_COLLECTION_CREATOR: ({ ownerUuid }) => updateCreator(state, { ownerUuid, opened: true }),
- CLOSE_COLLECTION_CREATOR: () => updateCreator(state, { opened: false }),
- CREATE_COLLECTION: () => updateCreator(state),
- CREATE_COLLECTION_SUCCESS: () => updateCreator(state, { opened: false, ownerUuid: "" }),
- default: () => state
- });
-};
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "~/components/icon/icon";
-import { openUpdater } from "~/store/collections/collection-update-actions";
+import { openUpdateModal } from "~/store/collections/collection-update-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
import { openMoveCollectionDialog } from '~/store/move-collection-dialog/move-collection-dialog';
import { openProjectCopyDialog } from "~/store/project-copy-project-dialog/project-copy-project-dialog";
icon: RenameIcon,
name: "Edit collection",
execute: (dispatch, resource) => {
- dispatch<any>(openUpdater(resource));
+ dispatch<any>(openUpdateModal(resource));
}
},
{
import { ToggleFavoriteAction } from "../actions/favorite-action";
import { toggleFavorite } from "~/store/favorites/favorites-actions";
import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon } from "~/components/icon/icon";
-import { openUpdater } from "~/store/collections/collection-update-actions";
+import { openUpdateModal } from "~/store/collections/collection-update-actions";
import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
import { openMoveCollectionDialog } from '~/store/move-collection-dialog/move-collection-dialog';
import { openProjectCopyDialog } from '~/store/project-copy-project-dialog/project-copy-project-dialog';
icon: RenameIcon,
name: "Edit collection",
execute: (dispatch, resource) => {
- dispatch<any>(openUpdater(resource));
+ dispatch<any>(openUpdateModal(resource));
}
},
{
import { ContextMenuActionSet } from "../context-menu-action-set";
import { projectActions } from "~/store/project/project-action";
-import { collectionCreateActions } from "~/store/collections/creator/collection-creator-action";
import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
-import { COLLECTION_CREATE_DIALOG } from "../../dialog-create/dialog-collection-create";
+import { COLLECTION_CREATE_FORM_NAME, openCreateModal } from '~/store/collections/collection-create-actions';
import { NewProjectIcon, CollectionIcon } from "~/components/icon/icon";
export const rootProjectActionSet: ContextMenuActionSet = [[
icon: CollectionIcon,
name: "New Collection",
execute: (dispatch, resource) => {
- dispatch(reset(COLLECTION_CREATE_DIALOG));
- dispatch(collectionCreateActions.OPEN_COLLECTION_CREATOR({ ownerUuid: resource.uuid }));
+ dispatch(reset(COLLECTION_CREATE_FORM_NAME));
+ dispatch<any>(openCreateModal());
}
}
]];
+++ /dev/null
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import { connect } from "react-redux";
-import { Dispatch } from "redux";
-import { SubmissionError } from "redux-form";
-
-import { RootState } from "~/store/store";
-import { DialogCollectionCreate } from "../dialog-create/dialog-collection-create";
-import { collectionCreateActions, createCollection } from "~/store/collections/creator/collection-creator-action";
-import { snackbarActions } from "~/store/snackbar/snackbar-actions";
-import { UploadFile } from "~/store/collections/uploader/collection-uploader-actions";
-import { projectPanelActions } from "~/store/project-panel/project-panel-action";
-
-const mapStateToProps = (state: RootState) => ({
- open: state.collections.creator.opened
-});
-
-const mapDispatchToProps = (dispatch: Dispatch) => ({
- handleClose: () => {
- dispatch(collectionCreateActions.CLOSE_COLLECTION_CREATOR());
- },
- onSubmit: (data: { name: string, description: string }, files: UploadFile[]) => {
- return dispatch<any>(addCollection(data, files.map(f => f.file)))
- .catch((e: any) => {
- throw new SubmissionError({ name: e.errors.join("").includes("UniqueViolation") ? "Collection with this name already exists." : "" });
- });
- }
-});
-
-const addCollection = (data: { name: string, description: string }, files: File[]) =>
- (dispatch: Dispatch) => {
- return dispatch<any>(createCollection(data, files)).then(() => {
- dispatch(snackbarActions.OPEN_SNACKBAR({
- message: "Collection has been successfully created.",
- hideDuration: 2000
- }));
- dispatch(projectPanelActions.REQUEST_ITEMS());
- });
- };
-
-export const CreateCollectionDialog = connect(mapStateToProps, mapDispatchToProps)(DialogCollectionCreate);
-
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { reduxForm, Field } from 'redux-form';
-import { compose } from 'redux';
-import { TextField } from '~/components/text-field/text-field';
-import { Dialog, DialogActions, DialogContent, DialogTitle } from '@material-ui/core/';
-import { Button, StyleRulesCallback, WithStyles, withStyles, CircularProgress } from '@material-ui/core';
-
-import { COLLECTION_NAME_VALIDATION, COLLECTION_DESCRIPTION_VALIDATION } from '~/validators/validators';
-import { FileUpload } from "~/components/file-upload/file-upload";
-import { connect, DispatchProp } from "react-redux";
-import { RootState } from "~/store/store";
-import { collectionUploaderActions, UploadFile } from "~/store/collections/uploader/collection-uploader-actions";
-
-type CssRules = "button" | "lastButton" | "formContainer" | "createProgress" | "dialogActions";
-
-const styles: StyleRulesCallback<CssRules> = theme => ({
- button: {
- marginLeft: theme.spacing.unit
- },
- lastButton: {
- marginLeft: theme.spacing.unit,
- marginRight: "20px",
- },
- formContainer: {
- display: "flex",
- flexDirection: "column",
- },
- createProgress: {
- position: "absolute",
- minWidth: "20px",
- right: "110px"
- },
- dialogActions: {
- marginBottom: theme.spacing.unit * 3
- }
-});
-
-interface DialogCollectionDataProps {
- open: boolean;
- handleSubmit: any;
- submitting: boolean;
- invalid: boolean;
- pristine: boolean;
- files: UploadFile[];
-}
-
-interface DialogCollectionActionProps {
- handleClose: () => void;
- onSubmit: (data: { name: string, description: string }, files: UploadFile[]) => void;
-}
-
-type DialogCollectionProps = DialogCollectionDataProps & DialogCollectionActionProps & DispatchProp & WithStyles<CssRules>;
-
-export const COLLECTION_CREATE_DIALOG = "collectionCreateDialog";
-
-export const DialogCollectionCreate = compose(
- connect((state: RootState) => ({
- files: state.collections.uploader
- })),
- reduxForm({ form: COLLECTION_CREATE_DIALOG }),
- withStyles(styles))(
- class DialogCollectionCreate extends React.Component<DialogCollectionProps> {
- render() {
- const { classes, open, handleClose, handleSubmit, onSubmit, submitting, invalid, pristine, files } = this.props;
- const busy = submitting || files.reduce(
- (prev, curr) => prev + (curr.loaded > 0 && curr.loaded < curr.total ? 1 : 0), 0
- ) > 0;
- return (
- <Dialog
- open={open}
- onClose={handleClose}
- fullWidth={true}
- maxWidth='sm'
- disableBackdropClick={true}
- disableEscapeKeyDown={true}>
- <form onSubmit={handleSubmit((data: any) => onSubmit(data, files))}>
- <DialogTitle id="form-dialog-title">Create a collection</DialogTitle>
- <DialogContent className={classes.formContainer}>
- <Field name="name"
- disabled={submitting}
- component={TextField}
- validate={COLLECTION_NAME_VALIDATION}
- label="Collection Name" />
- <Field name="description"
- disabled={submitting}
- component={TextField}
- validate={COLLECTION_DESCRIPTION_VALIDATION}
- label="Description - optional" />
- <FileUpload
- files={files}
- disabled={busy}
- onDrop={files => this.props.dispatch(collectionUploaderActions.SET_UPLOAD_FILES(files))} />
- </DialogContent>
- <DialogActions className={classes.dialogActions}>
- <Button onClick={handleClose} className={classes.button} color="primary"
- disabled={busy}>CANCEL</Button>
- <Button type="submit"
- className={classes.lastButton}
- color="primary"
- disabled={invalid || busy || pristine}
- variant="contained">
- CREATE A COLLECTION
- </Button>
- {busy && <CircularProgress size={20} className={classes.createProgress} />}
- </DialogActions>
- </form>
- </Dialog>
- );
- }
- }
- );
+import { InjectedFormProps } from 'redux-form';
+import { WithDialogProps } from '~/store/dialog/with-dialog';
+import { CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions';
+import { FormDialog } from '~/components/form-dialog/form-dialog';
+import { CollectionNameField, CollectionDescriptionField } from '~/views-components/collection-form-fields/collection-form-fields';
+
+type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
+
+export const DialogCollectionCreate = (props: DialogCollectionProps) =>
+ <FormDialog
+ dialogTitle='Create a collection'
+ formFields={CollectionAddFields}
+ submitLabel='Create a Collection'
+ {...props}
+ />;
+
+const CollectionAddFields = () => <span>
+ <CollectionNameField />
+ <CollectionDescriptionField />
+ {/* <FileUpload
+ files={files}
+ disabled={busy}
+ onDrop={files => this.props.dispatch(collectionUploaderActions.SET_UPLOAD_FILES(files))} /> */}
+</span>;
\ No newline at end of file
--- /dev/null
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { compose } from "redux";
+import { reduxForm } from 'redux-form';
+import { withDialog } from "~/store/dialog/with-dialog";
+import { addCollection, COLLECTION_CREATE_FORM_NAME, CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions';
+import { UploadFile } from "~/store/collections/uploader/collection-uploader-actions";
+import { DialogCollectionCreate } from "~/views-components/dialog-create/dialog-collection-create";
+
+export const CreateCollectionDialog = compose(
+ withDialog(COLLECTION_CREATE_FORM_NAME),
+ reduxForm<CollectionCreateFormDialogData>({
+ form: COLLECTION_CREATE_FORM_NAME,
+ onSubmit: (data, dispatch) => {
+ console.log('onSubmit: ', data);
+ dispatch(addCollection(data));
+ }
+ })
+)(DialogCollectionCreate);
\ No newline at end of file
import { compose } from "redux";
import { reduxForm } from 'redux-form';
import { withDialog } from "~/store/dialog/with-dialog";
-import { DialogCollectionUpdate } from '../dialog-update/dialog-collection-update';
-import { editCollection, COLLECTION_FORM_NAME, CollectionUpdateFormDialogData } from '~/store/collections/collection-update-actions';
+import { DialogCollectionUpdate } from '~/views-components/dialog-update/dialog-collection-update';
+import { editCollection, COLLECTION_UPDATE_FORM_NAME, CollectionUpdateFormDialogData } from '~/store/collections/collection-update-actions';
export const UpdateCollectionDialog = compose(
- withDialog(COLLECTION_FORM_NAME),
+ withDialog(COLLECTION_UPDATE_FORM_NAME),
reduxForm<CollectionUpdateFormDialogData>({
- form: COLLECTION_FORM_NAME,
+ form: COLLECTION_UPDATE_FORM_NAME,
onSubmit: (data, dispatch) => {
dispatch(editCollection(data));
}
import { SidePanel, SidePanelItem } from '~/components/side-panel/side-panel';
import { ItemMode, setProjectItem } from "~/store/navigation/navigation-action";
import { projectActions } from "~/store/project/project-action";
-import { collectionCreateActions } from '~/store/collections/creator/collection-creator-action';
-import { ProjectPanel } from "~/views/project-panel/project-panel";
import { DetailsPanel } from '~/views-components/details-panel/details-panel';
import { ArvadosTheme } from '~/common/custom-theme';
import { CreateProjectDialog } from "~/views-components/create-project-dialog/create-project-dialog";
import { CurrentTokenDialog } from '~/views-components/current-token-dialog/current-token-dialog';
import { Snackbar } from '~/views-components/snackbar/snackbar';
import { favoritePanelActions } from '~/store/favorite-panel/favorite-panel-action';
-import { CreateCollectionDialog } from '~/views-components/create-collection-dialog/create-collection-dialog';
import { CollectionPanel } from '../collection-panel/collection-panel';
import { loadCollection, loadCollectionTags } from '~/store/collection-panel/collection-panel-action';
import { getCollectionUrl } from '~/models/collection';
-import { UpdateCollectionDialog } from '~/views-components/update-collection-dialog/update-collection-dialog';
+import { COLLECTION_CREATE_FORM_NAME, openCreateModal } from '~/store/collections/collection-create-actions';
+import { CreateCollectionDialog } from '~/views-components/dialog-forms/create-collection-dialog';
+import { UpdateCollectionDialog } from '~/views-components/dialog-forms/update-collection-dialog';
import { UpdateProjectDialog } from '~/views-components/update-project-dialog/update-project-dialog';
import { AuthService } from "~/services/auth-service/auth-service";
import { RenameFileDialog } from '~/views-components/rename-file-dialog/rename-file-dialog';
import { FileRemoveDialog } from '~/views-components/file-remove-dialog/file-remove-dialog';
import { MultipleFilesRemoveDialog } from '~/views-components/file-remove-dialog/multiple-files-remove-dialog';
import { DialogCollectionCreateWithSelectedFile } from '~/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected';
-import { COLLECTION_CREATE_DIALOG } from '~/views-components/dialog-create/dialog-collection-create';
import { PROJECT_CREATE_DIALOG } from '~/views-components/dialog-create/dialog-project-create';
import { UploadCollectionFilesDialog } from '~/views-components/upload-collection-files-dialog/upload-collection-files-dialog';
import { CollectionPartialCopyDialog } from '../../views-components/collection-partial-copy-dialog/collection-partial-copy-dialog';
}
handleCollectionCreationDialogOpen = (itemUuid: string) => {
- this.props.dispatch(reset(COLLECTION_CREATE_DIALOG));
- this.props.dispatch(collectionCreateActions.OPEN_COLLECTION_CREATOR({ ownerUuid: itemUuid }));
+ this.props.dispatch(reset(COLLECTION_CREATE_FORM_NAME));
+ this.props.dispatch<any>(openCreateModal());
}
openContextMenu = (event: React.MouseEvent<HTMLElement>, resource: { name: string; uuid: string; description?: string; kind: ContextMenuKind; }) => {