diff --git a/package-lock.json b/package-lock.json index 37c4eed..9a251cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "my-weekly-todo-list", - "version": "1.103.0", + "version": "1.103.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "my-weekly-todo-list", - "version": "1.103.0", + "version": "1.103.1", "license": "MIT", "dependencies": { "@auth/prisma-adapter": "^2.11.1", diff --git a/package.json b/package.json index cdc9a22..a6b5532 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.103.0", + "version": "1.103.1", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 204d9b1..5bae63b 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -9836,13 +9836,26 @@ function makeBadgeCircle(text: string, color: string, size: number, label: strin } export function getPriorityBadge(task: Task, style: string, size = 12): PriorityBadge | null { + // Universal "important" star — shown for any task explicitly marked important + // (e.g. Outlook To-Do tasks with the star flag) regardless of the active priority style. + const importantStar = (): PriorityBadge => ({ + label: "Important", + node: , + }); + if (style === "abcde") { - if (!task.priority || !PRIORITY_LETTER_COLORS[task.priority]) return null; - return makeBadgeCircle(task.priority, PRIORITY_LETTER_COLORS[task.priority], size + 2, task.priority); + if (task.priority && PRIORITY_LETTER_COLORS[task.priority]) { + return makeBadgeCircle(task.priority, PRIORITY_LETTER_COLORS[task.priority], size + 2, task.priority); + } + if (task.importance === true) return importantStar(); + return null; } if (style === "ivylee") { - if (!task.priority || !PRIORITY_NUMBER_COLORS[task.priority]) return null; - return makeBadgeCircle(task.priority, PRIORITY_NUMBER_COLORS[task.priority], size + 2, `Ivy Lee #${task.priority}`); + if (task.priority && PRIORITY_NUMBER_COLORS[task.priority]) { + return makeBadgeCircle(task.priority, PRIORITY_NUMBER_COLORS[task.priority], size + 2, `Ivy Lee #${task.priority}`); + } + if (task.importance === true) return importantStar(); + return null; } if (style === "pareto") { if (task.importance !== true && task.priority !== "A" && task.priority !== "B") return null; @@ -9861,6 +9874,8 @@ export function getPriorityBadge(task: Task, style: string, size = 12): Priority return { label: "Delegieren", node: }; return { label: "Eliminieren", node: }; } + // Eisenhower with only importance set (e.g. imported from Outlook with no urgency) + if (task.importance === true) return importantStar(); return null; } diff --git a/src/lib/calendar-cache.ts b/src/lib/calendar-cache.ts index 9bee463..ab4ce92 100644 --- a/src/lib/calendar-cache.ts +++ b/src/lib/calendar-cache.ts @@ -218,7 +218,22 @@ export async function deleteCachedEvent( externalId: string, provider: string, ): Promise { + // For Outlook recurring events, our composite ID is "seriesMasterId::instanceId". + // When the user deletes the whole series, every cached occurrence of that series + // must be cleared too — otherwise the surviving rows reappear after the next read. + const seriesMasterId = externalId.includes('::') ? externalId.split('::')[0] : externalId; + await prisma.cachedCalendarEvent.deleteMany({ - where: { userId, externalId, provider }, + where: { + userId, + provider, + OR: [ + { externalId }, + { externalId: seriesMasterId }, + { recurringEventId: seriesMasterId }, + // The composite IDs of all instances start with "::" + { externalId: { startsWith: `${seriesMasterId}::` } }, + ], + }, }); }