mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-27 17:53:50 +00:00
feat(dueDate): also leave scheduled time active when dismissing reminder
This commit is contained in:
parent
f60a2a0bae
commit
6b762cd3fa
3 changed files with 29 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue