From 29691e9f6a8485382f1f9d13893e3c9ada7d5fdd Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Thu, 30 Nov 2023 02:14:24 +0300 Subject: [PATCH] Rework editor forms --- .../src/components/Common/SubmitButton.tsx | 3 +- .../components/Help/ConstituentaTooltip.tsx | 2 +- .../src/components/Help/HelpConstituenta.tsx | 2 +- .../src/components/Help/HelpRSFormItems.tsx | 2 +- .../src/components/Help/HelpTermGraph.tsx | 4 +- .../{Help => Shared}/InfoConstituenta.tsx | 0 .../{Help => Shared}/InfoCstClass.tsx | 0 .../{Help => Shared}/InfoCstStatus.tsx | 0 .../src/components/Shared/InfoLibraryItem.tsx | 38 +++ .../frontend/src/context/RSFormContext.tsx | 16 +- .../DlgConstituentaTemplate.tsx | 5 +- .../DlgConstituentaTemplate/TemplateTab.tsx | 8 +- rsconcept/frontend/src/index.css | 14 + rsconcept/frontend/src/models/library.ts | 8 + rsconcept/frontend/src/models/rsform.ts | 6 +- .../ConstituentaToolbar.tsx | 76 +++++ .../EditorConstituenta/EditorConstituenta.tsx | 267 ++++-------------- .../EditorConstituenta/FormConstituenta.tsx | 190 +++++++++++++ .../RSFormPage/EditorRSForm/EditorRSForm.tsx | 204 +++---------- .../RSFormPage/EditorRSForm/FormRSForm.tsx | 131 +++++++++ .../RSFormPage/EditorRSForm/RSFormToolbar.tsx | 68 +++++ .../RSFormPage/EditorRSList/EditorRSList.tsx | 6 +- .../RSFormPage/EditorRSList/RSListToolbar.tsx | 4 +- .../EditorTermGraph/EditorTermGraph.tsx | 17 +- .../EditorTermGraph/GraphSidebar.tsx | 20 +- .../EditorTermGraph/GraphToolbar.tsx | 80 +++--- .../EditorTermGraph/SelectedCounter.tsx | 18 ++ .../frontend/src/pages/RSFormPage/RSTabs.tsx | 12 +- .../src/pages/RSFormPage/RSTabsMenu.tsx | 2 +- rsconcept/frontend/src/utils/constants.ts | 4 +- 30 files changed, 724 insertions(+), 483 deletions(-) rename rsconcept/frontend/src/components/{Help => Shared}/InfoConstituenta.tsx (100%) rename rsconcept/frontend/src/components/{Help => Shared}/InfoCstClass.tsx (100%) rename rsconcept/frontend/src/components/{Help => Shared}/InfoCstStatus.tsx (100%) create mode 100644 rsconcept/frontend/src/components/Shared/InfoLibraryItem.tsx create mode 100644 rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ConstituentaToolbar.tsx create mode 100644 rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx create mode 100644 rsconcept/frontend/src/pages/RSFormPage/EditorRSForm/FormRSForm.tsx create mode 100644 rsconcept/frontend/src/pages/RSFormPage/EditorRSForm/RSFormToolbar.tsx create mode 100644 rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/SelectedCounter.tsx diff --git a/rsconcept/frontend/src/components/Common/SubmitButton.tsx b/rsconcept/frontend/src/components/Common/SubmitButton.tsx index 5b8f52c3..7c9deb32 100644 --- a/rsconcept/frontend/src/components/Common/SubmitButton.tsx +++ b/rsconcept/frontend/src/components/Common/SubmitButton.tsx @@ -9,13 +9,14 @@ extends Omit, 'className' | 'child function SubmitButton({ text = 'ОК', icon, disabled, tooltip, loading, - dimensions = 'w-fit h-fit' + dimensions = 'w-fit h-fit', ...restProps }: SubmitButtonProps) { return (