Add spec, plan, and tasks for 016-cancel-event feature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
48
specs/016-cancel-event/quickstart.md
Normal file
48
specs/016-cancel-event/quickstart.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Quickstart: Cancel Event
|
||||
|
||||
**Feature Branch**: `016-cancel-event`
|
||||
|
||||
## What This Feature Does
|
||||
|
||||
Adds the ability for an organizer to permanently cancel an event. Cancelled events display a red banner to visitors and block new RSVPs.
|
||||
|
||||
## Implementation Scope
|
||||
|
||||
### Backend
|
||||
1. **Liquibase migration** (003): Add `cancelled` (boolean) and `cancellation_reason` (varchar 2000) columns to `events` table.
|
||||
2. **Domain model**: Extend `Event.java` with `cancelled` and `cancellationReason` fields + `cancel()` method.
|
||||
3. **JPA entity**: Extend `EventJpaEntity.java` with matching columns and mapper updates.
|
||||
4. **OpenAPI spec**: Add `PATCH /events/{eventToken}` endpoint + extend `GetEventResponse` with cancellation fields.
|
||||
5. **Use case**: New `CancelEventUseCase` interface + implementation in `EventService`.
|
||||
6. **Controller**: Implement `cancelEvent` in `EventController`.
|
||||
7. **RSVP guard**: Add cancelled check to RSVP creation (return 409).
|
||||
|
||||
### Frontend
|
||||
1. **Cancel bottom sheet**: Add cancel button (organizer-only) + bottom sheet with textarea and confirm button in `EventDetailView.vue`.
|
||||
2. **Cancellation banner**: Red banner at top of event detail when `cancelled === true`.
|
||||
3. **RSVP hiding**: Hide `RsvpBar` when event is cancelled.
|
||||
4. **API client**: Use generated types from updated OpenAPI spec.
|
||||
|
||||
### Testing
|
||||
1. **Backend unit tests**: Cancel use case, RSVP rejection on cancelled events.
|
||||
2. **Backend integration tests**: Full cancel flow via API.
|
||||
3. **Frontend unit tests**: Cancel bottom sheet, banner display, RSVP hiding.
|
||||
4. **E2E tests**: Organizer cancels event, attendee sees cancelled event.
|
||||
|
||||
## Key Files to Modify
|
||||
|
||||
| File | Change |
|
||||
|------|--------|
|
||||
| `backend/src/main/resources/openapi/api.yaml` | New endpoint + schema extensions |
|
||||
| `backend/src/main/resources/db/changelog/` | New changeset 003 |
|
||||
| `backend/src/main/java/de/fete/domain/model/Event.java` | Add cancelled fields + cancel() |
|
||||
| `backend/src/main/java/de/fete/adapter/out/persistence/EventJpaEntity.java` | Add columns |
|
||||
| `backend/src/main/java/de/fete/application/service/EventService.java` | Implement cancel |
|
||||
| `backend/src/main/java/de/fete/adapter/in/web/EventController.java` | Implement endpoint |
|
||||
| `frontend/src/views/EventDetailView.vue` | Cancel button, bottom sheet, banner |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Existing RSVP bottom sheet pattern (already implemented)
|
||||
- Organizer token stored in localStorage (already implemented)
|
||||
- `BottomSheet.vue` component (already exists)
|
||||
Reference in New Issue
Block a user