From 7fc6be12a69b0d52fa04de7c593eceee430a3499 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Thu, 21 Nov 2024 20:53:24 +0000 Subject: [PATCH] feat: refactoring the MSD --- .../msd/pages/sims-creation/index.jsx | 16 +++++----------- .../msd/pages/sims-creation/menu.tsx | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 src/packages/modules-operations/msd/pages/sims-creation/menu.tsx diff --git a/src/packages/modules-operations/msd/pages/sims-creation/index.jsx b/src/packages/modules-operations/msd/pages/sims-creation/index.jsx index cd4ac58ce..26125d3c6 100644 --- a/src/packages/modules-operations/msd/pages/sims-creation/index.jsx +++ b/src/packages/modules-operations/msd/pages/sims-creation/index.jsx @@ -14,13 +14,11 @@ import { shouldDisplayTitleForPrimaryItem, } from '../../utils'; +import Modal from 'react-modal'; import { useBlocker } from 'react-router-dom'; import { ActionToolbar } from '../../../../components/action-toolbar'; -import { - CancelButton, - CloseIconButton, - SaveButton, -} from '../../../../components/buttons/buttons-with-icons'; +import { Button } from '../../../../components/buttons/button'; +import { CloseIconButton } from '../../../../components/buttons/buttons-with-icons'; import { OperationsApi } from '../../../../sdk/operations-api'; import { sortArrayByLabel } from '../../../../utils/array-utils'; import { useGoBack } from '../../../../utils/hooks/useGoBack'; @@ -28,10 +26,9 @@ import { rangeType } from '../../../utils/msd'; import { RubricEssentialMsg } from '../../rubric-essantial-msg'; import { DocumentFormPanel } from './document-form-panel'; import { useDocumentsStoreContext } from './documents-store-context'; +import { Menu } from './menu'; import './sims-creation.scss'; import { getDefaultSims, getSiblingSims } from './utils/getSims'; -import Modal from 'react-modal'; -import { Button } from '../../../../components/buttons/button'; const { RICH_TEXT } = rangeType; @@ -254,10 +251,7 @@ const SimsCreation = ({ return ( <> - - - - + void; + handleSubmit: () => void; +}; +export const Menu = ({ goBackUrl, handleSubmit }: Readonly) => { + return ( + + + + + ); +};