Skip to content

feat(calendar): route recurring-event delete through repeat-scope dialog#816

Merged
renemadsen merged 2 commits into
stablefrom
feat/calendar-delete-repeat-scope
May 15, 2026
Merged

feat(calendar): route recurring-event delete through repeat-scope dialog#816
renemadsen merged 2 commits into
stablefrom
feat/calendar-delete-repeat-scope

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

  • Right-click → Delete on a recurring calendar event now opens the same polished RepeatScopeModalComponent already used by move-on-drag (mode 'delete', title Delete repeat, three radios Only this / This and following / All in series). The chosen scope is passed to the existing DeleteTask backend endpoint, which already handles all three semantics.
  • Non-recurring deletes are unchanged: TaskDeleteModalComponent still shows the simple Are you sure... confirm.
  • Detection of "is this a recurring event" now uses task.repeatRule !== 'none', matching the move / resize flows. The previous task.repeatSeriesId check was always false because the backend CalendarTaskResponseModel never populates that field — so the old scope-radios path under *ngIf="data.hasSeries" was silently dead. This PR fixes that drift.
  • Cleanup: removes the now-dead scope-radio block, RepeatDeleteScope import, scope field, and hasSeries data flag from TaskDeleteModalComponent.

Spec: docs/superpowers/specs/2026-05-14-calendar-delete-repeat-scope-design.md

Test plan

  • Right-click a recurring event (e.g. weekly) → Delete → see Delete repeat dialog with the three radios.
  • Only this → confirm → only that occurrence disappears.
  • This and following → confirm → that occurrence + all later disappear; earlier occurrences remain.
  • All in series → confirm → entire series gone.
  • Right-click a one-off event → Delete → unchanged Delete task / Are you sure... confirm; no radios.
  • Cancel on the new dialog closes without an API call.

🤖 Generated with Claude Code

Right-click → Delete on a recurring event now opens the same polished
RepeatScopeModalComponent used by move-on-drag, with mode 'delete' (title
"Delete repeat", three radios: Only this / This and following / All in
series). The chosen scope is passed to the existing backend DeleteTask
endpoint, which already handles all three semantics.

Detection of recurring tasks uses task.repeatRule !== 'none' to match the
move/resize flows. The earlier TaskDeleteModalComponent gated its scope
radios on task.repeatSeriesId, but the backend response model never
populates that field — so the old radios path was silently dead. The
non-recurring confirm flow is unchanged.

Cleanup: TaskDeleteModalComponent now only handles non-recurring deletes,
so the scope-radio block, RepeatDeleteScope import, scope field, and
hasSeries data flag are removed from it.

Spec: docs/superpowers/specs/2026-05-14-calendar-delete-repeat-scope-design.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 15, 2026 05:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Routes deletion of recurring calendar events through the existing RepeatScopeModalComponent so users can choose Only this / This and following / All in series, while keeping one-off event deletion on the simple confirm modal. This aligns delete behavior with the existing move/resize recurring-event flows by detecting recurrence via task.repeatRule !== 'none'.

Changes:

  • In TaskPreviewModalComponent, detect recurring tasks via repeatRule and, for recurring deletes, open RepeatScopeModalComponent and forward the selected scope to calendarService.deleteTask(...).
  • Simplify TaskDeleteModalComponent to always delete with scope 'this' and remove the now-dead “series scope” UI/data plumbing.
  • Remove the hasSeries flag, RepeatDeleteScope usage, and scope radio block from the delete modal.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/modals/task-preview-modal/task-preview-modal.component.ts Routes recurring deletes through RepeatScopeModalComponent and calls deleteTask with the selected scope.
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/modals/task-delete-modal/task-delete-modal.component.ts Removes series-scope state and hardcodes non-recurring delete to scope 'this'.
eform-client/src/app/plugins/modules/backend-configuration-pn/modules/calendar/modals/task-delete-modal/task-delete-modal.component.html Removes the now-dead scope radio UI from the non-recurring delete confirmation modal.

Comment on lines +6 to +10
import {CalendarBoardModel, CalendarTaskModel} from '../../../../models/calendar';
import {CommonDictionaryModel} from 'src/app/common/models';
import {TaskDeleteModalComponent} from '../task-delete-modal/task-delete-modal.component';
import {RepeatScopeModalComponent} from '../repeat-scope-modal/repeat-scope-modal.component';
import {RepeatDeleteScope} from '../../../../models/calendar';
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@renemadsen renemadsen merged commit ded04b4 into stable May 15, 2026
17 checks passed
@renemadsen renemadsen deleted the feat/calendar-delete-repeat-scope branch May 15, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants