mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: calendar filters and handled kanban issue empty state dnd error
This commit is contained in:
parent
d0d106901e
commit
39d1916ab2
@ -16,7 +16,6 @@ import {
|
|||||||
IViewIssuesFilterStore,
|
IViewIssuesFilterStore,
|
||||||
IViewIssuesStore,
|
IViewIssuesStore,
|
||||||
} from "store/issues";
|
} from "store/issues";
|
||||||
import { IIssueCalendarViewStore } from "store/issue";
|
|
||||||
import { IQuickActionProps } from "../list/list-view-types";
|
import { IQuickActionProps } from "../list/list-view-types";
|
||||||
import { EIssueActions } from "../types";
|
import { EIssueActions } from "../types";
|
||||||
import { IGroupedIssues } from "store/issues/types";
|
import { IGroupedIssues } from "store/issues/types";
|
||||||
@ -28,7 +27,6 @@ interface IBaseCalendarRoot {
|
|||||||
| IModuleIssuesFilterStore
|
| IModuleIssuesFilterStore
|
||||||
| ICycleIssuesFilterStore
|
| ICycleIssuesFilterStore
|
||||||
| IViewIssuesFilterStore;
|
| IViewIssuesFilterStore;
|
||||||
calendarViewStore: IIssueCalendarViewStore;
|
|
||||||
QuickActions: FC<IQuickActionProps>;
|
QuickActions: FC<IQuickActionProps>;
|
||||||
issueActions: {
|
issueActions: {
|
||||||
[EIssueActions.DELETE]: (issue: IIssue) => Promise<void>;
|
[EIssueActions.DELETE]: (issue: IIssue) => Promise<void>;
|
||||||
@ -77,6 +75,7 @@ export const BaseCalendarRoot = observer((props: IBaseCalendarRoot) => {
|
|||||||
<div className="h-full w-full pt-4 bg-custom-background-100 overflow-hidden">
|
<div className="h-full w-full pt-4 bg-custom-background-100 overflow-hidden">
|
||||||
<DragDropContext onDragEnd={onDragEnd}>
|
<DragDropContext onDragEnd={onDragEnd}>
|
||||||
<CalendarChart
|
<CalendarChart
|
||||||
|
issuesFilterStore={issuesFilterStore}
|
||||||
issues={issues}
|
issues={issues}
|
||||||
groupedIssueIds={groupedIssueIds}
|
groupedIssueIds={groupedIssueIds}
|
||||||
layout={displayFilters?.calendar?.layout}
|
layout={displayFilters?.calendar?.layout}
|
||||||
|
@ -10,8 +10,19 @@ import { Spinner } from "@plane/ui";
|
|||||||
import { ICalendarWeek } from "./types";
|
import { ICalendarWeek } from "./types";
|
||||||
import { IIssue } from "types";
|
import { IIssue } from "types";
|
||||||
import { IGroupedIssues, IIssueResponse } from "store/issues/types";
|
import { IGroupedIssues, IIssueResponse } from "store/issues/types";
|
||||||
|
import {
|
||||||
|
ICycleIssuesFilterStore,
|
||||||
|
IModuleIssuesFilterStore,
|
||||||
|
IProjectIssuesFilterStore,
|
||||||
|
IViewIssuesFilterStore,
|
||||||
|
} from "store/issues";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
issuesFilterStore:
|
||||||
|
| IProjectIssuesFilterStore
|
||||||
|
| IModuleIssuesFilterStore
|
||||||
|
| ICycleIssuesFilterStore
|
||||||
|
| IViewIssuesFilterStore;
|
||||||
issues: IIssueResponse | undefined;
|
issues: IIssueResponse | undefined;
|
||||||
groupedIssueIds: IGroupedIssues;
|
groupedIssueIds: IGroupedIssues;
|
||||||
layout: "month" | "week" | undefined;
|
layout: "month" | "week" | undefined;
|
||||||
@ -27,7 +38,8 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const CalendarChart: React.FC<Props> = observer((props) => {
|
export const CalendarChart: React.FC<Props> = observer((props) => {
|
||||||
const { issues, groupedIssueIds, layout, showWeekends, quickActions, quickAddCallback, viewId } = props;
|
const { issuesFilterStore, issues, groupedIssueIds, layout, showWeekends, quickActions, quickAddCallback, viewId } =
|
||||||
|
props;
|
||||||
|
|
||||||
const { calendar: calendarStore } = useMobxStore();
|
const { calendar: calendarStore } = useMobxStore();
|
||||||
|
|
||||||
@ -45,7 +57,7 @@ export const CalendarChart: React.FC<Props> = observer((props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="h-full w-full flex flex-col overflow-hidden">
|
<div className="h-full w-full flex flex-col overflow-hidden">
|
||||||
<CalendarHeader />
|
<CalendarHeader issuesFilterStore={issuesFilterStore} />
|
||||||
<CalendarWeekHeader isLoading={!issues} showWeekends={showWeekends} />
|
<CalendarWeekHeader isLoading={!issues} showWeekends={showWeekends} />
|
||||||
<div className="h-full w-full overflow-y-auto">
|
<div className="h-full w-full overflow-y-auto">
|
||||||
{layout === "month" && (
|
{layout === "month" && (
|
||||||
@ -53,6 +65,7 @@ export const CalendarChart: React.FC<Props> = observer((props) => {
|
|||||||
{allWeeksOfActiveMonth &&
|
{allWeeksOfActiveMonth &&
|
||||||
Object.values(allWeeksOfActiveMonth).map((week: ICalendarWeek, weekIndex) => (
|
Object.values(allWeeksOfActiveMonth).map((week: ICalendarWeek, weekIndex) => (
|
||||||
<CalendarWeekDays
|
<CalendarWeekDays
|
||||||
|
issuesFilterStore={issuesFilterStore}
|
||||||
key={weekIndex}
|
key={weekIndex}
|
||||||
week={week}
|
week={week}
|
||||||
issues={issues}
|
issues={issues}
|
||||||
@ -67,6 +80,7 @@ export const CalendarChart: React.FC<Props> = observer((props) => {
|
|||||||
)}
|
)}
|
||||||
{layout === "week" && (
|
{layout === "week" && (
|
||||||
<CalendarWeekDays
|
<CalendarWeekDays
|
||||||
|
issuesFilterStore={issuesFilterStore}
|
||||||
week={calendarStore.allDaysOfActiveWeek}
|
week={calendarStore.allDaysOfActiveWeek}
|
||||||
issues={issues}
|
issues={issues}
|
||||||
groupedIssueIds={groupedIssueIds}
|
groupedIssueIds={groupedIssueIds}
|
||||||
|
@ -11,8 +11,19 @@ import { renderDateFormat } from "helpers/date-time.helper";
|
|||||||
import { MONTHS_LIST } from "constants/calendar";
|
import { MONTHS_LIST } from "constants/calendar";
|
||||||
import { IIssue } from "types";
|
import { IIssue } from "types";
|
||||||
import { IGroupedIssues, IIssueResponse } from "store/issues/types";
|
import { IGroupedIssues, IIssueResponse } from "store/issues/types";
|
||||||
|
import {
|
||||||
|
ICycleIssuesFilterStore,
|
||||||
|
IModuleIssuesFilterStore,
|
||||||
|
IProjectIssuesFilterStore,
|
||||||
|
IViewIssuesFilterStore,
|
||||||
|
} from "store/issues";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
issuesFilterStore:
|
||||||
|
| IProjectIssuesFilterStore
|
||||||
|
| IModuleIssuesFilterStore
|
||||||
|
| ICycleIssuesFilterStore
|
||||||
|
| IViewIssuesFilterStore;
|
||||||
date: ICalendarDate;
|
date: ICalendarDate;
|
||||||
issues: IIssueResponse | undefined;
|
issues: IIssueResponse | undefined;
|
||||||
groupedIssueIds: IGroupedIssues;
|
groupedIssueIds: IGroupedIssues;
|
||||||
@ -28,11 +39,18 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const CalendarDayTile: React.FC<Props> = observer((props) => {
|
export const CalendarDayTile: React.FC<Props> = observer((props) => {
|
||||||
const { date, issues, groupedIssueIds, quickActions, enableQuickIssueCreate, quickAddCallback, viewId } = props;
|
const {
|
||||||
|
issuesFilterStore,
|
||||||
|
date,
|
||||||
|
issues,
|
||||||
|
groupedIssueIds,
|
||||||
|
quickActions,
|
||||||
|
enableQuickIssueCreate,
|
||||||
|
quickAddCallback,
|
||||||
|
viewId,
|
||||||
|
} = props;
|
||||||
|
|
||||||
const { issueFilter: issueFilterStore } = useMobxStore();
|
const calendarLayout = issuesFilterStore?.issueFilters?.displayFilters?.calendar?.layout ?? "month";
|
||||||
|
|
||||||
const calendarLayout = issueFilterStore.userDisplayFilters.calendar?.layout ?? "month";
|
|
||||||
|
|
||||||
const issueIdList = groupedIssueIds ? groupedIssueIds[renderDateFormat(date.date)] : null;
|
const issueIdList = groupedIssueIds ? groupedIssueIds[renderDateFormat(date.date)] : null;
|
||||||
|
|
||||||
|
@ -13,12 +13,29 @@ import { Check, ChevronUp } from "lucide-react";
|
|||||||
import { TCalendarLayouts } from "types";
|
import { TCalendarLayouts } from "types";
|
||||||
// constants
|
// constants
|
||||||
import { CALENDAR_LAYOUTS } from "constants/calendar";
|
import { CALENDAR_LAYOUTS } from "constants/calendar";
|
||||||
|
import { EFilterType } from "store/issues/types";
|
||||||
|
import {
|
||||||
|
ICycleIssuesFilterStore,
|
||||||
|
IModuleIssuesFilterStore,
|
||||||
|
IProjectIssuesFilterStore,
|
||||||
|
IViewIssuesFilterStore,
|
||||||
|
} from "store/issues";
|
||||||
|
|
||||||
|
interface ICalendarHeader {
|
||||||
|
issuesFilterStore:
|
||||||
|
| IProjectIssuesFilterStore
|
||||||
|
| IModuleIssuesFilterStore
|
||||||
|
| ICycleIssuesFilterStore
|
||||||
|
| IViewIssuesFilterStore;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const CalendarOptionsDropdown: React.FC<ICalendarHeader> = observer((props) => {
|
||||||
|
const { issuesFilterStore } = props;
|
||||||
|
|
||||||
export const CalendarOptionsDropdown: React.FC = observer(() => {
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { workspaceSlug, projectId } = router.query;
|
const { workspaceSlug, projectId } = router.query;
|
||||||
|
|
||||||
const { issueFilter: issueFilterStore, calendar: calendarStore } = useMobxStore();
|
const { calendar: calendarStore } = useMobxStore();
|
||||||
|
|
||||||
const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);
|
const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);
|
||||||
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
|
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
|
||||||
@ -35,19 +52,17 @@ export const CalendarOptionsDropdown: React.FC = observer(() => {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const calendarLayout = issueFilterStore.userDisplayFilters.calendar?.layout ?? "month";
|
const calendarLayout = issuesFilterStore.issueFilters?.displayFilters?.calendar?.layout ?? "month";
|
||||||
const showWeekends = issueFilterStore.userDisplayFilters.calendar?.show_weekends ?? false;
|
const showWeekends = issuesFilterStore.issueFilters?.displayFilters?.calendar?.show_weekends ?? false;
|
||||||
|
|
||||||
const handleLayoutChange = (layout: TCalendarLayouts) => {
|
const handleLayoutChange = (layout: TCalendarLayouts) => {
|
||||||
if (!workspaceSlug || !projectId) return;
|
if (!workspaceSlug || !projectId) return;
|
||||||
|
|
||||||
issueFilterStore.updateUserFilters(workspaceSlug.toString(), projectId.toString(), {
|
issuesFilterStore.updateFilters(workspaceSlug.toString(), projectId.toString(), EFilterType.DISPLAY_FILTERS, {
|
||||||
display_filters: {
|
|
||||||
calendar: {
|
calendar: {
|
||||||
...issueFilterStore.userDisplayFilters.calendar,
|
...issuesFilterStore.issueFilters?.displayFilters?.calendar,
|
||||||
layout,
|
layout,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
calendarStore.updateCalendarPayload(
|
calendarStore.updateCalendarPayload(
|
||||||
@ -56,17 +71,15 @@ export const CalendarOptionsDropdown: React.FC = observer(() => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleToggleWeekends = () => {
|
const handleToggleWeekends = () => {
|
||||||
const showWeekends = issueFilterStore.userDisplayFilters.calendar?.show_weekends ?? false;
|
const showWeekends = issuesFilterStore.issueFilters?.displayFilters?.calendar?.show_weekends ?? false;
|
||||||
|
|
||||||
if (!workspaceSlug || !projectId) return;
|
if (!workspaceSlug || !projectId) return;
|
||||||
|
|
||||||
issueFilterStore.updateUserFilters(workspaceSlug.toString(), projectId.toString(), {
|
issuesFilterStore.updateFilters(workspaceSlug.toString(), projectId.toString(), EFilterType.DISPLAY_FILTERS, {
|
||||||
display_filters: {
|
|
||||||
calendar: {
|
calendar: {
|
||||||
...issueFilterStore.userDisplayFilters.calendar,
|
...issuesFilterStore.issueFilters?.displayFilters?.calendar,
|
||||||
show_weekends: !showWeekends,
|
show_weekends: !showWeekends,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,8 +6,24 @@ import { useMobxStore } from "lib/mobx/store-provider";
|
|||||||
import { CalendarMonthsDropdown, CalendarOptionsDropdown } from "components/issues";
|
import { CalendarMonthsDropdown, CalendarOptionsDropdown } from "components/issues";
|
||||||
// icons
|
// icons
|
||||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
|
import {
|
||||||
|
ICycleIssuesFilterStore,
|
||||||
|
IModuleIssuesFilterStore,
|
||||||
|
IProjectIssuesFilterStore,
|
||||||
|
IViewIssuesFilterStore,
|
||||||
|
} from "store/issues";
|
||||||
|
|
||||||
|
interface ICalendarHeader {
|
||||||
|
issuesFilterStore:
|
||||||
|
| IProjectIssuesFilterStore
|
||||||
|
| IModuleIssuesFilterStore
|
||||||
|
| ICycleIssuesFilterStore
|
||||||
|
| IViewIssuesFilterStore;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const CalendarHeader: React.FC<ICalendarHeader> = observer((props) => {
|
||||||
|
const { issuesFilterStore } = props;
|
||||||
|
|
||||||
export const CalendarHeader: React.FC = observer(() => {
|
|
||||||
const { issueFilter: issueFilterStore, calendar: calendarStore } = useMobxStore();
|
const { issueFilter: issueFilterStore, calendar: calendarStore } = useMobxStore();
|
||||||
|
|
||||||
const calendarLayout = issueFilterStore.userDisplayFilters.calendar?.layout ?? "month";
|
const calendarLayout = issueFilterStore.userDisplayFilters.calendar?.layout ?? "month";
|
||||||
@ -91,7 +107,7 @@ export const CalendarHeader: React.FC = observer(() => {
|
|||||||
>
|
>
|
||||||
Today
|
Today
|
||||||
</button>
|
</button>
|
||||||
<CalendarOptionsDropdown />
|
<CalendarOptionsDropdown issuesFilterStore={issuesFilterStore} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -13,7 +13,6 @@ export const CycleCalendarLayout: React.FC = observer(() => {
|
|||||||
const {
|
const {
|
||||||
cycleIssues: cycleIssueStore,
|
cycleIssues: cycleIssueStore,
|
||||||
cycleIssuesFilter: cycleIssueFilterStore,
|
cycleIssuesFilter: cycleIssueFilterStore,
|
||||||
cycleIssueCalendarView: cycleIssueCalendarViewStore,
|
|
||||||
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
||||||
} = useMobxStore();
|
} = useMobxStore();
|
||||||
|
|
||||||
@ -62,7 +61,6 @@ export const CycleCalendarLayout: React.FC = observer(() => {
|
|||||||
<BaseCalendarRoot
|
<BaseCalendarRoot
|
||||||
issueStore={cycleIssueStore}
|
issueStore={cycleIssueStore}
|
||||||
issuesFilterStore={cycleIssueFilterStore}
|
issuesFilterStore={cycleIssueFilterStore}
|
||||||
calendarViewStore={cycleIssueCalendarViewStore}
|
|
||||||
QuickActions={CycleIssueQuickActions}
|
QuickActions={CycleIssueQuickActions}
|
||||||
issueActions={issueActions}
|
issueActions={issueActions}
|
||||||
viewId={cycleId.toString()}
|
viewId={cycleId.toString()}
|
||||||
|
@ -13,7 +13,6 @@ export const ModuleCalendarLayout: React.FC = observer(() => {
|
|||||||
const {
|
const {
|
||||||
moduleIssues: moduleIssueStore,
|
moduleIssues: moduleIssueStore,
|
||||||
moduleIssuesFilter: moduleIssueFilterStore,
|
moduleIssuesFilter: moduleIssueFilterStore,
|
||||||
moduleIssueCalendarView: moduleIssueCalendarViewStore,
|
|
||||||
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
||||||
} = useMobxStore();
|
} = useMobxStore();
|
||||||
|
|
||||||
@ -56,7 +55,6 @@ export const ModuleCalendarLayout: React.FC = observer(() => {
|
|||||||
<BaseCalendarRoot
|
<BaseCalendarRoot
|
||||||
issueStore={moduleIssueStore}
|
issueStore={moduleIssueStore}
|
||||||
issuesFilterStore={moduleIssueFilterStore}
|
issuesFilterStore={moduleIssueFilterStore}
|
||||||
calendarViewStore={moduleIssueCalendarViewStore}
|
|
||||||
QuickActions={ModuleIssueQuickActions}
|
QuickActions={ModuleIssueQuickActions}
|
||||||
issueActions={issueActions}
|
issueActions={issueActions}
|
||||||
viewId={moduleId}
|
viewId={moduleId}
|
||||||
|
@ -14,7 +14,6 @@ export const CalendarLayout: React.FC = observer(() => {
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
projectIssues: issueStore,
|
projectIssues: issueStore,
|
||||||
issueCalendarView: issueCalendarViewStore,
|
|
||||||
projectIssuesFilter: projectIssueFiltersStore,
|
projectIssuesFilter: projectIssueFiltersStore,
|
||||||
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
||||||
} = useMobxStore();
|
} = useMobxStore();
|
||||||
@ -49,7 +48,6 @@ export const CalendarLayout: React.FC = observer(() => {
|
|||||||
<BaseCalendarRoot
|
<BaseCalendarRoot
|
||||||
issueStore={issueStore}
|
issueStore={issueStore}
|
||||||
issuesFilterStore={projectIssueFiltersStore}
|
issuesFilterStore={projectIssueFiltersStore}
|
||||||
calendarViewStore={issueCalendarViewStore}
|
|
||||||
QuickActions={ProjectIssueQuickActions}
|
QuickActions={ProjectIssueQuickActions}
|
||||||
issueActions={issueActions}
|
issueActions={issueActions}
|
||||||
handleDragDrop={handleDragDrop}
|
handleDragDrop={handleDragDrop}
|
||||||
|
@ -13,7 +13,6 @@ export const ProjectViewCalendarLayout: React.FC = observer(() => {
|
|||||||
const {
|
const {
|
||||||
viewIssues: projectViewIssuesStore,
|
viewIssues: projectViewIssuesStore,
|
||||||
viewIssuesFilter: projectIssueViewFiltersStore,
|
viewIssuesFilter: projectIssueViewFiltersStore,
|
||||||
projectViewIssueCalendarView: projectViewIssueCalendarViewStore,
|
|
||||||
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
calendarHelpers: { handleDragDrop: handleCalenderDragDrop },
|
||||||
} = useMobxStore();
|
} = useMobxStore();
|
||||||
|
|
||||||
@ -50,7 +49,6 @@ export const ProjectViewCalendarLayout: React.FC = observer(() => {
|
|||||||
<BaseCalendarRoot
|
<BaseCalendarRoot
|
||||||
issueStore={projectViewIssuesStore}
|
issueStore={projectViewIssuesStore}
|
||||||
issuesFilterStore={projectIssueViewFiltersStore}
|
issuesFilterStore={projectIssueViewFiltersStore}
|
||||||
calendarViewStore={projectViewIssueCalendarViewStore}
|
|
||||||
QuickActions={ProjectIssueQuickActions}
|
QuickActions={ProjectIssueQuickActions}
|
||||||
issueActions={issueActions}
|
issueActions={issueActions}
|
||||||
handleDragDrop={handleDragDrop}
|
handleDragDrop={handleDragDrop}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
|
|
||||||
// mobx store
|
|
||||||
import { useMobxStore } from "lib/mobx/store-provider";
|
|
||||||
// components
|
// components
|
||||||
import { CalendarDayTile } from "components/issues";
|
import { CalendarDayTile } from "components/issues";
|
||||||
// helpers
|
// helpers
|
||||||
@ -10,8 +7,19 @@ import { renderDateFormat } from "helpers/date-time.helper";
|
|||||||
import { ICalendarDate, ICalendarWeek } from "./types";
|
import { ICalendarDate, ICalendarWeek } from "./types";
|
||||||
import { IIssue } from "types";
|
import { IIssue } from "types";
|
||||||
import { IGroupedIssues, IIssueResponse } from "store/issues/types";
|
import { IGroupedIssues, IIssueResponse } from "store/issues/types";
|
||||||
|
import {
|
||||||
|
ICycleIssuesFilterStore,
|
||||||
|
IModuleIssuesFilterStore,
|
||||||
|
IProjectIssuesFilterStore,
|
||||||
|
IViewIssuesFilterStore,
|
||||||
|
} from "store/issues";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
issuesFilterStore:
|
||||||
|
| IProjectIssuesFilterStore
|
||||||
|
| IModuleIssuesFilterStore
|
||||||
|
| ICycleIssuesFilterStore
|
||||||
|
| IViewIssuesFilterStore;
|
||||||
issues: IIssueResponse | undefined;
|
issues: IIssueResponse | undefined;
|
||||||
groupedIssueIds: IGroupedIssues;
|
groupedIssueIds: IGroupedIssues;
|
||||||
week: ICalendarWeek | undefined;
|
week: ICalendarWeek | undefined;
|
||||||
@ -27,12 +35,19 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const CalendarWeekDays: React.FC<Props> = observer((props) => {
|
export const CalendarWeekDays: React.FC<Props> = observer((props) => {
|
||||||
const { issues, groupedIssueIds, week, quickActions, enableQuickIssueCreate, quickAddCallback, viewId } = props;
|
const {
|
||||||
|
issuesFilterStore,
|
||||||
|
issues,
|
||||||
|
groupedIssueIds,
|
||||||
|
week,
|
||||||
|
quickActions,
|
||||||
|
enableQuickIssueCreate,
|
||||||
|
quickAddCallback,
|
||||||
|
viewId,
|
||||||
|
} = props;
|
||||||
|
|
||||||
const { issueFilter: issueFilterStore } = useMobxStore();
|
const calendarLayout = issuesFilterStore?.issueFilters?.displayFilters?.calendar?.layout ?? "month";
|
||||||
|
const showWeekends = issuesFilterStore?.issueFilters?.displayFilters?.calendar?.show_weekends ?? false;
|
||||||
const calendarLayout = issueFilterStore.userDisplayFilters.calendar?.layout ?? "month";
|
|
||||||
const showWeekends = issueFilterStore.userDisplayFilters.calendar?.show_weekends ?? false;
|
|
||||||
|
|
||||||
if (!week) return null;
|
if (!week) return null;
|
||||||
|
|
||||||
@ -47,6 +62,7 @@ export const CalendarWeekDays: React.FC<Props> = observer((props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<CalendarDayTile
|
<CalendarDayTile
|
||||||
|
issuesFilterStore={issuesFilterStore}
|
||||||
key={renderDateFormat(date.date)}
|
key={renderDateFormat(date.date)}
|
||||||
date={date}
|
date={date}
|
||||||
issues={issues}
|
issues={issues}
|
||||||
|
@ -147,7 +147,6 @@ const GroupByKanBan: React.FC<IGroupByKanBan> = observer((props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Droppable>
|
</Droppable>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex-shrink-0 w-full bg-custom-background-90 py-1 sticky bottom-0 z-[0]">
|
<div className="flex-shrink-0 w-full bg-custom-background-90 py-1 sticky bottom-0 z-[0]">
|
||||||
{enableQuickIssueCreate && (
|
{enableQuickIssueCreate && (
|
||||||
@ -164,6 +163,7 @@ const GroupByKanBan: React.FC<IGroupByKanBan> = observer((props) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* {isDragStarted && isDragDisabled && (
|
{/* {isDragStarted && isDragDisabled && (
|
||||||
<div className="invisible group-hover:visible transition-all text-sm absolute top-12 bottom-10 left-0 right-0 bg-custom-background-100/40 text-center">
|
<div className="invisible group-hover:visible transition-all text-sm absolute top-12 bottom-10 left-0 right-0 bg-custom-background-100/40 text-center">
|
||||||
|
Loading…
Reference in New Issue
Block a user