Merge branch '14941-public-favorites-initialize-data-explorer-and-routing'
[arvados-workbench2.git] / src / views-components / user-dialog / manage-dialog.tsx
index d70d35f3205bff3b71a4b90b1e82e0cc651422f0..05e4a3fc091b5d71943f42adaa6da3e9110f05e9 100644 (file)
@@ -10,7 +10,6 @@ import { WithStyles, withStyles } from '@material-ui/core/styles';
 import { ArvadosTheme } from '~/common/custom-theme';
 import { compose, Dispatch } from "redux";
 import { USER_MANAGEMENT_DIALOG, openSetupShellAccount, loginAs } from "~/store/users/users-actions";
-import { UserResource } from "~/models/user";
 import { connect } from "react-redux";
 
 type CssRules = 'spacing';
@@ -47,27 +46,27 @@ export const UserManageDialog = compose(
                 onClose={props.closeDialog}
                 fullWidth
                 maxWidth="md">
-                {props.data.user &&
+                {props.data &&
                     <span>
-                        <DialogTitle>{`Manage - ${props.data.user.firstName} ${props.data.user.lastName}`}</DialogTitle>
+                        <DialogTitle>{`Manage - ${props.data.firstName} ${props.data.lastName}`}</DialogTitle>
                         <DialogContent>
-                            <Typography variant="body2" className={props.classes.spacing}>
+                            <Typography variant='body1' className={props.classes.spacing}>
                                 As an admin, you can log in as this user. When you’ve finished, you will need to log out and log in again with your own account.
                     </Typography>
-                            <Button variant="contained" color="primary" onClick={() => props.loginAs(props.data.client.uuid)}>
-                                {`LOG IN AS ${props.data.user.firstName} ${props.data.user.lastName}`}
+                            <Button variant="contained" color="primary" onClick={() => props.loginAs(props.data.uuid)}>
+                                {`LOG IN AS ${props.data.firstName} ${props.data.lastName}`}
                             </Button>
-                            <Typography variant="body2" className={props.classes.spacing}>
+                            <Typography variant='body1' className={props.classes.spacing}>
                                 As an admin, you can setup a shell account for this user. The login name is automatically generated from the user's e-mail address.
                     </Typography>
                             <Button variant="contained" color="primary" onClick={() => props.openSetupShellAccount(props.data.uuid)}>
-                                {`SETUP SHELL ACCOUNT FOR ${props.data.user.firstName} ${props.data.user.lastName}`}
+                                {`SETUP SHELL ACCOUNT FOR ${props.data.firstName} ${props.data.lastName}`}
                             </Button>
                         </DialogContent></span>}
 
                 <DialogActions>
                     <Button
-                        variant='flat'
+                        variant='text'
                         color='primary'
                         onClick={props.closeDialog}>
                         Close