mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: layout change not working in cycles and modules (#3729)
This commit is contained in:
parent
95871b0049
commit
3efb7fc070
@ -76,7 +76,7 @@ export const CalendarChart: React.FC<Props> = observer((props) => {
|
|||||||
<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" && (
|
||||||
<div className="grid h-full w-full grid-cols-1 divide-y-[0.5px] divide-custom-border-400">
|
<div className="grid h-full w-full grid-cols-1 divide-y-[0.5px] divide-custom-border-200">
|
||||||
{allWeeksOfActiveMonth &&
|
{allWeeksOfActiveMonth &&
|
||||||
Object.values(allWeeksOfActiveMonth).map((week: ICalendarWeek, weekIndex) => (
|
Object.values(allWeeksOfActiveMonth).map((week: ICalendarWeek, weekIndex) => (
|
||||||
<CalendarWeekDays
|
<CalendarWeekDays
|
||||||
|
@ -53,12 +53,18 @@ export const CalendarOptionsDropdown: React.FC<ICalendarHeader> = observer((prop
|
|||||||
const handleLayoutChange = (layout: TCalendarLayouts) => {
|
const handleLayoutChange = (layout: TCalendarLayouts) => {
|
||||||
if (!workspaceSlug || !projectId) return;
|
if (!workspaceSlug || !projectId) return;
|
||||||
|
|
||||||
issuesFilterStore.updateFilters(workspaceSlug.toString(), projectId.toString(), EIssueFilterType.DISPLAY_FILTERS, {
|
issuesFilterStore.updateFilters(
|
||||||
|
workspaceSlug.toString(),
|
||||||
|
projectId.toString(),
|
||||||
|
EIssueFilterType.DISPLAY_FILTERS,
|
||||||
|
{
|
||||||
calendar: {
|
calendar: {
|
||||||
...issuesFilterStore.issueFilters?.displayFilters?.calendar,
|
...issuesFilterStore.issueFilters?.displayFilters?.calendar,
|
||||||
layout,
|
layout,
|
||||||
},
|
},
|
||||||
});
|
},
|
||||||
|
viewId
|
||||||
|
);
|
||||||
|
|
||||||
issueCalendarView.updateCalendarPayload(
|
issueCalendarView.updateCalendarPayload(
|
||||||
layout === "month"
|
layout === "month"
|
||||||
|
@ -50,7 +50,7 @@ export const CalendarWeekDays: React.FC<Props> = observer((props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`grid divide-x-[0.5px] divide-custom-border-400 ${showWeekends ? "grid-cols-7" : "grid-cols-5"} ${
|
className={`grid divide-x-[0.5px] divide-custom-border-200 ${showWeekends ? "grid-cols-7" : "grid-cols-5"} ${
|
||||||
calendarLayout === "month" ? "" : "h-full"
|
calendarLayout === "month" ? "" : "h-full"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
@ -13,7 +13,7 @@ export const CalendarWeekHeader: React.FC<Props> = observer((props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`relative grid divide-x-[0.5px] divide-custom-border-400 text-sm font-medium ${
|
className={`relative grid divide-x-[0.5px] divide-custom-border-200 text-sm font-medium ${
|
||||||
showWeekends ? "grid-cols-7" : "grid-cols-5"
|
showWeekends ? "grid-cols-7" : "grid-cols-5"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
@ -78,7 +78,7 @@ export class CalendarStore implements ICalendarStore {
|
|||||||
const { activeWeekDate } = this.calendarFilters;
|
const { activeWeekDate } = this.calendarFilters;
|
||||||
|
|
||||||
return this.calendarPayload[`y-${activeWeekDate.getFullYear()}`][`m-${activeWeekDate.getMonth()}`][
|
return this.calendarPayload[`y-${activeWeekDate.getFullYear()}`][`m-${activeWeekDate.getMonth()}`][
|
||||||
`w-${this.activeWeekNumber}`
|
`w-${this.activeWeekNumber - 1}`
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user