X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b1a6da4a288560a87e0e38ad2fd73fb227e3fc66..da1b362fc33261ace42851f6900df7b96fde819e:/src/views-components/dialog-create/dialog-user-create.tsx

diff --git a/src/views-components/dialog-create/dialog-user-create.tsx b/src/views-components/dialog-create/dialog-user-create.tsx
index 06db5873..6be7b28f 100644
--- a/src/views-components/dialog-create/dialog-user-create.tsx
+++ b/src/views-components/dialog-create/dialog-user-create.tsx
@@ -2,13 +2,21 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { InjectedFormProps } from 'redux-form';
-import { WithDialogProps } from '~/store/dialog/with-dialog';
-import { FormDialog } from '~/components/form-dialog/form-dialog';
-import { UserEmailField, UserVirtualMachineField, UserGroupsVirtualMachineField } from '~/views-components/form-fields/user-form-fields';
+import { WithDialogProps } from 'store/dialog/with-dialog';
+import { FormDialog } from 'components/form-dialog/form-dialog';
+import { UserEmailField, UserVirtualMachineField, UserGroupsVirtualMachineField } from 'views-components/form-fields/user-form-fields';
+import { UserCreateFormDialogData } from 'store/users/users-actions';
+import { UserResource } from 'models/user';
+import { VirtualMachinesResource } from 'models/virtual-machines';
 
-export type DialogUserProps = WithDialogProps<{}> & InjectedFormProps<any>;
+export type DialogUserProps = WithDialogProps<{}> & InjectedFormProps<UserCreateFormDialogData>;
+
+interface DataProps {
+    user: UserResource;
+    items: VirtualMachinesResource[];
+}
 
 export const UserRepositoryCreate = (props: DialogUserProps) =>
     <FormDialog
@@ -20,6 +28,6 @@ export const UserRepositoryCreate = (props: DialogUserProps) =>
 
 const UserAddFields = (props: DialogUserProps) => <span>
     <UserEmailField />
-    <UserVirtualMachineField data={props.data}/>
+    <UserVirtualMachineField data={props.data as DataProps}/>
     <UserGroupsVirtualMachineField />
 </span>;
