From 6b762cd3fade8a28221c04e01c5de68bdb0507e7 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Tue, 29 Apr 2025 15:51:15 +0200 Subject: [PATCH] feat(dueDate): also leave scheduled time active when dismissing reminder --- .../dialog-view-task-reminders.component.ts | 2 +- src/app/features/tasks/store/task.reducer.ts | 13 +++++++++++++ src/app/features/tasks/task/task.component.html | 17 +++++++++++++++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/app/features/tasks/dialog-view-task-reminders/dialog-view-task-reminders.component.ts b/src/app/features/tasks/dialog-view-task-reminders/dialog-view-task-reminders.component.ts index 2d984627de..9f9b536222 100644 --- a/src/app/features/tasks/dialog-view-task-reminders/dialog-view-task-reminders.component.ts +++ b/src/app/features/tasks/dialog-view-task-reminders/dialog-view-task-reminders.component.ts @@ -135,7 +135,7 @@ export class DialogViewTaskRemindersComponent implements OnDestroy { if (task.projectId || task.parentId || task.tagIds.length > 0) { this._taskService.update(task.id, { reminderId: undefined, - dueWithTime: undefined, + // dueWithTime: undefined, }); this._reminderService.removeReminder(task.reminderData.id); this._removeFromList(task.reminderId as string); diff --git a/src/app/features/tasks/store/task.reducer.ts b/src/app/features/tasks/store/task.reducer.ts index ed336ed91f..3ad1e4dc02 100644 --- a/src/app/features/tasks/store/task.reducer.ts +++ b/src/app/features/tasks/store/task.reducer.ts @@ -752,6 +752,18 @@ export const taskReducer = createReducer( ); }), + on(PlannerActions.removeTaskFromDays, (state, { taskId }) => { + return taskAdapter.updateOne( + { + id: taskId, + changes: { + dueDay: undefined, + }, + }, + state, + ); + }), + // REMINDER STUFF // -------------- on(scheduleTask, (state, { task, dueWithTime }) => { @@ -784,6 +796,7 @@ export const taskReducer = createReducer( id, changes: { dueWithTime: undefined, + dueDay: undefined, }, }, state, diff --git a/src/app/features/tasks/task/task.component.html b/src/app/features/tasks/task/task.component.html index 119747ba53..6e86be8a3f 100644 --- a/src/app/features/tasks/task/task.component.html +++ b/src/app/features/tasks/task/task.component.html @@ -230,8 +230,21 @@ [innerHTML]="t.dueWithTime | shortPlannedAt" > - } - @if (t.dueDay) { + } @else if (t.dueWithTime) { + + } @else if (t.dueDay) {