Fix build errors
This commit is contained in:
parent
785d0965e3
commit
d0f1c1337c
28 changed files with 268 additions and 112 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
import { useSession } from "next-auth/react";
|
||||
import { UserRoleInput } from "./shared";
|
||||
|
||||
const UserCreate: FC<CreateProps> = (props) => {
|
||||
const UserCreate: FC<CreateProps> = (props: any) => {
|
||||
const { data: session } = useSession();
|
||||
return (
|
||||
<Create {...props} title="Create Users">
|
||||
|
|
@ -18,7 +18,7 @@ const UserCreate: FC<CreateProps> = (props) => {
|
|||
<TextInput source="name" />
|
||||
<UserRoleInput session={session} initialValue="NONE" />
|
||||
<BooleanInput source="isActive" defaultValue={true} />
|
||||
<TextInput source="createdBy" defaultValue={session.user.name} />
|
||||
<TextInput source="createdBy" defaultValue={session?.user?.name} />
|
||||
</SimpleForm>
|
||||
</Create>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const useStyles = makeStyles((_theme) => ({
|
|||
},
|
||||
}));
|
||||
|
||||
const UserEditToolbar = (props) => {
|
||||
const UserEditToolbar = (props: any) => {
|
||||
const classes = useStyles(props);
|
||||
const redirect = useRedirect();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { SelectInput } from "react-admin";
|
||||
|
||||
export const UserRoleInput = (props) => (
|
||||
export const UserRoleInput = (props: any) => (
|
||||
<SelectInput
|
||||
source="userRole"
|
||||
choices={[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue