diff --git a/src/components/Admin/Admin.tsx b/src/components/Admin/Admin.tsx index d5a29fcc..2e081858 100644 --- a/src/components/Admin/Admin.tsx +++ b/src/components/Admin/Admin.tsx @@ -41,6 +41,10 @@ import {SolutionShow} from './resources/competition/solution/SolutionShow' import {ProfileCreate} from './resources/personal/profiles/ProfileCreate' import {ProfileList} from './resources/personal/profiles/ProfileList' import {ProfileShow} from './resources/personal/profiles/ProfileShow' +import {SchoolCreate} from './resources/personal/schools/SchoolCreate' +import {SchoolEdit} from './resources/personal/schools/SchoolEdit' +import {SchoolList} from './resources/personal/schools/SchoolList' +import {SchoolShow} from './resources/personal/schools/SchoolShow' import {useAuthProvider} from './useAuthProvider' export const Admin: FC = () => { @@ -112,7 +116,14 @@ export const Admin: FC = () => { show={EventRegistrationShow} create={EventRegistrationCreate} /> - + { create={ProfileCreate} /> + { + return `${record.name} ${record.abbreviation ? `(${record.abbreviation})` : ''}` + }} + /> ) } diff --git a/src/components/Admin/resources/personal/schools/SchoolCreate.tsx b/src/components/Admin/resources/personal/schools/SchoolCreate.tsx new file mode 100644 index 00000000..0745bfb3 --- /dev/null +++ b/src/components/Admin/resources/personal/schools/SchoolCreate.tsx @@ -0,0 +1,35 @@ +import {FC} from 'react' +import {AutocompleteInput, email, ReferenceInput, required, SimpleForm, TextInput} from 'react-admin' + +import {MyCreate} from '@/components/Admin/custom/MyCreate' + +export const SchoolCreate: FC = () => ( + + + + + + + + + + + + + +) diff --git a/src/components/Admin/resources/personal/schools/SchoolEdit.tsx b/src/components/Admin/resources/personal/schools/SchoolEdit.tsx new file mode 100644 index 00000000..7e621ea6 --- /dev/null +++ b/src/components/Admin/resources/personal/schools/SchoolEdit.tsx @@ -0,0 +1,35 @@ +import {FC} from 'react' +import {AutocompleteInput, email, ReferenceInput, required, SimpleForm, TextInput} from 'react-admin' + +import {MyEdit} from '@/components/Admin/custom/MyEdit' + +export const SchoolEdit: FC = () => ( + + + + + + + + + + + + + +) diff --git a/src/components/Admin/resources/personal/schools/SchoolList.tsx b/src/components/Admin/resources/personal/schools/SchoolList.tsx new file mode 100644 index 00000000..30c3119a --- /dev/null +++ b/src/components/Admin/resources/personal/schools/SchoolList.tsx @@ -0,0 +1,15 @@ +import {FC} from 'react' +import {Datagrid, List, TextField} from 'react-admin' + +import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField' + +export const SchoolList: FC = () => ( + + + + + + + + +) diff --git a/src/components/Admin/resources/personal/schools/SchoolShow.tsx b/src/components/Admin/resources/personal/schools/SchoolShow.tsx new file mode 100644 index 00000000..cbf7113a --- /dev/null +++ b/src/components/Admin/resources/personal/schools/SchoolShow.tsx @@ -0,0 +1,17 @@ +import {FC} from 'react' +import {EmailField, ReferenceField, SimpleShowLayout, TextField} from 'react-admin' + +import {MyShow} from '@/components/Admin/custom/MyShow' + +export const SchoolShow: FC = () => ( + + + + + + + + + + +)