2024-12-11 18:02:58 +05:30
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
// components
|
2025-08-15 13:10:26 +05:30
|
|
|
import { CycleCreateUpdateModal } from "@/components/cycles/modal";
|
2024-12-11 18:02:58 +05:30
|
|
|
import { CreateUpdateModuleModal } from "@/components/modules";
|
2025-08-15 13:10:26 +05:30
|
|
|
import { CreatePageModal } from "@/components/pages/modals/create-page-modal";
|
|
|
|
|
import { CreateUpdateProjectViewModal } from "@/components/views/modal";
|
2024-12-11 18:02:58 +05:30
|
|
|
// hooks
|
2025-08-15 13:10:26 +05:30
|
|
|
import { useCommandPalette } from "@/hooks/store/use-command-palette";
|
2025-02-19 18:02:14 +05:30
|
|
|
// plane web hooks
|
|
|
|
|
import { EPageStoreType } from "@/plane-web/hooks/store";
|
2024-12-11 18:02:58 +05:30
|
|
|
|
|
|
|
|
export type TProjectLevelModalsProps = {
|
|
|
|
|
workspaceSlug: string;
|
|
|
|
|
projectId: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const ProjectLevelModals = observer((props: TProjectLevelModalsProps) => {
|
|
|
|
|
const { workspaceSlug, projectId } = props;
|
|
|
|
|
// store hooks
|
|
|
|
|
const {
|
|
|
|
|
isCreateCycleModalOpen,
|
|
|
|
|
toggleCreateCycleModal,
|
|
|
|
|
isCreateModuleModalOpen,
|
|
|
|
|
toggleCreateModuleModal,
|
|
|
|
|
isCreateViewModalOpen,
|
|
|
|
|
toggleCreateViewModal,
|
|
|
|
|
createPageModal,
|
|
|
|
|
toggleCreatePageModal,
|
|
|
|
|
} = useCommandPalette();
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<CycleCreateUpdateModal
|
|
|
|
|
isOpen={isCreateCycleModalOpen}
|
|
|
|
|
handleClose={() => toggleCreateCycleModal(false)}
|
|
|
|
|
workspaceSlug={workspaceSlug.toString()}
|
|
|
|
|
projectId={projectId.toString()}
|
|
|
|
|
/>
|
|
|
|
|
<CreateUpdateModuleModal
|
|
|
|
|
isOpen={isCreateModuleModalOpen}
|
|
|
|
|
onClose={() => toggleCreateModuleModal(false)}
|
|
|
|
|
workspaceSlug={workspaceSlug.toString()}
|
|
|
|
|
projectId={projectId.toString()}
|
|
|
|
|
/>
|
|
|
|
|
<CreateUpdateProjectViewModal
|
|
|
|
|
isOpen={isCreateViewModalOpen}
|
|
|
|
|
onClose={() => toggleCreateViewModal(false)}
|
|
|
|
|
workspaceSlug={workspaceSlug.toString()}
|
|
|
|
|
projectId={projectId.toString()}
|
|
|
|
|
/>
|
|
|
|
|
<CreatePageModal
|
|
|
|
|
workspaceSlug={workspaceSlug.toString()}
|
|
|
|
|
projectId={projectId.toString()}
|
|
|
|
|
isModalOpen={createPageModal.isOpen}
|
|
|
|
|
pageAccess={createPageModal.pageAccess}
|
|
|
|
|
handleModalClose={() => toggleCreatePageModal({ isOpen: false })}
|
|
|
|
|
redirectionEnabled
|
2025-02-19 18:02:14 +05:30
|
|
|
storeType={EPageStoreType.PROJECT}
|
2024-12-11 18:02:58 +05:30
|
|
|
/>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
});
|