mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: build issues by commenting few parts
This commit is contained in:
parent
376da835ba
commit
abe3cf9d68
@ -16,25 +16,25 @@ const IssueFilter = observer(() => {
|
||||
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
|
||||
|
||||
const clearAllFilters = () => {
|
||||
router.replace(
|
||||
store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
key: "all",
|
||||
removeAll: true,
|
||||
})
|
||||
);
|
||||
// router.replace(
|
||||
// store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
// key: "all",
|
||||
// removeAll: true,
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
if (store.issue.getIfFiltersIsEmpty()) return null;
|
||||
// if (store.issue.getIfFiltersIsEmpty()) return null;
|
||||
|
||||
return (
|
||||
<div className="flex-shrink-0 min-h-[50px] h-auto py-1.5 border-b border-custom-border-200 relative flex items-center shadow-md bg-whiate select-none">
|
||||
<div className="px-5 flex justify-start items-center flex-wrap gap-2 text-sm">
|
||||
{/* state */}
|
||||
{store.issue.checkIfFilterExistsForKey("state") && <IssueStateFilter />}
|
||||
{/* {store.issue.checkIfFilterExistsForKey("state") && <IssueStateFilter />} */}
|
||||
{/* labels */}
|
||||
{store.issue.checkIfFilterExistsForKey("label") && <IssueLabelFilter />}
|
||||
{/* {store.issue.checkIfFilterExistsForKey("label") && <IssueLabelFilter />} */}
|
||||
{/* priority */}
|
||||
{store.issue.checkIfFilterExistsForKey("priority") && <IssuePriorityFilter />}
|
||||
{/* {store.issue.checkIfFilterExistsForKey("priority") && <IssuePriorityFilter />} */}
|
||||
{/* clear all filters */}
|
||||
<div
|
||||
className="flex items-center gap-2 border border-custom-border-200 px-2 py-1 cursor-pointer text-xs rounded-full"
|
||||
|
@ -13,12 +13,12 @@ export const RenderIssueLabel = observer(({ label }: { label: IIssueLabel }) =>
|
||||
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
|
||||
|
||||
const removeLabelFromFilter = () => {
|
||||
router.replace(
|
||||
store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
key: "label",
|
||||
value: label?.id,
|
||||
})
|
||||
);
|
||||
// router.replace(
|
||||
// store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
// key: "label",
|
||||
// value: label?.id,
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -16,12 +16,12 @@ const IssueLabelFilter = observer(() => {
|
||||
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
|
||||
|
||||
const clearLabelFilters = () => {
|
||||
router.replace(
|
||||
store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
key: "label",
|
||||
removeAll: true,
|
||||
})
|
||||
);
|
||||
// router.replace(
|
||||
// store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
// key: "label",
|
||||
// removeAll: true,
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
return (
|
||||
@ -29,13 +29,13 @@ const IssueLabelFilter = observer(() => {
|
||||
<div className="flex items-center gap-2 border border-custom-border-300 px-2 py-1 rounded-full text-xs">
|
||||
<div className="flex-shrink-0 text-custom-text-200">Labels</div>
|
||||
<div className="relative flex flex-wrap items-center gap-1">
|
||||
{store?.issue?.labels &&
|
||||
{/* {store?.issue?.labels &&
|
||||
store?.issue?.labels.map(
|
||||
(_label: IIssueLabel, _index: number) =>
|
||||
store.issue.getUserSelectedFilter("label", _label.id) && (
|
||||
<RenderIssueLabel key={_label.id} label={_label} />
|
||||
)
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
<div
|
||||
className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm"
|
||||
|
@ -13,12 +13,12 @@ export const RenderIssuePriority = observer(({ priority }: { priority: IIssuePri
|
||||
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
|
||||
|
||||
const removePriorityFromFilter = () => {
|
||||
router.replace(
|
||||
store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
key: "priority",
|
||||
value: priority?.key,
|
||||
})
|
||||
);
|
||||
// router.replace(
|
||||
// store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
// key: "priority",
|
||||
// value: priority?.key,
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -17,12 +17,12 @@ const IssuePriorityFilter = observer(() => {
|
||||
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
|
||||
|
||||
const clearPriorityFilters = () => {
|
||||
router.replace(
|
||||
store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
key: "priority",
|
||||
removeAll: true,
|
||||
})
|
||||
);
|
||||
// router.replace(
|
||||
// store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
// key: "priority",
|
||||
// removeAll: true,
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
return (
|
||||
@ -30,12 +30,12 @@ const IssuePriorityFilter = observer(() => {
|
||||
<div className="flex items-center gap-2 border border-custom-border-300 px-2 py-1 rounded-full text-xs">
|
||||
<div className="flex-shrink-0 text-custom-text-200">Priority</div>
|
||||
<div className="relative flex flex-wrap items-center gap-1">
|
||||
{issuePriorityFilters.map(
|
||||
{/* {issuePriorityFilters.map(
|
||||
(_priority: IIssuePriorityFilters, _index: number) =>
|
||||
store.issue.getUserSelectedFilter("priority", _priority.key) && (
|
||||
<RenderIssuePriority key={_priority.key} priority={_priority} />
|
||||
)
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
<div
|
||||
className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm"
|
||||
|
@ -17,12 +17,12 @@ export const RenderIssueState = observer(({ state }: { state: IIssueState }) =>
|
||||
const stateGroup = issueGroupFilter(state.group);
|
||||
|
||||
const removeStateFromFilter = () => {
|
||||
router.replace(
|
||||
store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
key: "state",
|
||||
value: state?.id,
|
||||
})
|
||||
);
|
||||
// router.replace(
|
||||
// store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
// key: "state",
|
||||
// value: state?.id,
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
if (stateGroup === null) return <></>;
|
||||
|
@ -16,12 +16,12 @@ const IssueStateFilter = observer(() => {
|
||||
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
|
||||
|
||||
const clearStateFilters = () => {
|
||||
router.replace(
|
||||
store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
key: "state",
|
||||
removeAll: true,
|
||||
})
|
||||
);
|
||||
// router.replace(
|
||||
// store.issue.getURLDefinition(workspace_slug, project_slug, {
|
||||
// key: "state",
|
||||
// removeAll: true,
|
||||
// })
|
||||
// );
|
||||
};
|
||||
|
||||
return (
|
||||
@ -29,13 +29,13 @@ const IssueStateFilter = observer(() => {
|
||||
<div className="flex items-center gap-2 border border-custom-border-300 px-2 py-1 rounded-full text-xs">
|
||||
<div className="flex-shrink-0 text-custom-text-200">State</div>
|
||||
<div className="relative flex flex-wrap items-center gap-1">
|
||||
{store?.issue?.states &&
|
||||
{/* {store?.issue?.states &&
|
||||
store?.issue?.states.map(
|
||||
(_state: IIssueState, _index: number) =>
|
||||
store.issue.getUserSelectedFilter("state", _state.id) && (
|
||||
<RenderIssueState key={_state.id} state={_state} />
|
||||
)
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
<div
|
||||
className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm"
|
||||
|
@ -2,8 +2,6 @@ import { useRouter } from "next/router";
|
||||
import { observer } from "mobx-react-lite";
|
||||
// constants
|
||||
import { issueViews } from "constants/data";
|
||||
// interfaces
|
||||
import { TIssueBoardKeys } from "types";
|
||||
// mobx
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import { RootStore } from "store/root";
|
||||
|
@ -9,7 +9,7 @@ import useToast from "hooks/use-toast";
|
||||
// ui
|
||||
import { SecondaryButton } from "components/ui";
|
||||
// types
|
||||
import { Comment } from "types";
|
||||
import { Comment } from "types/issue";
|
||||
// components
|
||||
import { TipTapEditor } from "components/tiptap";
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { ChatBubbleLeftEllipsisIcon, CheckIcon, XMarkIcon, EllipsisVerticalIcon
|
||||
// helpers
|
||||
import { timeAgo } from "helpers/date-time.helper";
|
||||
// types
|
||||
import { Comment } from "types";
|
||||
import { Comment } from "types/issue";
|
||||
// components
|
||||
import { TipTapEditor } from "components/tiptap";
|
||||
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
} from "components/issues/peek-overview";
|
||||
// types
|
||||
import { Loader } from "components/ui/loader";
|
||||
import { IIssue } from "types";
|
||||
import { IIssue } from "types/issue";
|
||||
|
||||
type Props = {
|
||||
handleClose: () => void;
|
||||
|
@ -12,7 +12,7 @@ import { RootStore } from "store/root";
|
||||
// lib
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
// types
|
||||
import { IIssue } from "types";
|
||||
import { IIssue } from "types/issue";
|
||||
|
||||
type Props = {
|
||||
handleClose: () => void;
|
||||
|
@ -6,7 +6,7 @@ import { useMobxStore } from "lib/mobx/store-provider";
|
||||
// components
|
||||
import { CommentCard, AddComment } from "components/issues/peek-overview";
|
||||
// types
|
||||
import { IIssue } from "types";
|
||||
import { IIssue } from "types/issue";
|
||||
|
||||
type Props = {
|
||||
issueDetails: IIssue;
|
||||
|
@ -2,7 +2,7 @@ import { IssueReactions } from "components/issues/peek-overview";
|
||||
import { TipTapEditor } from "components/tiptap";
|
||||
import { useRouter } from "next/router";
|
||||
// types
|
||||
import { IIssue } from "types";
|
||||
import { IIssue } from "types/issue";
|
||||
|
||||
type Props = {
|
||||
issueDetails: IIssue;
|
||||
|
@ -7,7 +7,7 @@ import useToast from "hooks/use-toast";
|
||||
import { Icon } from "components/ui";
|
||||
import { copyTextToClipboard, addSpaceIfCamelCase } from "helpers/string.helper";
|
||||
// types
|
||||
import { IIssue } from "types";
|
||||
import { IIssue } from "types/issue";
|
||||
// constants
|
||||
import { issueGroupFilter, issuePriorityFilter } from "constants/data";
|
||||
import { useEffect } from "react";
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
} from "components/issues/peek-overview";
|
||||
|
||||
import { Loader } from "components/ui/loader";
|
||||
import { IIssue } from "types";
|
||||
import { IIssue } from "types/issue";
|
||||
|
||||
type Props = {
|
||||
handleClose: () => void;
|
||||
|
@ -20,11 +20,11 @@ const MobxStoreInit = () => {
|
||||
else localStorage.setItem("app_theme", _theme && _theme != "light" ? "dark" : "light");
|
||||
}, [store?.theme]);
|
||||
|
||||
useEffect(() => {
|
||||
store.issue.userSelectedLabels = labels || [];
|
||||
store.issue.userSelectedPriorities = priorities || [];
|
||||
store.issue.userSelectedStates = states || [];
|
||||
}, [store.issue]);
|
||||
// useEffect(() => {
|
||||
// store.issue.userSelectedLabels = labels || [];
|
||||
// store.issue.userSelectedPriorities = priorities || [];
|
||||
// store.issue.userSelectedStates = states || [];
|
||||
// }, [store.issue]);
|
||||
|
||||
return <></>;
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ const OnBoardingPage = () => {
|
||||
const user = userStore?.currentUser;
|
||||
|
||||
if (!user) {
|
||||
userStore.getUserAsync();
|
||||
userStore.fetchCurrentUser();
|
||||
}
|
||||
}, [userStore]);
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { makeObservable, observable, action, runInAction } from "mobx";
|
||||
import { RootStore } from "./root";
|
||||
// services
|
||||
import IssueService from "services/issue.service";
|
||||
import { IIssue } from "types";
|
||||
import { IIssue } from "types/issue";
|
||||
|
||||
export type IPeekMode = "side" | "modal" | "full";
|
||||
|
||||
|
@ -3,8 +3,7 @@ import { observable, action, computed, makeObservable, runInAction, reaction } f
|
||||
// service
|
||||
import IssueService from "services/issue.service";
|
||||
// types
|
||||
import { IssueDetailType, TIssueBoardKeys } from "types/issue";
|
||||
import { IIssue, IIssueState, IIssueLabel } from "../types";
|
||||
import { IssueDetailType, TIssueBoardKeys, IIssueLabel, IIssueState, IIssue } from "types/issue";
|
||||
|
||||
export interface IIssueStore {
|
||||
currentIssueBoardView: TIssueBoardKeys | null;
|
||||
|
@ -3,7 +3,7 @@ import { observable, action, makeObservable, runInAction } from "mobx";
|
||||
// service
|
||||
import ProjectService from "services/project.service";
|
||||
// types
|
||||
import { IWorkspace, IProject, IProjectSettings } from "../types";
|
||||
import { IWorkspace, IProject, IProjectSettings } from "types/project";
|
||||
|
||||
export interface IProjectStore {
|
||||
loader: boolean;
|
||||
|
@ -7,7 +7,7 @@ import IssueStore, { IIssueStore } from "./issue";
|
||||
import ProjectStore, { IProjectStore } from "./project";
|
||||
import IssueDetailStore, { IIssueDetailStore } from "./issue_details";
|
||||
// types
|
||||
import { IThemeStore } from "../types";
|
||||
import { IThemeStore } from "types/theme";
|
||||
|
||||
enableStaticRendering(typeof window === "undefined");
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// mobx
|
||||
import { observable, action, computed, makeObservable, runInAction } from "mobx";
|
||||
// types
|
||||
import { IThemeStore } from "../types";
|
||||
import { IThemeStore } from "types/theme";
|
||||
|
||||
class ThemeStore implements IThemeStore {
|
||||
theme: "light" | "dark" = "light";
|
||||
|
@ -1,4 +0,0 @@
|
||||
export * from "./user";
|
||||
export * from "./theme";
|
||||
export * from "./project";
|
||||
export * from "./issue";
|
@ -0,0 +1,3 @@
|
||||
export interface IUser {
|
||||
first_name: string;
|
||||
}
|
Loading…
Reference in New Issue
Block a user