[ARVADOS-WORKBENCH2] updated: 1.2.0-134-gd842372

Git user git at public.curoverse.com
Fri Aug 24 05:44:53 EDT 2018


Summary of changes:
 src/store/collections/collection-create-actions.ts          |  5 ++---
 src/store/collections/collection-update-actions.ts          |  4 ++--
 .../context-menu/action-sets/collection-action-set.ts       |  4 ++--
 .../action-sets/collection-resource-action-set.ts           |  4 ++--
 .../context-menu/action-sets/root-project-action-set.ts     |  4 ++--
 .../dialog-create/dialog-collection-create.tsx              | 13 ++++++++++++-
 .../dialog-forms/create-collection-dialog.ts                |  5 +++--
 src/views/workbench/workbench.tsx                           |  5 +++--
 8 files changed, 28 insertions(+), 16 deletions(-)

       via  d842372e4f45ee06315e511529e65ae1d3f319a0 (commit)
      from  f4ed762732e8f5d2f7c4c08d5efbe92d4bce7f16 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d842372e4f45ee06315e511529e65ae1d3f319a0
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date:   Fri Aug 24 11:44:43 2018 +0200

    update collections create and update (forms and dialogs)
    
    Feature #14103
    
    Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>

diff --git a/src/store/collections/collection-create-actions.ts b/src/store/collections/collection-create-actions.ts
index 66f5ab8..2c339f2 100644
--- a/src/store/collections/collection-create-actions.ts
+++ b/src/store/collections/collection-create-actions.ts
@@ -19,9 +19,9 @@ export interface CollectionCreateFormDialogData {
     files: File[];
 }
 
-export const COLLECTION_CREATE_FORM_NAME = "collectionCreateDialog";
+export const COLLECTION_CREATE_FORM_NAME = "collectionCreateFormName";
 
-export const openCreateModal = () =>
+export const openCollectionCreateDialog = () =>
     (dispatch: Dispatch) => {
         dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_CREATE_FORM_NAME, data: {} }));
     };
@@ -44,7 +44,6 @@ export const createCollection = (collection: Partial<CollectionResource>) =>
             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) {
diff --git a/src/store/collections/collection-update-actions.ts b/src/store/collections/collection-update-actions.ts
index 4c4ad3b..27c3bfc 100644
--- a/src/store/collections/collection-update-actions.ts
+++ b/src/store/collections/collection-update-actions.ts
@@ -22,9 +22,9 @@ export interface CollectionUpdateFormDialogData {
     description: string;
 }
 
-export const COLLECTION_UPDATE_FORM_NAME = 'collectionUpdateDialog';
+export const COLLECTION_UPDATE_FORM_NAME = 'collectionUpdateFormName';
 
-export const openUpdateModal = (resource: ContextMenuResource) =>
+export const openCollectionUpdateDialog = (resource: ContextMenuResource) =>
     (dispatch: Dispatch) => {
         dispatch(initialize(COLLECTION_UPDATE_FORM_NAME, resource));
         dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_UPDATE_FORM_NAME, data: {} }));
diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts
index 65bb84b..fab4a80 100644
--- a/src/views-components/context-menu/action-sets/collection-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-action-set.ts
@@ -6,7 +6,7 @@ import { ContextMenuActionSet } from "../context-menu-action-set";
 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 { openUpdateModal } from "~/store/collections/collection-update-actions";
+import { openCollectionUpdateDialog } 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";
@@ -16,7 +16,7 @@ export const collectionActionSet: ContextMenuActionSet = [[
         icon: RenameIcon,
         name: "Edit collection",
         execute: (dispatch, resource) => {
-            dispatch<any>(openUpdateModal(resource));
+            dispatch<any>(openCollectionUpdateDialog(resource));
         }
     },
     {
diff --git a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
index ad99bb8..66838a9 100644
--- a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
@@ -6,7 +6,7 @@ import { ContextMenuActionSet } from "../context-menu-action-set";
 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 { openUpdateModal } from "~/store/collections/collection-update-actions";
+import { openCollectionUpdateDialog } 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';
@@ -16,7 +16,7 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
         icon: RenameIcon,
         name: "Edit collection",
         execute: (dispatch, resource) => {
-            dispatch<any>(openUpdateModal(resource));
+            dispatch<any>(openCollectionUpdateDialog(resource));
         }
     },
     {
diff --git a/src/views-components/context-menu/action-sets/root-project-action-set.ts b/src/views-components/context-menu/action-sets/root-project-action-set.ts
index 1adac00..a5e2065 100644
--- a/src/views-components/context-menu/action-sets/root-project-action-set.ts
+++ b/src/views-components/context-menu/action-sets/root-project-action-set.ts
@@ -7,7 +7,7 @@ import { reset } from "redux-form";
 import { ContextMenuActionSet } from "../context-menu-action-set";
 import { projectActions } from "~/store/project/project-action";
 import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
-import { COLLECTION_CREATE_FORM_NAME, openCreateModal } from '~/store/collections/collection-create-actions';
+import { COLLECTION_CREATE_FORM_NAME, openCollectionCreateDialog } from '~/store/collections/collection-create-actions';
 import { NewProjectIcon, CollectionIcon } from "~/components/icon/icon";
 
 export const rootProjectActionSet: ContextMenuActionSet =  [[
@@ -24,7 +24,7 @@ export const rootProjectActionSet: ContextMenuActionSet =  [[
         name: "New Collection",
         execute: (dispatch, resource) => {
             dispatch(reset(COLLECTION_CREATE_FORM_NAME));
-            dispatch<any>(openCreateModal());
+            dispatch<any>(openCollectionCreateDialog());
         }
     }
 ]];
diff --git a/src/views-components/dialog-create/dialog-collection-create.tsx b/src/views-components/dialog-create/dialog-collection-create.tsx
index 607835b..5d3bfd8 100644
--- a/src/views-components/dialog-create/dialog-collection-create.tsx
+++ b/src/views-components/dialog-create/dialog-collection-create.tsx
@@ -6,8 +6,19 @@ import * as React from 'react';
 import { InjectedFormProps } from 'redux-form';
 import { WithDialogProps } from '~/store/dialog/with-dialog';
 import { CollectionCreateFormDialogData } from '~/store/collections/collection-create-actions';
+import { collectionUploaderActions, UploadFile } from "~/store/collections/uploader/collection-uploader-actions";
 import { FormDialog } from '~/components/form-dialog/form-dialog';
 import { CollectionNameField, CollectionDescriptionField } from '~/views-components/collection-form-fields/collection-form-fields';
+import { FileUpload } from '~/components/file-upload/file-upload';
+
+// interface DialogCollectionDataProps {
+//     open: boolean;
+//     handleSubmit: any;
+//     submitting: boolean;
+//     invalid: boolean;
+//     pristine: boolean;
+//     files: UploadFile[];
+// }
 
 type DialogCollectionProps = WithDialogProps<{}> & InjectedFormProps<CollectionCreateFormDialogData>;
 
@@ -23,7 +34,7 @@ const CollectionAddFields = () => <span>
     <CollectionNameField />
     <CollectionDescriptionField />
     {/* <FileUpload
-        files={files}
+        files={this.props.files}
         disabled={busy}
         onDrop={files => this.props.dispatch(collectionUploaderActions.SET_UPLOAD_FILES(files))} /> */}
 </span>;
\ No newline at end of file
diff --git a/src/views-components/dialog-forms/create-collection-dialog.ts b/src/views-components/dialog-forms/create-collection-dialog.ts
index 30c999c..d2699d8 100644
--- a/src/views-components/dialog-forms/create-collection-dialog.ts
+++ b/src/views-components/dialog-forms/create-collection-dialog.ts
@@ -14,8 +14,9 @@ export const CreateCollectionDialog = compose(
     reduxForm<CollectionCreateFormDialogData>({
         form: COLLECTION_CREATE_FORM_NAME,
         onSubmit: (data, dispatch) => {
-            console.log('onSubmit: ', data);
             dispatch(addCollection(data));
         }
     })
-)(DialogCollectionCreate);
\ No newline at end of file
+)(DialogCollectionCreate);
+
+// onSubmit: (data: { name: string, description: string }, files: UploadFile[]) => void;
\ No newline at end of file
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 38de88b..85c9b66 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -37,10 +37,11 @@ import { favoritePanelActions } from '~/store/favorite-panel/favorite-panel-acti
 import { CollectionPanel } from '../collection-panel/collection-panel';
 import { loadCollection, loadCollectionTags } from '~/store/collection-panel/collection-panel-action';
 import { getCollectionUrl } from '~/models/collection';
-import { COLLECTION_CREATE_FORM_NAME, openCreateModal } from '~/store/collections/collection-create-actions';
+import { COLLECTION_CREATE_FORM_NAME, openCollectionCreateDialog } 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 { ProjectPanel } from "~/views/project-panel/project-panel";
 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';
@@ -385,7 +386,7 @@ export const Workbench = withStyles(styles)(
 
             handleCollectionCreationDialogOpen = (itemUuid: string) => {
                 this.props.dispatch(reset(COLLECTION_CREATE_FORM_NAME));
-                this.props.dispatch<any>(openCreateModal());
+                this.props.dispatch<any>(openCollectionCreateDialog());
             }
 
             openContextMenu = (event: React.MouseEvent<HTMLElement>, resource: { name: string; uuid: string; description?: string; kind: ContextMenuKind; }) => {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list