// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import React from 'react'; import { Field, InjectedFormProps, WrappedFieldProps } from "redux-form"; import { TextField } from "components/text-field/text-field"; 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' | 'label' | 'title' | 'actions'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { width: '100%', overflow: 'auto' }, gridItem: { 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 { isPristine: boolean; isValid: boolean; initialValues?: User; localCluster: string; } 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; type LocalClusterProp = { localCluster: string }; const renderField: React.ComponentType = ({ input, localCluster }) => ( {localCluster === input.value.substring(0, 5) ? "" : "federated"} user {input.value} ); export const MyAccountPanelRoot = withStyles(styles)( ({ classes, isValid, handleSubmit, reset, isPristine, invalid, submitting, localCluster }: MyAccountPanelRootProps) => { return Logged in as
Role
; } );