feat(dueDate): also leave scheduled time active when dismissing reminder

This commit is contained in:
Johannes Millan 2025-04-29 15:51:15 +02:00
parent f60a2a0bae
commit 6b762cd3fa
3 changed files with 29 additions and 3 deletions

View file

@ -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);

View file

@ -752,6 +752,18 @@ export const taskReducer = createReducer<TaskState>(
);
}),
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<TaskState>(
id,
changes: {
dueWithTime: undefined,
dueDay: undefined,
},
},
state,

View file

@ -230,8 +230,21 @@
[innerHTML]="t.dueWithTime | shortPlannedAt"
></div>
</button>
}
@if (t.dueDay) {
} @else if (t.dueWithTime) {
<button
(click)="scheduleTask()"
[title]="T.F.TASK.CMP.EDIT_SCHEDULED | translate"
class="ico-btn schedule-btn"
color=""
mat-icon-button
>
<mat-icon>schedule</mat-icon>
<div
class="time-badge"
[innerHTML]="t.dueWithTime | shortPlannedAt"
></div>
</button>
} @else if (t.dueDay) {
<button
(click)="scheduleTask()"
[title]="T.F.TASK.CMP.SCHEDULE | translate"