diff --git a/src/features/ModelPlan/ModelToOperations/Home/index.tsx b/src/features/ModelPlan/ModelToOperations/Home/index.tsx index 535ca25109..56c4381def 100644 --- a/src/features/ModelPlan/ModelToOperations/Home/index.tsx +++ b/src/features/ModelPlan/ModelToOperations/Home/index.tsx @@ -2,7 +2,6 @@ import React, { useContext, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useHistory, useLocation, useParams } from 'react-router-dom'; import { - Button, Grid, Header, Icon, @@ -20,9 +19,9 @@ import { ModelInfoContext } from 'contexts/ModelInfoContext'; import useCheckResponsiveScreen from 'hooks/useCheckMobile'; import useMessage from 'hooks/useMessage'; -import MTOModal from '../_components/FormModal'; import MTOStatusBanner from '../_components/StatusBanner'; import MTOTable from '../_components/Table'; +import MTOTableActions from '../_components/Table/Actions'; export type MTOOption = 'milestones' | 'systems-and-solutions'; @@ -35,7 +34,7 @@ const MTOHome = () => { const { modelName } = useContext(ModelInfoContext); - const { data, loading } = useGetModelToOperationsMatrixQuery({ + const { data, loading, error, refetch } = useGetModelToOperationsMatrixQuery({ variables: { id: modelID } @@ -47,7 +46,7 @@ const MTOHome = () => { const location = useLocation(); - const { clearMessage, message } = useMessage(); + const { message } = useMessage(); const params = useMemo(() => { return new URLSearchParams(location.search); @@ -59,12 +58,6 @@ const MTOHome = () => { const [currentView, setCurrentView] = useState('milestones'); - const [isModalOpen, setIsModalOpen] = useState(false); - - const [modalType, setModalType] = useState< - 'category' | 'milestone' | 'solution' - >('category'); - useEffect(() => { if (viewparam && mtoOptions.includes(viewparam as MTOOption)) { setCurrentView(viewparam as MTOOption); @@ -85,7 +78,7 @@ const MTOHome = () => { ]} /> - {!isModalOpen && message && {message}} + {message && {message}} @@ -165,55 +158,6 @@ const MTOHome = () => { -
- setIsModalOpen(false)} - modalType={modalType} - /> -
- {/*
- TEMPORARY -
*/} - - - -
-
- {isTablet && (