From e308657a85455669ab0b116d2b4111acfa8c6f15 Mon Sep 17 00:00:00 2001 From: Dirk Peter Date: Fri, 12 Jul 2024 10:54:35 +0200 Subject: [PATCH] #30: adds fragement for cleared reminders to support proper retention --- src/app/reminder-plugin/reminder.model.ts | 1 + src/app/reminder-plugin/services/reminder.service.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/app/reminder-plugin/reminder.model.ts b/src/app/reminder-plugin/reminder.model.ts index ec688ef..96210b1 100644 --- a/src/app/reminder-plugin/reminder.model.ts +++ b/src/app/reminder-plugin/reminder.model.ts @@ -25,6 +25,7 @@ export interface Reminder extends IEvent { status: ReminderStatus; isGroup?: object; diff?: number; + isCleared?: object; } export interface ReminderGroup { diff --git a/src/app/reminder-plugin/services/reminder.service.ts b/src/app/reminder-plugin/services/reminder.service.ts index d7bf5be..e4053fd 100644 --- a/src/app/reminder-plugin/services/reminder.service.ts +++ b/src/app/reminder-plugin/services/reminder.service.ts @@ -125,6 +125,9 @@ export class ReminderService { status: reminder.status, }; + if (reminder.status === ReminderStatus.cleared) event.isCleared = {}; + else event.isCleared = null; + return (await this.eventService.update(event)) as IResult; }