Merge branch 'develop' of github.com:makeplane/plane into chore/event-improvements

This commit is contained in:
pablohashescobar 2024-03-11 20:32:41 +05:30
commit 84a62890a4
5 changed files with 24 additions and 11 deletions

View File

@ -44,7 +44,10 @@ export const DateFilterModal: React.FC<Props> = ({ title, handleClose, isOpen, o
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 (
<Transition.Root show={isOpen} as={Fragment}>
@ -91,7 +94,10 @@ export const DateFilterModal: React.FC<Props> = ({ title, handleClose, isOpen, o
<DayPicker
selected={value ? new Date(value) : undefined}
defaultMonth={value ? new Date(value) : undefined}
onSelect={(date) => onChange(date)}
onSelect={(date) => {
if (!date) return;
onChange(date);
}}
mode="single"
disabled={[{ after: new Date(watch("date2")) }]}
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
selected={value ? new Date(value) : undefined}
defaultMonth={value ? new Date(value) : undefined}
onSelect={(date) => onChange(date)}
onSelect={(date) => {
if (!date) return;
onChange(date);
}}
mode="single"
disabled={[{ before: new Date(watch("date1")) }]}
className="border border-custom-border-200 p-3 rounded-md"

View File

@ -39,6 +39,10 @@ export const EmptyState: React.FC<EmptyStateProps> = (props) => {
} = useUser();
// theme
const { resolvedTheme } = useTheme();
// if empty state type is not found
if (!EMPTY_STATE_DETAILS[type]) return null;
// current empty state details
const { key, title, description, path, primaryButton, secondaryButton, accessType, access } =
EMPTY_STATE_DETAILS[type];

View File

@ -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" && (
<Crown className="h-3.5 w-3.5 text-amber-400" />
)}

View File

@ -1,6 +1,6 @@
import { linearGradientDef } from "@nivo/core";
// assets
import { BarChart2, Briefcase, CheckCircle, LayoutGrid } from "lucide-react";
import { BarChart2, Briefcase, CheckCircle, Home } from "lucide-react";
import { ContrastIcon } from "@plane/ui";
import { Props } from "components/icons/types";
import CompletedIssuesDark from "public/empty-state/dashboard/dark/completed-issues.svg";
@ -257,12 +257,12 @@ export const SIDEBAR_MENU_ITEMS: {
Icon: React.FC<Props>;
}[] = [
{
key: "dashboard",
label: "Dashboard",
key: "home",
label: "Home",
href: ``,
access: EUserWorkspaceRoles.GUEST,
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}`,
Icon: LayoutGrid,
Icon: Home,
},
{
key: "analytics",

View File

@ -69,7 +69,7 @@ export enum EmptyStateType {
PROJECT_VIEW = "project-view",
PROJECT_PAGE = "project-page",
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_SHARED = "project-page-shared",
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!",
path: "/empty-state/pages/all",
},
"project-page-favorite": {
key: "project-page-favorite",
"project-page-favorites": {
key: "project-page-favorites",
title: "No favorite pages yet",
description: "Favorites for quick access? mark them and find them right here.",
path: "/empty-state/pages/favorites",