# Waitlists

## Customer flow

A signed-in customer can enable an email notification from an event page when a recurring group or a single occurrence has no available places. The operation requires a POST request with a CSRF token scoped to the waitlist type and the related record.

After the entry is saved, the customer returns to the event page and sees a one-time confirmation modal. Closing the modal leaves the customer on that page. The modal also links to `/konto/moje_listy_rezerwowe/`, where active and expired notifications can be reviewed and active notifications can be disabled.

## Persistence and notifications

Only one active entry is kept for the same customer, waitlist type, and related record. Enabling an existing active entry resets its notification flag, which rearms the email notification. Enabling an entry after manual deactivation creates a new active record.

When a place becomes available, every eligible active entry receives an email. A notification does not reserve a place; the first customer who completes the actual signup gets it.

## Verification

1. Open a full event as a signed-in customer and enable a recurring or single-occurrence notification.
2. Confirm that the event page opens again with the success modal.
3. Close the modal and confirm that the event page remains visible.
4. Repeat the flow and use **Zarządzaj powiadomieniami** to open the account waitlist page.
5. Confirm that the entry is active and can be disabled with the CSRF-protected form.
