mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Merge branch 'develop' of github.com:makeplane/plane into feat/pagination
This commit is contained in:
commit
3929f97167
@ -11,7 +11,8 @@ import {
|
|||||||
XCircle,
|
XCircle,
|
||||||
CircleDot,
|
CircleDot,
|
||||||
CopyPlus,
|
CopyPlus,
|
||||||
CalendarDays,
|
CalendarClock,
|
||||||
|
CalendarCheck2,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { useEstimate, useIssueDetail, useProject, useProjectState, useUser } from "hooks/store";
|
import { useEstimate, useIssueDetail, useProject, useProjectState, useUser } from "hooks/store";
|
||||||
@ -236,7 +237,7 @@ export const IssueDetailsSidebar: React.FC<Props> = observer((props) => {
|
|||||||
|
|
||||||
<div className="flex items-center gap-2 h-8">
|
<div className="flex items-center gap-2 h-8">
|
||||||
<div className="flex items-center gap-1 w-2/5 flex-shrink-0 text-sm text-custom-text-300">
|
<div className="flex items-center gap-1 w-2/5 flex-shrink-0 text-sm text-custom-text-300">
|
||||||
<CalendarDays className="h-4 w-4 flex-shrink-0" />
|
<CalendarClock className="h-4 w-4 flex-shrink-0" />
|
||||||
<span>Start date</span>
|
<span>Start date</span>
|
||||||
</div>
|
</div>
|
||||||
<DateDropdown
|
<DateDropdown
|
||||||
@ -262,7 +263,7 @@ export const IssueDetailsSidebar: React.FC<Props> = observer((props) => {
|
|||||||
|
|
||||||
<div className="flex items-center gap-2 h-8">
|
<div className="flex items-center gap-2 h-8">
|
||||||
<div className="flex items-center gap-1 w-2/5 flex-shrink-0 text-sm text-custom-text-300">
|
<div className="flex items-center gap-1 w-2/5 flex-shrink-0 text-sm text-custom-text-300">
|
||||||
<CalendarDays className="h-4 w-4 flex-shrink-0" />
|
<CalendarCheck2 className="h-4 w-4 flex-shrink-0" />
|
||||||
<span>Due date</span>
|
<span>Due date</span>
|
||||||
</div>
|
</div>
|
||||||
<DateDropdown
|
<DateDropdown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { useCallback, useMemo } from "react";
|
import { useCallback, useMemo } from "react";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { Layers, Link, Paperclip } from "lucide-react";
|
import { CalendarCheck2, CalendarClock, Layers, Link, Paperclip } from "lucide-react";
|
||||||
import xor from "lodash/xor";
|
import xor from "lodash/xor";
|
||||||
// hooks
|
// hooks
|
||||||
import { useEventTracker, useEstimate, useLabel, useIssues, useProjectState } from "hooks/store";
|
import { useEventTracker, useEstimate, useLabel, useIssues, useProjectState } from "hooks/store";
|
||||||
@ -286,6 +286,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
|
|||||||
onChange={handleStartDate}
|
onChange={handleStartDate}
|
||||||
maxDate={maxDate ?? undefined}
|
maxDate={maxDate ?? undefined}
|
||||||
placeholder="Start date"
|
placeholder="Start date"
|
||||||
|
icon={<CalendarClock className="h-3 w-3 flex-shrink-0" />}
|
||||||
buttonVariant={issue.start_date ? "border-with-text" : "border-without-text"}
|
buttonVariant={issue.start_date ? "border-with-text" : "border-without-text"}
|
||||||
disabled={isReadOnly}
|
disabled={isReadOnly}
|
||||||
showTooltip
|
showTooltip
|
||||||
@ -301,6 +302,7 @@ export const IssueProperties: React.FC<IIssueProperties> = observer((props) => {
|
|||||||
onChange={handleTargetDate}
|
onChange={handleTargetDate}
|
||||||
minDate={minDate ?? undefined}
|
minDate={minDate ?? undefined}
|
||||||
placeholder="Due date"
|
placeholder="Due date"
|
||||||
|
icon={<CalendarCheck2 className="h-3 w-3 flex-shrink-0" />}
|
||||||
buttonVariant={issue.target_date ? "border-with-text" : "border-without-text"}
|
buttonVariant={issue.target_date ? "border-with-text" : "border-without-text"}
|
||||||
buttonClassName={shouldHighlightIssueDueDate(issue.target_date, stateDetails?.group) ? "text-red-500" : ""}
|
buttonClassName={shouldHighlightIssueDueDate(issue.target_date, stateDetails?.group) ? "text-red-500" : ""}
|
||||||
clearIconClassName="!text-custom-text-100"
|
clearIconClassName="!text-custom-text-100"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
|
import { CalendarCheck2 } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { useProjectState } from "hooks/store";
|
import { useProjectState } from "hooks/store";
|
||||||
// components
|
// components
|
||||||
@ -43,6 +44,7 @@ export const SpreadsheetDueDateColumn: React.FC<Props> = observer((props: Props)
|
|||||||
}}
|
}}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
placeholder="Due date"
|
placeholder="Due date"
|
||||||
|
icon={<CalendarCheck2 className="h-3 w-3 flex-shrink-0" />}
|
||||||
buttonVariant="transparent-with-text"
|
buttonVariant="transparent-with-text"
|
||||||
buttonContainerClassName="w-full"
|
buttonContainerClassName="w-full"
|
||||||
buttonClassName={cn("rounded-none text-left", {
|
buttonClassName={cn("rounded-none text-left", {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
|
import { CalendarClock } from "lucide-react";
|
||||||
// components
|
// components
|
||||||
import { DateDropdown } from "components/dropdowns";
|
import { DateDropdown } from "components/dropdowns";
|
||||||
// helpers
|
// helpers
|
||||||
@ -35,6 +36,7 @@ export const SpreadsheetStartDateColumn: React.FC<Props> = observer((props: Prop
|
|||||||
}}
|
}}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
placeholder="Start date"
|
placeholder="Start date"
|
||||||
|
icon={<CalendarClock className="h-3 w-3 flex-shrink-0" />}
|
||||||
buttonVariant="transparent-with-text"
|
buttonVariant="transparent-with-text"
|
||||||
buttonClassName="rounded-none text-left"
|
buttonClassName="rounded-none text-left"
|
||||||
buttonContainerClassName="w-full"
|
buttonContainerClassName="w-full"
|
||||||
|
@ -189,7 +189,7 @@ const IssueRowDetails = observer((props: IssueRowDetailsProps) => {
|
|||||||
<td
|
<td
|
||||||
id={`issue-${issueDetail.id}`}
|
id={`issue-${issueDetail.id}`}
|
||||||
className={cn(
|
className={cn(
|
||||||
"sticky group left-0 h-11 w-[28rem] flex items-center bg-custom-background-100 text-sm after:absolute border-r-[0.5px] z-[1] border-custom-border-200",
|
"sticky group left-0 h-11 w-[28rem] flex items-center bg-custom-background-100 text-sm after:absolute border-r-[0.5px] z-10 border-custom-border-200",
|
||||||
{
|
{
|
||||||
"border-b-[0.5px]": peekIssue?.issueId !== issueDetail.id,
|
"border-b-[0.5px]": peekIssue?.issueId !== issueDetail.id,
|
||||||
},
|
},
|
||||||
|
@ -19,10 +19,10 @@ export const SpreadsheetHeader = (props: Props) => {
|
|||||||
const { displayProperties, displayFilters, handleDisplayFilterUpdate, isEstimateEnabled } = props;
|
const { displayProperties, displayFilters, handleDisplayFilterUpdate, isEstimateEnabled } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<thead className="sticky top-0 left-0 z-[2] border-b-[0.5px] border-custom-border-100">
|
<thead className="sticky top-0 left-0 z-[12] border-b-[0.5px] border-custom-border-100">
|
||||||
<tr>
|
<tr>
|
||||||
<th
|
<th
|
||||||
className="sticky left-0 z-[2] h-11 w-[28rem] flex items-center bg-custom-background-90 text-sm font-medium before:absolute before:h-full before:right-0 before:border-[0.5px] before:border-custom-border-100"
|
className="sticky left-0 z-[15] h-11 w-[28rem] flex items-center bg-custom-background-90 text-sm font-medium before:absolute before:h-full before:right-0 before:border-[0.5px] before:border-custom-border-100"
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
>
|
>
|
||||||
<WithDisplayPropertiesHOC displayProperties={displayProperties} displayPropertyKey="key">
|
<WithDisplayPropertiesHOC displayProperties={displayProperties} displayPropertyKey="key">
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { Signal, Tag, Triangle, LayoutPanelTop, CircleDot, CopyPlus, XCircle, CalendarDays } from "lucide-react";
|
import {
|
||||||
|
Signal,
|
||||||
|
Tag,
|
||||||
|
Triangle,
|
||||||
|
LayoutPanelTop,
|
||||||
|
CircleDot,
|
||||||
|
CopyPlus,
|
||||||
|
XCircle,
|
||||||
|
CalendarClock,
|
||||||
|
CalendarCheck2,
|
||||||
|
} from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueDetail, useProject, useProjectState } from "hooks/store";
|
import { useIssueDetail, useProject, useProjectState } from "hooks/store";
|
||||||
// ui icons
|
// ui icons
|
||||||
@ -118,7 +128,7 @@ export const PeekOverviewProperties: FC<IPeekOverviewProperties> = observer((pro
|
|||||||
{/* start date */}
|
{/* start date */}
|
||||||
<div className="flex w-full items-center gap-3 h-8">
|
<div className="flex w-full items-center gap-3 h-8">
|
||||||
<div className="flex items-center gap-1 w-1/4 flex-shrink-0 text-sm text-custom-text-300">
|
<div className="flex items-center gap-1 w-1/4 flex-shrink-0 text-sm text-custom-text-300">
|
||||||
<CalendarDays className="h-4 w-4 flex-shrink-0" />
|
<CalendarClock className="h-4 w-4 flex-shrink-0" />
|
||||||
<span>Start date</span>
|
<span>Start date</span>
|
||||||
</div>
|
</div>
|
||||||
<DateDropdown
|
<DateDropdown
|
||||||
@ -145,7 +155,7 @@ export const PeekOverviewProperties: FC<IPeekOverviewProperties> = observer((pro
|
|||||||
{/* due date */}
|
{/* due date */}
|
||||||
<div className="flex w-full items-center gap-3 h-8">
|
<div className="flex w-full items-center gap-3 h-8">
|
||||||
<div className="flex items-center gap-1 w-1/4 flex-shrink-0 text-sm text-custom-text-300">
|
<div className="flex items-center gap-1 w-1/4 flex-shrink-0 text-sm text-custom-text-300">
|
||||||
<CalendarDays className="h-4 w-4 flex-shrink-0" />
|
<CalendarCheck2 className="h-4 w-4 flex-shrink-0" />
|
||||||
<span>Due date</span>
|
<span>Due date</span>
|
||||||
</div>
|
</div>
|
||||||
<DateDropdown
|
<DateDropdown
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { IIssueDisplayProperties, TIssue, TIssueOrderByOptions } from "@plane/types";
|
import { IIssueDisplayProperties, TIssue, TIssueOrderByOptions } from "@plane/types";
|
||||||
import { LayersIcon, DoubleCircleIcon, UserGroupIcon, DiceIcon, ContrastIcon } from "@plane/ui";
|
import { LayersIcon, DoubleCircleIcon, UserGroupIcon, DiceIcon, ContrastIcon } from "@plane/ui";
|
||||||
import { CalendarDays, Link2, Signal, Tag, Triangle, Paperclip } from "lucide-react";
|
import { CalendarDays, Link2, Signal, Tag, Triangle, Paperclip, CalendarCheck2, CalendarClock } from "lucide-react";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { ISvgIcons } from "@plane/ui/src/icons/type";
|
import { ISvgIcons } from "@plane/ui/src/icons/type";
|
||||||
import {
|
import {
|
||||||
@ -60,7 +60,7 @@ export const SPREADSHEET_PROPERTY_DETAILS: {
|
|||||||
ascendingOrderTitle: "New",
|
ascendingOrderTitle: "New",
|
||||||
descendingOrderKey: "target_date",
|
descendingOrderKey: "target_date",
|
||||||
descendingOrderTitle: "Old",
|
descendingOrderTitle: "Old",
|
||||||
icon: CalendarDays,
|
icon: CalendarCheck2,
|
||||||
Column: SpreadsheetDueDateColumn,
|
Column: SpreadsheetDueDateColumn,
|
||||||
},
|
},
|
||||||
estimate: {
|
estimate: {
|
||||||
@ -114,7 +114,7 @@ export const SPREADSHEET_PROPERTY_DETAILS: {
|
|||||||
ascendingOrderTitle: "New",
|
ascendingOrderTitle: "New",
|
||||||
descendingOrderKey: "start_date",
|
descendingOrderKey: "start_date",
|
||||||
descendingOrderTitle: "Old",
|
descendingOrderTitle: "Old",
|
||||||
icon: CalendarDays,
|
icon: CalendarClock,
|
||||||
Column: SpreadsheetStartDateColumn,
|
Column: SpreadsheetStartDateColumn,
|
||||||
},
|
},
|
||||||
state: {
|
state: {
|
||||||
|
@ -9,13 +9,13 @@ export const usePage = (pageId: string) => {
|
|||||||
const { projectPageMap, projectArchivedPageMap } = context.projectPages;
|
const { projectPageMap, projectArchivedPageMap } = context.projectPages;
|
||||||
|
|
||||||
const { projectId, workspaceSlug } = context.app.router;
|
const { projectId, workspaceSlug } = context.app.router;
|
||||||
if (!projectId || !workspaceSlug) throw new Error("usePage must be used within ProjectProvider");
|
if (!projectId || !workspaceSlug) {
|
||||||
|
console.log("usePage must be used within ProjectProvider");
|
||||||
if (projectPageMap[projectId] && projectPageMap[projectId][pageId]) {
|
|
||||||
return projectPageMap[projectId][pageId];
|
|
||||||
} else if (projectArchivedPageMap[projectId] && projectArchivedPageMap[projectId][pageId]) {
|
|
||||||
return projectArchivedPageMap[projectId][pageId];
|
|
||||||
} else {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (projectPageMap[projectId] && projectPageMap[projectId][pageId]) return projectPageMap[projectId][pageId];
|
||||||
|
else if (projectArchivedPageMap[projectId] && projectArchivedPageMap[projectId][pageId])
|
||||||
|
return projectArchivedPageMap[projectId][pageId];
|
||||||
|
else return;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user