Authenticate UI
This commit is contained in:
@@ -5,13 +5,16 @@ import {
|
||||
TextInput,
|
||||
PasswordInput,
|
||||
required,
|
||||
email,
|
||||
SimpleForm
|
||||
} from 'react-admin'
|
||||
|
||||
const UserCreate = (props) => (
|
||||
<Create {...props}>
|
||||
<SimpleForm redirect="list">
|
||||
<TextInput source="userName" validate={[required()]} />
|
||||
<TextInput source="name" validate={[required()]} />
|
||||
<TextInput source="email" validate={[required(), email()]} />
|
||||
<PasswordInput source="password" validate={[required()]} />
|
||||
<BooleanInput source="isAdmin" initialValue={false} />
|
||||
</SimpleForm>
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
PasswordInput,
|
||||
Edit,
|
||||
required,
|
||||
email,
|
||||
SimpleForm
|
||||
} from 'react-admin'
|
||||
|
||||
@@ -15,7 +16,9 @@ const UserTitle = ({ record }) => {
|
||||
const UserEdit = (props) => (
|
||||
<Edit title={<UserTitle />} {...props}>
|
||||
<SimpleForm>
|
||||
<TextInput source="userName" validate={[required()]} />
|
||||
<TextInput source="name" validate={[required()]} />
|
||||
<TextInput source="email" validate={[required(), email()]} />
|
||||
<PasswordInput source="password" validate={[required()]} />
|
||||
<BooleanInput source="isAdmin" initialValue={false} />
|
||||
<DateField source="lastLoginAt" />
|
||||
|
||||
@@ -23,7 +23,7 @@ const UserList = (props) => {
|
||||
return (
|
||||
<List
|
||||
{...props}
|
||||
sort={{ field: 'name', order: 'ASC' }}
|
||||
sort={{ field: 'userName', order: 'ASC' }}
|
||||
exporter={false}
|
||||
filters={<UserFilter />}
|
||||
>
|
||||
@@ -34,9 +34,8 @@ const UserList = (props) => {
|
||||
/>
|
||||
) : (
|
||||
<Datagrid rowClick="edit">
|
||||
<TextField source="name" />
|
||||
<TextField source="userName" />
|
||||
<BooleanField source="isAdmin" />
|
||||
<DateField source="lastLoginAt" locales="pt-BR" />
|
||||
<DateField source="lastAccessAt" locales="pt-BR" />
|
||||
<DateField source="updatedAt" locales="pt-BR" />
|
||||
</Datagrid>
|
||||
|
||||
Reference in New Issue
Block a user