Skip to content

Commit

Permalink
#30: cleared reminders retention rule support (#31)
Browse files Browse the repository at this point in the history
* #30: adds fragement for cleared reminders to support proper retention

* #30 adjust code and add info for retention

---------

Co-authored-by: Dirk Peter <[email protected]>
  • Loading branch information
dirk-peter-c8y and Dirk Peter authored Jul 15, 2024
1 parent 70922aa commit cf5e2ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/reminder-plugin/reminder.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface Reminder extends IEvent {
status: ReminderStatus;
isGroup?: object;
diff?: number;
isCleared?: object;
}

export interface ReminderGroup {
Expand Down
3 changes: 3 additions & 0 deletions src/app/reminder-plugin/services/reminder.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ export class ReminderService {
status: reminder.status,
};

// (un)set `isCleared` fragment to supoprt using retention rules for cleared reminders
event.isCleared = (reminder.status === ReminderStatus.cleared) ? {} : null;

return (await this.eventService.update(event)) as IResult<Reminder>;
}

Expand Down

0 comments on commit cf5e2ce

Please sign in to comment.