diff --git a/src/app/deals/contexts/ProjectsContext.tsx b/src/app/deals/contexts/ProjectsContext.tsx index c314d12..19c527d 100644 --- a/src/app/deals/contexts/ProjectsContext.tsx +++ b/src/app/deals/contexts/ProjectsContext.tsx @@ -36,7 +36,7 @@ const useProjectsContextState = (): ProjectsContextState => { const modulesSet = useMemo( () => new Set( - selectedProject?.builtInModules.map(m => m.key as ModuleNames) + selectedProject?.modules.map(m => m.key as ModuleNames) ), [selectedProject] ); diff --git a/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx b/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx index 0026bd1..524c61d 100644 --- a/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx +++ b/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx @@ -55,7 +55,7 @@ const DealEditorBody: FC = props => { if (!props.project) return []; const tabs: ReactNode[] = []; - for (const module of props.project.builtInModules) { + for (const module of props.project.modules) { const moduleInfo = MODULES[module.key]; for (const tab of moduleInfo.tabs) { if ( @@ -75,7 +75,7 @@ const DealEditorBody: FC = props => { if (!props.project) return []; const tabPanels: ReactNode[] = []; - for (const module of props.project.builtInModules) { + for (const module of props.project.modules) { const moduleInfo = MODULES[module.key]; for (const tab of moduleInfo.tabs) { if ( diff --git a/src/drawers/common/ProjectEditorDrawer/tabs/ModulesTab/ModulesTab.tsx b/src/drawers/common/ProjectEditorDrawer/tabs/ModulesTab/ModulesTab.tsx index 2ba58e3..442d0ac 100644 --- a/src/drawers/common/ProjectEditorDrawer/tabs/ModulesTab/ModulesTab.tsx +++ b/src/drawers/common/ProjectEditorDrawer/tabs/ModulesTab/ModulesTab.tsx @@ -16,12 +16,10 @@ export const ModulesTab: FC = ({ value, onChange }) => { }); const onSubmit = (values: ProjectSchema) => { - const modulesWithDependencies = resolveDependencies( - values.builtInModules - ); + const modulesWithDependencies = resolveDependencies(values.modules); const updatedValues = { ...values, - builtInModules: modulesWithDependencies, + modules: modulesWithDependencies, }; form.setValues(updatedValues); form.resetDirty(); @@ -32,9 +30,9 @@ export const ModulesTab: FC = ({ value, onChange }) => {
- form.setFieldValue("builtInModules", modules) + form.setFieldValue("modules", modules) } />