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 chore/event-improvements
This commit is contained in:
commit
84a62890a4
@ -44,7 +44,10 @@ export const DateFilterModal: React.FC<Props> = ({ title, handleClose, isOpen, o
|
|||||||
handleClose();
|
handleClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
const isInvalid = watch("filterType") === "range" ? new Date(watch("date1")) > new Date(watch("date2")) : false;
|
const date1 = watch("date1");
|
||||||
|
const date2 = watch("date2");
|
||||||
|
|
||||||
|
const isInvalid = watch("filterType") === "range" ? new Date(date1) > new Date(date2) : false;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Transition.Root show={isOpen} as={Fragment}>
|
<Transition.Root show={isOpen} as={Fragment}>
|
||||||
@ -91,7 +94,10 @@ export const DateFilterModal: React.FC<Props> = ({ title, handleClose, isOpen, o
|
|||||||
<DayPicker
|
<DayPicker
|
||||||
selected={value ? new Date(value) : undefined}
|
selected={value ? new Date(value) : undefined}
|
||||||
defaultMonth={value ? new Date(value) : undefined}
|
defaultMonth={value ? new Date(value) : undefined}
|
||||||
onSelect={(date) => onChange(date)}
|
onSelect={(date) => {
|
||||||
|
if (!date) return;
|
||||||
|
onChange(date);
|
||||||
|
}}
|
||||||
mode="single"
|
mode="single"
|
||||||
disabled={[{ after: new Date(watch("date2")) }]}
|
disabled={[{ after: new Date(watch("date2")) }]}
|
||||||
className="border border-custom-border-200 p-3 rounded-md"
|
className="border border-custom-border-200 p-3 rounded-md"
|
||||||
@ -106,7 +112,10 @@ export const DateFilterModal: React.FC<Props> = ({ title, handleClose, isOpen, o
|
|||||||
<DayPicker
|
<DayPicker
|
||||||
selected={value ? new Date(value) : undefined}
|
selected={value ? new Date(value) : undefined}
|
||||||
defaultMonth={value ? new Date(value) : undefined}
|
defaultMonth={value ? new Date(value) : undefined}
|
||||||
onSelect={(date) => onChange(date)}
|
onSelect={(date) => {
|
||||||
|
if (!date) return;
|
||||||
|
onChange(date);
|
||||||
|
}}
|
||||||
mode="single"
|
mode="single"
|
||||||
disabled={[{ before: new Date(watch("date1")) }]}
|
disabled={[{ before: new Date(watch("date1")) }]}
|
||||||
className="border border-custom-border-200 p-3 rounded-md"
|
className="border border-custom-border-200 p-3 rounded-md"
|
||||||
|
@ -39,6 +39,10 @@ export const EmptyState: React.FC<EmptyStateProps> = (props) => {
|
|||||||
} = useUser();
|
} = useUser();
|
||||||
// theme
|
// theme
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
|
|
||||||
|
// if empty state type is not found
|
||||||
|
if (!EMPTY_STATE_DETAILS[type]) return null;
|
||||||
|
|
||||||
// current empty state details
|
// current empty state details
|
||||||
const { key, title, description, path, primaryButton, secondaryButton, accessType, access } =
|
const { key, title, description, path, primaryButton, secondaryButton, accessType, access } =
|
||||||
EMPTY_STATE_DETAILS[type];
|
EMPTY_STATE_DETAILS[type];
|
||||||
|
@ -65,7 +65,7 @@ export const WorkspaceSidebarMenu = observer(() => {
|
|||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{!themeStore?.sidebarCollapsed && link.label}
|
<p className="leading-5">{!themeStore?.sidebarCollapsed && link.label}</p>
|
||||||
{!themeStore?.sidebarCollapsed && link.key === "active-cycles" && (
|
{!themeStore?.sidebarCollapsed && link.key === "active-cycles" && (
|
||||||
<Crown className="h-3.5 w-3.5 text-amber-400" />
|
<Crown className="h-3.5 w-3.5 text-amber-400" />
|
||||||
)}
|
)}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { linearGradientDef } from "@nivo/core";
|
import { linearGradientDef } from "@nivo/core";
|
||||||
// assets
|
// assets
|
||||||
import { BarChart2, Briefcase, CheckCircle, LayoutGrid } from "lucide-react";
|
import { BarChart2, Briefcase, CheckCircle, Home } from "lucide-react";
|
||||||
import { ContrastIcon } from "@plane/ui";
|
import { ContrastIcon } from "@plane/ui";
|
||||||
import { Props } from "components/icons/types";
|
import { Props } from "components/icons/types";
|
||||||
import CompletedIssuesDark from "public/empty-state/dashboard/dark/completed-issues.svg";
|
import CompletedIssuesDark from "public/empty-state/dashboard/dark/completed-issues.svg";
|
||||||
@ -257,12 +257,12 @@ export const SIDEBAR_MENU_ITEMS: {
|
|||||||
Icon: React.FC<Props>;
|
Icon: React.FC<Props>;
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
key: "dashboard",
|
key: "home",
|
||||||
label: "Dashboard",
|
label: "Home",
|
||||||
href: ``,
|
href: ``,
|
||||||
access: EUserWorkspaceRoles.GUEST,
|
access: EUserWorkspaceRoles.GUEST,
|
||||||
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}`,
|
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}`,
|
||||||
Icon: LayoutGrid,
|
Icon: Home,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "analytics",
|
key: "analytics",
|
||||||
|
@ -69,7 +69,7 @@ export enum EmptyStateType {
|
|||||||
PROJECT_VIEW = "project-view",
|
PROJECT_VIEW = "project-view",
|
||||||
PROJECT_PAGE = "project-page",
|
PROJECT_PAGE = "project-page",
|
||||||
PROJECT_PAGE_ALL = "project-page-all",
|
PROJECT_PAGE_ALL = "project-page-all",
|
||||||
PROJECT_PAGE_FAVORITE = "project-page-favorite",
|
PROJECT_PAGE_FAVORITE = "project-page-favorites",
|
||||||
PROJECT_PAGE_PRIVATE = "project-page-private",
|
PROJECT_PAGE_PRIVATE = "project-page-private",
|
||||||
PROJECT_PAGE_SHARED = "project-page-shared",
|
PROJECT_PAGE_SHARED = "project-page-shared",
|
||||||
PROJECT_PAGE_ARCHIVED = "project-page-archived",
|
PROJECT_PAGE_ARCHIVED = "project-page-archived",
|
||||||
@ -475,8 +475,8 @@ const emptyStateDetails = {
|
|||||||
"Pages help you organise your thoughts to create wikis, discussions or even document heated takes for your project. Use it wisely!",
|
"Pages help you organise your thoughts to create wikis, discussions or even document heated takes for your project. Use it wisely!",
|
||||||
path: "/empty-state/pages/all",
|
path: "/empty-state/pages/all",
|
||||||
},
|
},
|
||||||
"project-page-favorite": {
|
"project-page-favorites": {
|
||||||
key: "project-page-favorite",
|
key: "project-page-favorites",
|
||||||
title: "No favorite pages yet",
|
title: "No favorite pages yet",
|
||||||
description: "Favorites for quick access? mark them and find them right here.",
|
description: "Favorites for quick access? mark them and find them right here.",
|
||||||
path: "/empty-state/pages/favorites",
|
path: "/empty-state/pages/favorites",
|
||||||
|
Loading…
Reference in New Issue
Block a user