fix: build issues by commenting few parts

This commit is contained in:
sriramveeraghanta 2023-09-01 00:34:57 +05:30
parent 376da835ba
commit abe3cf9d68
25 changed files with 74 additions and 78 deletions

View File

@ -16,25 +16,25 @@ const IssueFilter = observer(() => {
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string }; const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
const clearAllFilters = () => { const clearAllFilters = () => {
router.replace( // router.replace(
store.issue.getURLDefinition(workspace_slug, project_slug, { // store.issue.getURLDefinition(workspace_slug, project_slug, {
key: "all", // key: "all",
removeAll: true, // removeAll: true,
}) // })
); // );
}; };
if (store.issue.getIfFiltersIsEmpty()) return null; // if (store.issue.getIfFiltersIsEmpty()) return null;
return ( 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="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"> <div className="px-5 flex justify-start items-center flex-wrap gap-2 text-sm">
{/* state */} {/* state */}
{store.issue.checkIfFilterExistsForKey("state") && <IssueStateFilter />} {/* {store.issue.checkIfFilterExistsForKey("state") && <IssueStateFilter />} */}
{/* labels */} {/* labels */}
{store.issue.checkIfFilterExistsForKey("label") && <IssueLabelFilter />} {/* {store.issue.checkIfFilterExistsForKey("label") && <IssueLabelFilter />} */}
{/* priority */} {/* priority */}
{store.issue.checkIfFilterExistsForKey("priority") && <IssuePriorityFilter />} {/* {store.issue.checkIfFilterExistsForKey("priority") && <IssuePriorityFilter />} */}
{/* clear all filters */} {/* clear all filters */}
<div <div
className="flex items-center gap-2 border border-custom-border-200 px-2 py-1 cursor-pointer text-xs rounded-full" className="flex items-center gap-2 border border-custom-border-200 px-2 py-1 cursor-pointer text-xs rounded-full"

View File

@ -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 { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
const removeLabelFromFilter = () => { const removeLabelFromFilter = () => {
router.replace( // router.replace(
store.issue.getURLDefinition(workspace_slug, project_slug, { // store.issue.getURLDefinition(workspace_slug, project_slug, {
key: "label", // key: "label",
value: label?.id, // value: label?.id,
}) // })
); // );
}; };
return ( return (

View File

@ -16,12 +16,12 @@ const IssueLabelFilter = observer(() => {
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string }; const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
const clearLabelFilters = () => { const clearLabelFilters = () => {
router.replace( // router.replace(
store.issue.getURLDefinition(workspace_slug, project_slug, { // store.issue.getURLDefinition(workspace_slug, project_slug, {
key: "label", // key: "label",
removeAll: true, // removeAll: true,
}) // })
); // );
}; };
return ( 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 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="flex-shrink-0 text-custom-text-200">Labels</div>
<div className="relative flex flex-wrap items-center gap-1"> <div className="relative flex flex-wrap items-center gap-1">
{store?.issue?.labels && {/* {store?.issue?.labels &&
store?.issue?.labels.map( store?.issue?.labels.map(
(_label: IIssueLabel, _index: number) => (_label: IIssueLabel, _index: number) =>
store.issue.getUserSelectedFilter("label", _label.id) && ( store.issue.getUserSelectedFilter("label", _label.id) && (
<RenderIssueLabel key={_label.id} label={_label} /> <RenderIssueLabel key={_label.id} label={_label} />
) )
)} )} */}
</div> </div>
<div <div
className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm" className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm"

View File

@ -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 { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
const removePriorityFromFilter = () => { const removePriorityFromFilter = () => {
router.replace( // router.replace(
store.issue.getURLDefinition(workspace_slug, project_slug, { // store.issue.getURLDefinition(workspace_slug, project_slug, {
key: "priority", // key: "priority",
value: priority?.key, // value: priority?.key,
}) // })
); // );
}; };
return ( return (

View File

@ -17,12 +17,12 @@ const IssuePriorityFilter = observer(() => {
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string }; const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
const clearPriorityFilters = () => { const clearPriorityFilters = () => {
router.replace( // router.replace(
store.issue.getURLDefinition(workspace_slug, project_slug, { // store.issue.getURLDefinition(workspace_slug, project_slug, {
key: "priority", // key: "priority",
removeAll: true, // removeAll: true,
}) // })
); // );
}; };
return ( 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 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="flex-shrink-0 text-custom-text-200">Priority</div>
<div className="relative flex flex-wrap items-center gap-1"> <div className="relative flex flex-wrap items-center gap-1">
{issuePriorityFilters.map( {/* {issuePriorityFilters.map(
(_priority: IIssuePriorityFilters, _index: number) => (_priority: IIssuePriorityFilters, _index: number) =>
store.issue.getUserSelectedFilter("priority", _priority.key) && ( store.issue.getUserSelectedFilter("priority", _priority.key) && (
<RenderIssuePriority key={_priority.key} priority={_priority} /> <RenderIssuePriority key={_priority.key} priority={_priority} />
) )
)} )} */}
</div> </div>
<div <div
className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm" className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm"

View File

@ -17,12 +17,12 @@ export const RenderIssueState = observer(({ state }: { state: IIssueState }) =>
const stateGroup = issueGroupFilter(state.group); const stateGroup = issueGroupFilter(state.group);
const removeStateFromFilter = () => { const removeStateFromFilter = () => {
router.replace( // router.replace(
store.issue.getURLDefinition(workspace_slug, project_slug, { // store.issue.getURLDefinition(workspace_slug, project_slug, {
key: "state", // key: "state",
value: state?.id, // value: state?.id,
}) // })
); // );
}; };
if (stateGroup === null) return <></>; if (stateGroup === null) return <></>;

View File

@ -16,12 +16,12 @@ const IssueStateFilter = observer(() => {
const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string }; const { workspace_slug, project_slug } = router.query as { workspace_slug: string; project_slug: string };
const clearStateFilters = () => { const clearStateFilters = () => {
router.replace( // router.replace(
store.issue.getURLDefinition(workspace_slug, project_slug, { // store.issue.getURLDefinition(workspace_slug, project_slug, {
key: "state", // key: "state",
removeAll: true, // removeAll: true,
}) // })
); // );
}; };
return ( 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 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="flex-shrink-0 text-custom-text-200">State</div>
<div className="relative flex flex-wrap items-center gap-1"> <div className="relative flex flex-wrap items-center gap-1">
{store?.issue?.states && {/* {store?.issue?.states &&
store?.issue?.states.map( store?.issue?.states.map(
(_state: IIssueState, _index: number) => (_state: IIssueState, _index: number) =>
store.issue.getUserSelectedFilter("state", _state.id) && ( store.issue.getUserSelectedFilter("state", _state.id) && (
<RenderIssueState key={_state.id} state={_state} /> <RenderIssueState key={_state.id} state={_state} />
) )
)} )} */}
</div> </div>
<div <div
className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm" className="flex-shrink-0 w-3 h-3 cursor-pointer flex justify-center items-center overflow-hidden rounded-sm"

View File

@ -2,8 +2,6 @@ import { useRouter } from "next/router";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
// constants // constants
import { issueViews } from "constants/data"; import { issueViews } from "constants/data";
// interfaces
import { TIssueBoardKeys } from "types";
// mobx // mobx
import { useMobxStore } from "lib/mobx/store-provider"; import { useMobxStore } from "lib/mobx/store-provider";
import { RootStore } from "store/root"; import { RootStore } from "store/root";

View File

@ -9,7 +9,7 @@ import useToast from "hooks/use-toast";
// ui // ui
import { SecondaryButton } from "components/ui"; import { SecondaryButton } from "components/ui";
// types // types
import { Comment } from "types"; import { Comment } from "types/issue";
// components // components
import { TipTapEditor } from "components/tiptap"; import { TipTapEditor } from "components/tiptap";

View File

@ -9,7 +9,7 @@ import { ChatBubbleLeftEllipsisIcon, CheckIcon, XMarkIcon, EllipsisVerticalIcon
// helpers // helpers
import { timeAgo } from "helpers/date-time.helper"; import { timeAgo } from "helpers/date-time.helper";
// types // types
import { Comment } from "types"; import { Comment } from "types/issue";
// components // components
import { TipTapEditor } from "components/tiptap"; import { TipTapEditor } from "components/tiptap";

View File

@ -11,7 +11,7 @@ import {
} from "components/issues/peek-overview"; } from "components/issues/peek-overview";
// types // types
import { Loader } from "components/ui/loader"; import { Loader } from "components/ui/loader";
import { IIssue } from "types"; import { IIssue } from "types/issue";
type Props = { type Props = {
handleClose: () => void; handleClose: () => void;

View File

@ -12,7 +12,7 @@ import { RootStore } from "store/root";
// lib // lib
import { useMobxStore } from "lib/mobx/store-provider"; import { useMobxStore } from "lib/mobx/store-provider";
// types // types
import { IIssue } from "types"; import { IIssue } from "types/issue";
type Props = { type Props = {
handleClose: () => void; handleClose: () => void;

View File

@ -6,7 +6,7 @@ import { useMobxStore } from "lib/mobx/store-provider";
// components // components
import { CommentCard, AddComment } from "components/issues/peek-overview"; import { CommentCard, AddComment } from "components/issues/peek-overview";
// types // types
import { IIssue } from "types"; import { IIssue } from "types/issue";
type Props = { type Props = {
issueDetails: IIssue; issueDetails: IIssue;

View File

@ -2,7 +2,7 @@ import { IssueReactions } from "components/issues/peek-overview";
import { TipTapEditor } from "components/tiptap"; import { TipTapEditor } from "components/tiptap";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
// types // types
import { IIssue } from "types"; import { IIssue } from "types/issue";
type Props = { type Props = {
issueDetails: IIssue; issueDetails: IIssue;

View File

@ -7,7 +7,7 @@ import useToast from "hooks/use-toast";
import { Icon } from "components/ui"; import { Icon } from "components/ui";
import { copyTextToClipboard, addSpaceIfCamelCase } from "helpers/string.helper"; import { copyTextToClipboard, addSpaceIfCamelCase } from "helpers/string.helper";
// types // types
import { IIssue } from "types"; import { IIssue } from "types/issue";
// constants // constants
import { issueGroupFilter, issuePriorityFilter } from "constants/data"; import { issueGroupFilter, issuePriorityFilter } from "constants/data";
import { useEffect } from "react"; import { useEffect } from "react";

View File

@ -8,7 +8,7 @@ import {
} from "components/issues/peek-overview"; } from "components/issues/peek-overview";
import { Loader } from "components/ui/loader"; import { Loader } from "components/ui/loader";
import { IIssue } from "types"; import { IIssue } from "types/issue";
type Props = { type Props = {
handleClose: () => void; handleClose: () => void;

View File

@ -20,11 +20,11 @@ const MobxStoreInit = () => {
else localStorage.setItem("app_theme", _theme && _theme != "light" ? "dark" : "light"); else localStorage.setItem("app_theme", _theme && _theme != "light" ? "dark" : "light");
}, [store?.theme]); }, [store?.theme]);
useEffect(() => { // useEffect(() => {
store.issue.userSelectedLabels = labels || []; // store.issue.userSelectedLabels = labels || [];
store.issue.userSelectedPriorities = priorities || []; // store.issue.userSelectedPriorities = priorities || [];
store.issue.userSelectedStates = states || []; // store.issue.userSelectedStates = states || [];
}, [store.issue]); // }, [store.issue]);
return <></>; return <></>;
}; };

View File

@ -24,7 +24,7 @@ const OnBoardingPage = () => {
const user = userStore?.currentUser; const user = userStore?.currentUser;
if (!user) { if (!user) {
userStore.getUserAsync(); userStore.fetchCurrentUser();
} }
}, [userStore]); }, [userStore]);

View File

@ -3,7 +3,7 @@ import { makeObservable, observable, action, runInAction } from "mobx";
import { RootStore } from "./root"; import { RootStore } from "./root";
// services // services
import IssueService from "services/issue.service"; import IssueService from "services/issue.service";
import { IIssue } from "types"; import { IIssue } from "types/issue";
export type IPeekMode = "side" | "modal" | "full"; export type IPeekMode = "side" | "modal" | "full";

View File

@ -3,8 +3,7 @@ import { observable, action, computed, makeObservable, runInAction, reaction } f
// service // service
import IssueService from "services/issue.service"; import IssueService from "services/issue.service";
// types // types
import { IssueDetailType, TIssueBoardKeys } from "types/issue"; import { IssueDetailType, TIssueBoardKeys, IIssueLabel, IIssueState, IIssue } from "types/issue";
import { IIssue, IIssueState, IIssueLabel } from "../types";
export interface IIssueStore { export interface IIssueStore {
currentIssueBoardView: TIssueBoardKeys | null; currentIssueBoardView: TIssueBoardKeys | null;

View File

@ -3,7 +3,7 @@ import { observable, action, makeObservable, runInAction } from "mobx";
// service // service
import ProjectService from "services/project.service"; import ProjectService from "services/project.service";
// types // types
import { IWorkspace, IProject, IProjectSettings } from "../types"; import { IWorkspace, IProject, IProjectSettings } from "types/project";
export interface IProjectStore { export interface IProjectStore {
loader: boolean; loader: boolean;

View File

@ -7,7 +7,7 @@ import IssueStore, { IIssueStore } from "./issue";
import ProjectStore, { IProjectStore } from "./project"; import ProjectStore, { IProjectStore } from "./project";
import IssueDetailStore, { IIssueDetailStore } from "./issue_details"; import IssueDetailStore, { IIssueDetailStore } from "./issue_details";
// types // types
import { IThemeStore } from "../types"; import { IThemeStore } from "types/theme";
enableStaticRendering(typeof window === "undefined"); enableStaticRendering(typeof window === "undefined");

View File

@ -1,7 +1,7 @@
// mobx // mobx
import { observable, action, computed, makeObservable, runInAction } from "mobx"; import { observable, action, computed, makeObservable, runInAction } from "mobx";
// types // types
import { IThemeStore } from "../types"; import { IThemeStore } from "types/theme";
class ThemeStore implements IThemeStore { class ThemeStore implements IThemeStore {
theme: "light" | "dark" = "light"; theme: "light" | "dark" = "light";

View File

@ -1,4 +0,0 @@
export * from "./user";
export * from "./theme";
export * from "./project";
export * from "./issue";

View File

@ -0,0 +1,3 @@
export interface IUser {
first_name: string;
}