[ARVADOS-WORKBENCH2] updated: 1.2.0-123-g1381078

Git user git at public.curoverse.com
Wed Aug 22 07:27:48 EDT 2018


Summary of changes:
 .../project-tree-picker/project-tree-picker.tsx    | 22 ----------------------
 .../move-to-dialog/move-to-dialog.tsx              |  4 ++--
 .../project-copy-dialog/project-copy-dialog.tsx    |  4 ++--
 .../project-copy-project-dialog.tsx                |  2 +-
 .../project-tree-picker/project-tree-picker.tsx    | 14 ++++++++++++++
 5 files changed, 19 insertions(+), 27 deletions(-)
 delete mode 100644 src/components/project-tree-picker/project-tree-picker.tsx

       via  13810782091128f6cf5b346243be77f5c1776d2c (commit)
      from  fe297524c4e7f0e7e43a5b946ec492edf12e2f67 (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 13810782091128f6cf5b346243be77f5c1776d2c
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Wed Aug 22 13:27:33 2018 +0200

    cr changes
    
    Feature #13988
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/components/project-tree-picker/project-tree-picker.tsx b/src/components/project-tree-picker/project-tree-picker.tsx
deleted file mode 100644
index ce30dcd..0000000
--- a/src/components/project-tree-picker/project-tree-picker.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import * as React from "react";
-import { ProjectTreePicker as ProjectPicker } from "~/views-components/project-tree-picker/project-tree-picker";
-import { WrappedFieldProps } from "redux-form";
-import { Typography } from '@material-ui/core';
-
-export const ProjectTreePicker = (props: WrappedFieldProps) =>
-    <div style={{ height: '200px', display: 'flex', flexDirection: 'column' }}>
-        <ProjectPicker onChange={handleChange(props)} />
-        {props.meta.dirty && props.meta.error &&
-            <Typography variant='caption' color='error'>
-                {props.meta.error}
-            </Typography>}
-    </div>;
-
-const handleChange = (props: WrappedFieldProps) => (value: string) =>
-    props.input.value === value
-        ? props.input.onChange('')
-        : props.input.onChange(value);
\ No newline at end of file
diff --git a/src/views-components/move-to-dialog/move-to-dialog.tsx b/src/views-components/move-to-dialog/move-to-dialog.tsx
index 456f3bb..d8f89d3 100644
--- a/src/views-components/move-to-dialog/move-to-dialog.tsx
+++ b/src/views-components/move-to-dialog/move-to-dialog.tsx
@@ -6,7 +6,7 @@ import * as React from "react";
 import { InjectedFormProps, Field } from 'redux-form';
 import { WithDialogProps } from '~/store/dialog/with-dialog';
 import { FormDialog } from '~/components/form-dialog/form-dialog';
-import { ProjectTreePicker } from '~/components/project-tree-picker/project-tree-picker';
+import { ProjectTreePickerField } from '~/views-components/project-tree-picker/project-tree-picker';
 import { MOVE_TO_VALIDATION } from '~/validators/validators';
 import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
 
@@ -21,6 +21,6 @@ export const MoveToFormDialog = (props: WithDialogProps<string> & InjectedFormPr
 const MoveToDialogFields = () =>
     <Field
         name="ownerUuid"
-        component={ProjectTreePicker}
+        component={ProjectTreePickerField}
         validate={MOVE_TO_VALIDATION} />;
 
diff --git a/src/views-components/project-copy-dialog/project-copy-dialog.tsx b/src/views-components/project-copy-dialog/project-copy-dialog.tsx
index dbd1733..7f37a51 100644
--- a/src/views-components/project-copy-dialog/project-copy-dialog.tsx
+++ b/src/views-components/project-copy-dialog/project-copy-dialog.tsx
@@ -6,7 +6,7 @@ import * as React from "react";
 import { InjectedFormProps, Field } from 'redux-form';
 import { WithDialogProps } from '~/store/dialog/with-dialog';
 import { FormDialog } from '~/components/form-dialog/form-dialog';
-import { ProjectTreePicker } from '~/components/project-tree-picker/project-tree-picker';
+import { ProjectTreePickerField } from '~/views-components/project-tree-picker/project-tree-picker';
 import { COPY_NAME_VALIDATION, MAKE_A_COPY_VALIDATION } from '~/validators/validators';
 import { TextField } from "~/components/text-field/text-field";
 import { ProjectCopyFormDialogData } from "~/store/project-copy-dialog/project-copy-dialog";
@@ -34,5 +34,5 @@ const ProjectCopyNameField = () =>
 const ProjectCopyDialogFields = () =>
     <Field
         name="projectUuid"
-        component={ProjectTreePicker}
+        component={ProjectTreePickerField}
         validate={MAKE_A_COPY_VALIDATION} />;
diff --git a/src/views-components/project-copy-project-dialog/project-copy-project-dialog.tsx b/src/views-components/project-copy-project-dialog/project-copy-project-dialog.tsx
index 12fbab1..3478d9f 100644
--- a/src/views-components/project-copy-project-dialog/project-copy-project-dialog.tsx
+++ b/src/views-components/project-copy-project-dialog/project-copy-project-dialog.tsx
@@ -4,7 +4,7 @@
 
 import { compose } from "redux";
 import { withDialog } from "~/store/dialog/with-dialog";
-import { reduxForm, startSubmit, stopSubmit } from 'redux-form';
+import { reduxForm } from 'redux-form';
 import { PROJECT_COPY_DIALOG } from '~/store/project-copy-project-dialog/project-copy-project-dialog';
 import { ProjectCopyFormDialog } from "~/views-components/project-copy-dialog/project-copy-dialog";
 import { copyProject } from '../../store/project-copy-project-dialog/project-copy-project-dialog';
diff --git a/src/views-components/project-tree-picker/project-tree-picker.tsx b/src/views-components/project-tree-picker/project-tree-picker.tsx
index cc27806..92c5451 100644
--- a/src/views-components/project-tree-picker/project-tree-picker.tsx
+++ b/src/views-components/project-tree-picker/project-tree-picker.tsx
@@ -16,6 +16,7 @@ import { createTreePickerNode } from "~/store/tree-picker/tree-picker";
 import { RootState } from "~/store/store";
 import { ServiceRepository } from "~/services/services";
 import { FilterBuilder } from "~/common/api/filter-builder";
+import { WrappedFieldProps } from 'redux-form';
 
 type ProjectTreePickerProps = Pick<TreePickerProps, 'toggleItemActive' | 'toggleItemOpen'>;
 
@@ -141,4 +142,17 @@ export const receiveTreePickerData = (nodeId: string, projects: ProjectResource[
         dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ nodeId, pickerId }));
     };
 
+export const ProjectTreePickerField = (props: WrappedFieldProps) =>
+    <div style={{ height: '200px', display: 'flex', flexDirection: 'column' }}>
+        <ProjectTreePicker onChange={handleChange(props)} />
+        {props.meta.dirty && props.meta.error &&
+            <Typography variant='caption' color='error'>
+                {props.meta.error}
+            </Typography>}
+    </div>;
+
+const handleChange = (props: WrappedFieldProps) => (value: string) =>
+    props.input.value === value
+        ? props.input.onChange('')
+        : props.input.onChange(value);
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list