[ARVADOS-WORKBENCH2] updated: 1.1.4-296-gb113552

Git user git at public.curoverse.com
Tue Jul 17 05:28:34 EDT 2018


Summary of changes:
 src/utils/dialog-validator.tsx                             |  6 +++---
 .../dialog-create/dialog-project-create.tsx                | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

       via  b113552f312a87d933e17c1ffaca4fbd4707e94e (commit)
      from  af9e88a3897c6d8159782fccac325cc1c0938458 (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 b113552f312a87d933e17c1ffaca4fbd4707e94e
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Tue Jul 17 11:28:22 2018 +0200

    duplicatedName flag renamed on isUniqName
    
    Feature #13781
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/utils/dialog-validator.tsx b/src/utils/dialog-validator.tsx
index 848acec..b264f96 100644
--- a/src/utils/dialog-validator.tsx
+++ b/src/utils/dialog-validator.tsx
@@ -10,7 +10,7 @@ type ValidatorProps = {
   onChange: (isValid: boolean | string) => void;
   render: (hasError: boolean) => React.ReactElement<any>;
   isRequired: boolean;
-  duplicatedName?: string;
+  isUniqName?: boolean;
 };
 
 interface ValidatorState {
@@ -41,14 +41,14 @@ class Validator extends React.Component<ValidatorProps & WithStyles<CssRules>> {
   }
 
   render() {
-    const { classes, isRequired, value, duplicatedName } = this.props;
+    const { classes, isRequired, value, isUniqName } = this.props;
     const { isLengthValid } = this.state;
 
     return (
       <span>
         {this.props.render(!isLengthValid && (isRequired || (!isRequired && value.length > 0)))}
         {!isLengthValid ? <span className={classes.formInputError}>This field should have max 255 characters.</span> : null}
-        {duplicatedName ? <span className={classes.formInputError}>Project with this name already exists</span> : null}
+        {isUniqName ? <span className={classes.formInputError}>Project with this name already exists</span> : null}
       </span>
     );
   }
diff --git a/src/views-components/dialog-create/dialog-project-create.tsx b/src/views-components/dialog-create/dialog-project-create.tsx
index efaa02e..0388e05 100644
--- a/src/views-components/dialog-create/dialog-project-create.tsx
+++ b/src/views-components/dialog-create/dialog-project-create.tsx
@@ -25,7 +25,7 @@ interface DialogState {
   description: string;
   isNameValid: boolean;
   isDescriptionValid: boolean;
-  duplicatedName: string;
+  isUniqName: boolean;
 }
 
 class DialogProjectCreate extends React.Component<ProjectCreateProps & WithStyles<CssRules>> {
@@ -34,19 +34,19 @@ class DialogProjectCreate extends React.Component<ProjectCreateProps & WithStyle
     description: '',
     isNameValid: false,
     isDescriptionValid: true,
-    duplicatedName: ''
+    isUniqName: false
   };
 
   componentWillReceiveProps(nextProps: ProjectCreateProps) {
     const { error } = nextProps;
 
     if (this.props.error !== error) {
-      this.setState({ duplicatedName: error });
+      this.setState({ isUniqName: error });
     }
   }
 
   render() {
-    const { name, description, isNameValid, isDescriptionValid, duplicatedName } = this.state;
+    const { name, description, isNameValid, isDescriptionValid, isUniqName } = this.state;
     const { classes, open, handleClose, pending } = this.props;
 
     return (
@@ -60,7 +60,7 @@ class DialogProjectCreate extends React.Component<ProjectCreateProps & WithStyle
               value={name}
               onChange={e => this.isNameValid(e)}
               isRequired={true}
-              duplicatedName={duplicatedName}
+              isUniqName={isUniqName}
               render={hasError =>
                 <TextField
                   margin="dense"
@@ -68,7 +68,7 @@ class DialogProjectCreate extends React.Component<ProjectCreateProps & WithStyle
                   id="name"
                   onChange={e => this.handleProjectName(e)}
                   label="Project name"
-                  error={hasError || !!duplicatedName}
+                  error={hasError || isUniqName}
                   fullWidth />} />
             <Validator
               value={description}
@@ -110,7 +110,7 @@ class DialogProjectCreate extends React.Component<ProjectCreateProps & WithStyle
   handleProjectName(e: any) {
     this.setState({
       name: e.target.value,
-      duplicatedName: ''
+      isUniqName: ''
     });
   }
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list