From 3985fb64d6486241a652e1a027a41ca7282a2808 Mon Sep 17 00:00:00 2001 From: rtrembecky Date: Sat, 14 Dec 2024 16:44:11 +0100 Subject: [PATCH 1/2] fix #513 - remove ID fields/inputs on Flatpage model --- .../Admin/resources/base/flat-page/FlatpageCreate.tsx | 3 +-- src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx | 3 +-- src/components/Admin/resources/base/flat-page/FlatpageList.tsx | 3 +-- src/components/Admin/resources/base/flat-page/FlatpageShow.tsx | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx b/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx index 9d809426..774462ab 100644 --- a/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx +++ b/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx @@ -1,5 +1,5 @@ import {FC} from 'react' -import {FormTab, NumberInput, required, TabbedForm, TextInput} from 'react-admin' +import {FormTab, required, TabbedForm, TextInput} from 'react-admin' import {FlatpagePreview} from '@/components/Admin/custom/FlatpagePreview' import {MyCreate} from '@/components/Admin/custom/MyCreate' @@ -8,7 +8,6 @@ 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 index fbac4e08..6a8b7bf2 100644 --- a/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx +++ b/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx @@ -1,5 +1,5 @@ import {FC} from 'react' -import {FormTab, NumberInput, required, TabbedForm, TextInput} from 'react-admin' +import {FormTab, required, TabbedForm, TextInput} from 'react-admin' import {FlatpagePreview} from '@/components/Admin/custom/FlatpagePreview' import {MyEdit} from '@/components/Admin/custom/MyEdit' @@ -8,7 +8,6 @@ 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 index c11281fa..b5d4cc16 100644 --- a/src/components/Admin/resources/base/flat-page/FlatpageList.tsx +++ b/src/components/Admin/resources/base/flat-page/FlatpageList.tsx @@ -1,12 +1,11 @@ import {FC} from 'react' -import {Datagrid, List, NumberField, TextField} from 'react-admin' +import {Datagrid, List, TextField} from 'react-admin' 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 index 1e7679c6..21877c69 100644 --- a/src/components/Admin/resources/base/flat-page/FlatpageShow.tsx +++ b/src/components/Admin/resources/base/flat-page/FlatpageShow.tsx @@ -1,5 +1,5 @@ import {FC} from 'react' -import {NumberField, Show, SimpleShowLayout, TextField} from 'react-admin' +import {Show, SimpleShowLayout, TextField} from 'react-admin' import {MyShowActions} from '@/components/Admin/custom/MyShowActions' import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField' @@ -7,7 +7,6 @@ import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField' export const FlatpageShow: FC = () => ( }> - From 114dfb5e52c90f417d966983f27cf94a97f0d25a Mon Sep 17 00:00:00 2001 From: rtrembecky Date: Sat, 14 Dec 2024 16:45:06 +0100 Subject: [PATCH 2/2] move base/flat-page -> cms/flat-page --- src/components/Admin/Admin.tsx | 8 ++++---- .../resources/{base => cms}/flat-page/FlatpageCreate.tsx | 0 .../resources/{base => cms}/flat-page/FlatpageEdit.tsx | 0 .../resources/{base => cms}/flat-page/FlatpageList.tsx | 0 .../resources/{base => cms}/flat-page/FlatpageShow.tsx | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename src/components/Admin/resources/{base => cms}/flat-page/FlatpageCreate.tsx (100%) rename src/components/Admin/resources/{base => cms}/flat-page/FlatpageEdit.tsx (100%) rename src/components/Admin/resources/{base => cms}/flat-page/FlatpageList.tsx (100%) rename src/components/Admin/resources/{base => cms}/flat-page/FlatpageShow.tsx (100%) diff --git a/src/components/Admin/Admin.tsx b/src/components/Admin/Admin.tsx index 74fce7b3..d9ed7ac5 100644 --- a/src/components/Admin/Admin.tsx +++ b/src/components/Admin/Admin.tsx @@ -5,10 +5,10 @@ import {Admin as ReactAdmin, defaultDarkTheme, defaultLightTheme, RaThemeOptions import {AdminLayout} from './AdminLayout' import {dataProvider} from './dataProvider' import {myI18nProvider} from './i18nProvider' -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 {FlatpageCreate} from './resources/cms/flat-page/FlatpageCreate' +import {FlatpageEdit} from './resources/cms/flat-page/FlatpageEdit' +import {FlatpageList} from './resources/cms/flat-page/FlatpageList' +import {FlatpageShow} from './resources/cms/flat-page/FlatpageShow' import {PostCreate} from './resources/cms/post/PostCreate' import {PostEdit} from './resources/cms/post/PostEdit' import {PostList} from './resources/cms/post/PostList' diff --git a/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx b/src/components/Admin/resources/cms/flat-page/FlatpageCreate.tsx similarity index 100% rename from src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx rename to src/components/Admin/resources/cms/flat-page/FlatpageCreate.tsx diff --git a/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx b/src/components/Admin/resources/cms/flat-page/FlatpageEdit.tsx similarity index 100% rename from src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx rename to src/components/Admin/resources/cms/flat-page/FlatpageEdit.tsx diff --git a/src/components/Admin/resources/base/flat-page/FlatpageList.tsx b/src/components/Admin/resources/cms/flat-page/FlatpageList.tsx similarity index 100% rename from src/components/Admin/resources/base/flat-page/FlatpageList.tsx rename to src/components/Admin/resources/cms/flat-page/FlatpageList.tsx diff --git a/src/components/Admin/resources/base/flat-page/FlatpageShow.tsx b/src/components/Admin/resources/cms/flat-page/FlatpageShow.tsx similarity index 100% rename from src/components/Admin/resources/base/flat-page/FlatpageShow.tsx rename to src/components/Admin/resources/cms/flat-page/FlatpageShow.tsx