// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import React from 'react'; import { Grid, StyleRulesCallback, Divider, IconButton, Typography } from '@material-ui/core'; import { Field, WrappedFieldProps, WrappedFieldArrayProps, FieldArray, FieldArrayFieldsProps } from 'redux-form'; import { PermissionSelect, formatPermissionLevel, parsePermissionLevel } from './permission-select'; import { WithStyles } from '@material-ui/core/styles'; import withStyles from '@material-ui/core/styles/withStyles'; import { CloseIcon } from 'components/icon/icon'; export default () => ; const SharingManagementFieldArray = ({ fields }: WrappedFieldArrayProps<{ email: string }>) =>
{ fields.length > 0 ? fields.map((field, index, fields) => ) : No permissions set }
; const permissionManagementRowStyles: StyleRulesCallback<'root'> = theme => ({ root: { padding: `${theme.spacing.unit}px 0`, } }); const PermissionManagementRow = withStyles(permissionManagementRowStyles)( ({ field, index, fields, classes }: { field: string, index: number, fields: FieldArrayFieldsProps<{ email: string }> } & WithStyles<'root'>) => <> {fields.get(index).email} fields.remove(index)}> ); const PermissionSelectComponent = ({ input }: WrappedFieldProps) => ;