diff --git a/src/components/Admin/Admin.tsx b/src/components/Admin/Admin.tsx index 5d7f77d3..76d8b64e 100644 --- a/src/components/Admin/Admin.tsx +++ b/src/components/Admin/Admin.tsx @@ -2,6 +2,10 @@ import {FC} from 'react' import {Admin as ReactAdmin, Resource} from 'react-admin' import {dataProvider} from './dataProvider' +import {FlatpageCreate} from './resources/base/flat-page/FlatpageCreate' +import {FlatpageEdit} from './resources/base/flat-page/FlatpageEdit' +import {FlatpageList} from './resources/base/flat-page/FlatpageList' +import {FlatpageShow} from './resources/base/flat-page/FlatpageShow' import {PostCreate} from './resources/cms/post/PostCreate' import {PostEdit} from './resources/cms/post/PostEdit' import {PostList} from './resources/cms/post/PostList' @@ -34,6 +38,13 @@ export const Admin: FC = () => { show={CompetitionShow} create={CompetitionCreate} /> + ) } diff --git a/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx b/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx new file mode 100644 index 00000000..781ba469 --- /dev/null +++ b/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx @@ -0,0 +1,17 @@ +import {FC} from 'react' +import {NumberInput, required, SimpleForm, TextInput} from 'react-admin' + +import {MyCreate} from '@/components/Admin/custom/MyCreate' +import {SitesCheckboxInput} from '@/components/Admin/custom/SitesCheckboxInput' + +export const FlatpageCreate: FC = () => ( + + + + + + + + + +) diff --git a/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx b/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx new file mode 100644 index 00000000..01071f6a --- /dev/null +++ b/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx @@ -0,0 +1,17 @@ +import {FC} from 'react' +import {NumberInput, required, SimpleForm, TextInput} from 'react-admin' + +import {MyEdit} from '@/components/Admin/custom/MyEdit' +import {SitesCheckboxInput} from '@/components/Admin/custom/SitesCheckboxInput' + +export const FlatpageEdit: FC = () => ( + + + + + + + + + +) diff --git a/src/components/Admin/resources/base/flat-page/FlatpageList.tsx b/src/components/Admin/resources/base/flat-page/FlatpageList.tsx new file mode 100644 index 00000000..bc27333d --- /dev/null +++ b/src/components/Admin/resources/base/flat-page/FlatpageList.tsx @@ -0,0 +1,19 @@ +import {FC} from 'react' +import {BooleanField, Datagrid, List, NumberField, TextField} from 'react-admin' + +import {SitesArrayField} from '@/components/Admin/custom/SitesArrayField' +import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField' + +export const FlatpageList: FC = () => ( + + + + + + + + + + + +) diff --git a/src/components/Admin/resources/base/flat-page/FlatpageShow.tsx b/src/components/Admin/resources/base/flat-page/FlatpageShow.tsx new file mode 100644 index 00000000..c77e1bc9 --- /dev/null +++ b/src/components/Admin/resources/base/flat-page/FlatpageShow.tsx @@ -0,0 +1,20 @@ +import {FC} from 'react' +import {BooleanField, NumberField, Show, SimpleShowLayout, TextField} from 'react-admin' + +import {MyShowActions} from '@/components/Admin/custom/MyShowActions' +import {SitesArrayField} from '@/components/Admin/custom/SitesArrayField' +import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField' + +export const FlatpageShow: FC = () => ( + }> + + + + + + + + + + +)