diff --git a/prisma/migrations/20260224_add_task_checkboxes/migration.sql b/prisma/migrations/20260224_add_task_checkboxes/migration.sql new file mode 100644 index 0000000..d47cdd5 --- /dev/null +++ b/prisma/migrations/20260224_add_task_checkboxes/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable: Add showTaskCheckboxes setting +ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "showTaskCheckboxes" BOOLEAN NOT NULL DEFAULT false; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6e41580..f6df43c 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -37,6 +37,7 @@ model User { showSomeday Boolean @default(true) showAllDayEvents Boolean @default(true) showSchedule Boolean @default(true) + showTaskCheckboxes Boolean @default(false) cellDuration Int @default(30) viewStyle String @default("grid") viewDays Int @default(7) diff --git a/src/app/api/user/profile/route.ts b/src/app/api/user/profile/route.ts index 08ee2e8..9bb31e2 100644 --- a/src/app/api/user/profile/route.ts +++ b/src/app/api/user/profile/route.ts @@ -30,6 +30,7 @@ export async function GET(request: NextRequest) { showSomeday: true, showAllDayEvents: true, showSchedule: true, + showTaskCheckboxes: true, cellDuration: true, viewStyle: true, viewDays: true, @@ -115,7 +116,8 @@ export async function PATCH(request: NextRequest) { dateLayout, hourLabelFormat, showSubHourSlots, allDayPosition, cwFontFamily, cwFontSize, cwFontWeight, cwColor, - yearFontFamily, yearFontSize, yearFontWeight, yearColor + yearFontFamily, yearFontSize, yearFontWeight, yearColor, + showTaskCheckboxes } = body; const updateData: any = { @@ -136,6 +138,7 @@ export async function PATCH(request: NextRequest) { ...(showSomeday !== undefined && { showSomeday }), ...(showAllDayEvents !== undefined && { showAllDayEvents }), ...(showSchedule !== undefined && { showSchedule }), + ...(showTaskCheckboxes !== undefined && { showTaskCheckboxes }), ...(cellDuration !== undefined && !isNaN(cellDuration) && { cellDuration }), ...(viewStyle !== undefined && { viewStyle }), ...(viewDays !== undefined && !isNaN(viewDays) && { viewDays }), @@ -210,6 +213,7 @@ export async function PATCH(request: NextRequest) { showSomeday: true, showAllDayEvents: true, showSchedule: true, + showTaskCheckboxes: true, cellDuration: true, viewStyle: true, viewDays: true, diff --git a/src/app/globals.css b/src/app/globals.css index 12007bf..a777a35 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1183,8 +1183,8 @@ h3 { } .weekly-someday.expanded { - max-height: 400px; - overflow: auto; + max-height: none; + overflow: hidden; } .weekly-someday-bar { @@ -1304,10 +1304,11 @@ h3 { /* Ruled paper lines for someday tasks */ .weekly-someday-list { /* border-right: 1px solid var(--weekly-border); Removed for cleaner look */ - padding: 0; + padding: 0; min-height: 200px; flex: 0 0 280px; /* Fixed width for horizontal scrolling */ width: 280px; + transition: transform 0.2s ease, opacity 0.2s ease; max-width: 100%; display: flex; flex-direction: column; diff --git a/src/components/GridTaskBlock.tsx b/src/components/GridTaskBlock.tsx index 639204e..42f116c 100644 --- a/src/components/GridTaskBlock.tsx +++ b/src/components/GridTaskBlock.tsx @@ -29,6 +29,7 @@ interface GridTaskBlockProps { deleteSubTask: (id: string) => void; onSetEditingTaskId?: (id: string | null) => void; workingHoursStart: number; + showTaskCheckboxes?: boolean; } export function GridTaskBlock({ @@ -57,7 +58,8 @@ export function GridTaskBlock({ updateSubTask, deleteSubTask, onSetEditingTaskId, - workingHoursStart + workingHoursStart, + showTaskCheckboxes }: GridTaskBlockProps) { const [isNotesOpen, setIsNotesOpen] = useState(false); const [notesValue, setNotesValue] = useState(task.markdownContent || ""); @@ -166,7 +168,7 @@ export function GridTaskBlock({ return (