From 5b79ef7e7b6388aad168f0a628b38031ea0b0b69 Mon Sep 17 00:00:00 2001 From: Viliam Geffert <60324080+vgeffer@users.noreply.github.com> Date: Sun, 15 Dec 2024 12:18:03 +0100 Subject: [PATCH] Unified fields across page (#543) * Unified fields across page * Remove unneceseary code --- .../competition/problems/ProblemCreate.tsx | 13 +++++++++++-- .../resources/competition/problems/ProblemEdit.tsx | 13 +++++++++++-- .../resources/competition/series/SeriesCreate.tsx | 7 +++---- .../resources/competition/series/SeriesEdit.tsx | 7 +++---- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/components/Admin/resources/competition/problems/ProblemCreate.tsx b/src/components/Admin/resources/competition/problems/ProblemCreate.tsx index 34079f67..f53e54bd 100644 --- a/src/components/Admin/resources/competition/problems/ProblemCreate.tsx +++ b/src/components/Admin/resources/competition/problems/ProblemCreate.tsx @@ -1,5 +1,14 @@ import {FC} from 'react' -import {FileInput, FormTab, ImageInput, ReferenceInput, required, SelectInput, TabbedForm, TextInput} from 'react-admin' +import { + AutocompleteInput, + FileInput, + FormTab, + ImageInput, + ReferenceInput, + required, + TabbedForm, + TextInput, +} from 'react-admin' import {LatexPreview} from '@/components/Admin/custom/LatexPreview' import {MyCreate} from '@/components/Admin/custom/MyCreate' @@ -19,7 +28,7 @@ export const ProblemCreate: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/problems/ProblemEdit.tsx b/src/components/Admin/resources/competition/problems/ProblemEdit.tsx index ca9d2e9c..51f69cbe 100644 --- a/src/components/Admin/resources/competition/problems/ProblemEdit.tsx +++ b/src/components/Admin/resources/competition/problems/ProblemEdit.tsx @@ -1,5 +1,14 @@ import {FC} from 'react' -import {FileInput, FormTab, ImageInput, ReferenceInput, required, SelectInput, TabbedForm, TextInput} from 'react-admin' +import { + AutocompleteInput, + FileInput, + FormTab, + ImageInput, + ReferenceInput, + required, + TabbedForm, + TextInput, +} from 'react-admin' import {LatexPreview} from '@/components/Admin/custom/LatexPreview' import {MyEdit} from '@/components/Admin/custom/MyEdit' @@ -19,7 +28,7 @@ export const ProblemEdit: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/series/SeriesCreate.tsx b/src/components/Admin/resources/competition/series/SeriesCreate.tsx index 5b3ca9e0..000cde3a 100644 --- a/src/components/Admin/resources/competition/series/SeriesCreate.tsx +++ b/src/components/Admin/resources/competition/series/SeriesCreate.tsx @@ -1,5 +1,5 @@ import {FC} from 'react' -import {BooleanInput, FormTab, ReferenceInput, required, SelectInput, TabbedForm, TextInput} from 'react-admin' +import {AutocompleteInput, FormTab, NumberInput, ReferenceInput, required, TabbedForm} from 'react-admin' import {MyCreate} from '@/components/Admin/custom/MyCreate' import {MyDateTimeInput} from '@/components/Admin/custom/MyDateTimeInput' @@ -9,11 +9,10 @@ export const SeriesCreate: FC = () => ( - + - - + diff --git a/src/components/Admin/resources/competition/series/SeriesEdit.tsx b/src/components/Admin/resources/competition/series/SeriesEdit.tsx index e49759eb..0e64586c 100644 --- a/src/components/Admin/resources/competition/series/SeriesEdit.tsx +++ b/src/components/Admin/resources/competition/series/SeriesEdit.tsx @@ -1,5 +1,5 @@ import {FC} from 'react' -import {BooleanInput, FormTab, ReferenceInput, required, SelectInput, TabbedForm, TextInput} from 'react-admin' +import {AutocompleteInput, FormTab, NumberInput, ReferenceInput, required, TabbedForm} from 'react-admin' import {MyDateTimeInput} from '@/components/Admin/custom/MyDateTimeInput' import {MyEdit} from '@/components/Admin/custom/MyEdit' @@ -16,11 +16,10 @@ export const SeriesEdit: FC = () => ( - + - - +