/simulation is gated by Permissions.simulation.
What you’ll build
- A form for the event fields (name, description, category, venue, capacity, date/time, price, lineups, setlists, optional special-ad category).
- Multi-date support — but only in event mode (see below).
- A submit handler that POSTs to the CR API (one POST per date entry).
Prerequisites
- An authenticated user with
Permissions.simulation. X-Preferred-Partner-Idset.
Gating and mode selection
Mode is not driven byPermissions.prisma / Permissions.fdlive. The
reference FE selects based on:
hasPartialServiceAccessTier()— partner productPRISMAorFD_FULL_SERVICE(read frompartnerDetails.productin browser storage)location.state?.from === 'wave'- the current
category(product vs non-product)
The call chain
On mount: nothing — the form is client-side until submit. On submit (one call per date entry):| Method | URL | Host |
|---|---|---|
| POST | /events/?event_type={prisma|fdlive} | CR API |
event_type is derived from hasPartialServiceAccessTier() / wave-origin
plus the event category — not from a UI toggle. There is also a separate
submit branch for Wave scenarios.
Multi-date behaviour
- Event mode (
SimulationFormDefault) supports “Add dates and venues” — multiple entries, one POST each. - Prisma / product mode (
SimulationFormPrisma) renders only a single date block; there is no “add dates” action. The submit loop exists, but in product mode users typically submit a single entry.
Payload shape
| Field | Shape |
|---|---|
| Lineups | [{ artist_name, artist_type }] (not { name, starts_at }) |
| Setlists | [{ artist_name, track }] |
| Price | scalar number (not nested { min, max }) |
status | always "RUNNING" |
special_ad_category | [] by default; on the special tab, an array of the selected value(s) |
Reference implementation
/.
Gotchas
`Permissions.simulation` gates the route
`Permissions.simulation` gates the route
Not prisma/fdlive permission enums.
CR API host, not main API
CR API host, not main API
POST /events/?event_type=... on the CR API — different host.Multi-date only in event mode
Multi-date only in event mode
Prisma/product mode is single-date in the UI.
Payload field shapes differ from a naive mapping
Payload field shapes differ from a naive mapping
Lineups
artist_name/artist_type, setlists artist_name/track,
scalar price, status: "RUNNING" always, special_ad_category is
an array.Date format is DD.MM.YYYY in the FE
Date format is DD.MM.YYYY in the FE
Confirm the backend contract — possible mismatch with ISO dates used
elsewhere.
Related
- Event editor — same host, edit flow.
- Bulk event upload — same host, many events.
- CORS & two-host architecture.