1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { InjectedFormProps } from 'redux-form';
7 import { WithDialogProps } from 'store/dialog/with-dialog';
8 import { FormDialog } from 'components/form-dialog/form-dialog';
9 import { UserEmailField, UserVirtualMachineField, UserGroupsVirtualMachineField } from 'views-components/form-fields/user-form-fields';
10 import { UserCreateFormDialogData } from 'store/users/users-actions';
11 import { UserResource } from 'models/user';
12 import { VirtualMachinesResource } from 'models/virtual-machines';
14 export type DialogUserProps = WithDialogProps<{}> & InjectedFormProps<UserCreateFormDialogData>;
18 items: VirtualMachinesResource[];
21 export const UserRepositoryCreate = (props: DialogUserProps) =>
23 dialogTitle='New user'
24 formFields={UserAddFields}
25 submitLabel='ADD NEW USER'
29 const UserAddFields = (props: DialogUserProps) => <span>
31 <UserVirtualMachineField data={props.data as DataProps}/>
32 <UserGroupsVirtualMachineField />