From 52b4953fc79fdeb10bdfada707231ccb4282951e Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:11:17 +0300 Subject: [PATCH] Update constituenta creation --- .../ConstituentaTab.tsx | 76 ----------- .../DlgConstituentaTemplate.tsx | 19 +-- .../frontend/src/dialogs/DlgCreateCst.tsx | 113 ---------------- .../src/dialogs/DlgCreateCst/DlgCreateCst.tsx | 57 ++++++++ .../dialogs/DlgCreateCst/FormCreateCst.tsx | 123 ++++++++++++++++++ .../src/dialogs/DlgCreateCst/index.tsx | 1 + .../frontend/src/pages/CreateRSFormPage.tsx | 2 +- .../EditorConstituenta/EditorConstituenta.tsx | 2 +- .../EditorConstituenta/FormConstituenta.tsx | 77 +++++------ .../RSFormPage/EditorRSForm/FormRSForm.tsx | 2 +- 10 files changed, 233 insertions(+), 239 deletions(-) delete mode 100644 rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ConstituentaTab.tsx delete mode 100644 rsconcept/frontend/src/dialogs/DlgCreateCst.tsx create mode 100644 rsconcept/frontend/src/dialogs/DlgCreateCst/DlgCreateCst.tsx create mode 100644 rsconcept/frontend/src/dialogs/DlgCreateCst/FormCreateCst.tsx create mode 100644 rsconcept/frontend/src/dialogs/DlgCreateCst/index.tsx diff --git a/rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ConstituentaTab.tsx b/rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ConstituentaTab.tsx deleted file mode 100644 index 43a5ed0f..00000000 --- a/rsconcept/frontend/src/dialogs/DlgConstituentaTemplate/ConstituentaTab.tsx +++ /dev/null @@ -1,76 +0,0 @@ -'use client'; - -import RSInput from '@/components/RSInput'; -import SelectSingle from '@/components/ui/SelectSingle'; -import TextArea from '@/components/ui/TextArea'; -import TextInput from '@/components/ui/TextInput'; -import { CstType, ICstCreateData } from '@/models/rsform'; -import { labelCstType } from '@/utils/labels'; -import { SelectorCstType } from '@/utils/selectors'; - -interface ConstituentaTabProps { - state: ICstCreateData; - partialUpdate: React.Dispatch>; -} - -function ConstituentaTab({ state, partialUpdate }: ConstituentaTabProps) { - return ( - <> -
- partialUpdate({ cst_type: data?.value ?? CstType.TERM })} - /> - partialUpdate({ alias: event.target.value })} - /> -
-