X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b7a4d46fe2b011cdb6e38ed42e9f886fee8290b8..0bc3340cdc59ede7a02552bcc9f22890f0ef4f91:/src/views/my-account-panel/my-account-panel-root.tsx diff --git a/src/views/my-account-panel/my-account-panel-root.tsx b/src/views/my-account-panel/my-account-panel-root.tsx index 45875770..819a16a4 100644 --- a/src/views/my-account-panel/my-account-panel-root.tsx +++ b/src/views/my-account-panel/my-account-panel-root.tsx @@ -5,11 +5,23 @@ import * as React from 'react'; import { Field, InjectedFormProps } from "redux-form"; import { TextField } from "~/components/text-field/text-field"; -import { StyleRulesCallback, WithStyles, withStyles, Card, CardContent, Button, Typography, Grid, Table, TableHead, TableRow, TableCell, TableBody, Tooltip, IconButton } from '@material-ui/core'; +import { NativeSelectField } from "~/components/select-field/select-field"; +import { + StyleRulesCallback, + WithStyles, + withStyles, + Card, + CardContent, + Button, + Typography, + Grid, + InputLabel +} from '@material-ui/core'; import { ArvadosTheme } from '~/common/custom-theme'; import { User } from "~/models/user"; +import { MY_ACCOUNT_VALIDATION} from "~/validators/validators"; -type CssRules = 'root' | 'gridItem' | 'title'; +type CssRules = 'root' | 'gridItem' | 'label' | 'title' | 'actions'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { @@ -20,104 +32,130 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ height: 45, marginBottom: 20 }, + label: { + fontSize: '0.675rem' + }, title: { marginBottom: theme.spacing.unit * 3, color: theme.palette.grey["600"] + }, + actions: { + display: 'flex', + justifyContent: 'flex-end' } }); export interface MyAccountPanelRootActionProps {} export interface MyAccountPanelRootDataProps { - user?: User; + isPristine: boolean; + isValid: boolean; + initialValues?: User; } -export const MY_ACCOUNT_FORM = 'myAccountForm'; +const RoleTypes = [ + {key: 'Bio-informatician', value: 'Bio-informatician'}, + {key: 'Data Scientist', value: 'Data Scientist'}, + {key: 'Analyst', value: 'Analyst'}, + {key: 'Researcher', value: 'Researcher'}, + {key: 'Software Developer', value: 'Software Developer'}, + {key: 'System Administrator', value: 'System Administrator'}, + {key: 'Other', value: 'Other'} +]; type MyAccountPanelRootProps = InjectedFormProps & MyAccountPanelRootDataProps & WithStyles; export const MyAccountPanelRoot = withStyles(styles)( - ({ classes, user }: MyAccountPanelRootProps) => { - console.log(user); + ({ classes, isValid, handleSubmit, reset, isPristine, invalid, submitting }: MyAccountPanelRootProps) => { return - User profile - - - - - - - - - - + User profile +
+ + + + + + + + + + + + + + + + + + + Role + + - - - - - - - - - - - - - - + + + + + + + + + - - - + + + - +
;} ); \ No newline at end of file