mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
061be85a5d
* fix: GET request changes * fix: filtering changes * feat: cycles and modules archive. * chore: disable fetching of cycle/ module details when clicked on the card in archives page. * chore: remove copy link button from archived modules/ cycles. * fix: archived cycle and module loading fliker issue. * chore: add validation to only archive completed cycles. * chore: add validation to only archive completed or cancelled module. * chore: archived issues/ cycles/ modules empty state update. --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com> Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import { ReactElement } from "react";
|
|
import { observer } from "mobx-react";
|
|
import { useRouter } from "next/router";
|
|
// components
|
|
import { PageHead } from "@/components/core";
|
|
import { ProjectArchivesHeader } from "@/components/headers";
|
|
import { ArchivedModuleLayoutRoot, ArchivedModulesHeader } from "@/components/modules";
|
|
// hooks
|
|
import { useProject } from "@/hooks/store";
|
|
// layouts
|
|
import { AppLayout } from "@/layouts/app-layout";
|
|
// types
|
|
import { NextPageWithLayout } from "@/lib/types";
|
|
|
|
const ProjectArchivedModulesPage: NextPageWithLayout = observer(() => {
|
|
// router
|
|
const router = useRouter();
|
|
const { projectId } = router.query;
|
|
// store hooks
|
|
const { getProjectById } = useProject();
|
|
// derived values
|
|
const project = projectId ? getProjectById(projectId.toString()) : undefined;
|
|
const pageTitle = project?.name && `${project?.name} - Archived modules`;
|
|
|
|
return (
|
|
<>
|
|
<PageHead title={pageTitle} />
|
|
<div className="relative flex h-full w-full flex-col overflow-hidden">
|
|
<ArchivedModulesHeader />
|
|
<ArchivedModuleLayoutRoot />
|
|
</div>
|
|
</>
|
|
);
|
|
});
|
|
|
|
ProjectArchivedModulesPage.getLayout = function getLayout(page: ReactElement) {
|
|
return (
|
|
<AppLayout header={<ProjectArchivesHeader />} withProjectWrapper>
|
|
{page}
|
|
</AppLayout>
|
|
);
|
|
};
|
|
|
|
export default ProjectArchivedModulesPage;
|