Friday, May 15, 2026

One-click clone Corsizio event into EV

Volleyball Elite Academy development update
Volleyball Elite Academy
One-click clone Corsizio event into EV

One-click clone Corsizio event into EV

Volleyball Elite Academy — Development Update • May 15, 2026

One-click clone Corsizio event into EV

What & Why

The Corsizio API is read-only (confirmed 2026-05-13 audit, §3), so admins create events in Corsizio first and then have to manually re-enter the same name, dates, location, spots, and price into EV to use the EV-side features (checklists, attendance, communications). This task adds a "Clone into EV" button on every unlinked Corsizio event row in the Sync dashboard that pre-fills the EV event creation form from the Corsizio metadata and auto-links the resulting EV event to the Corsizio source.

Done looks like

  • Every row in the Corsizio Sync dashboard for a Corsizio event that is not yet linked to an EV academy event shows a "Clone into EV" button.
  • Clicking the button opens the existing EV event creation form pre-filled with: name, start/end dates (parsed as America/Regina local time per the timezone convention in replit), location, max spots, base price, and event type (best-effort default — admin can change).
  • The form includes a clearly labelled, read-only "Source: Corsizio event {name} ({id})" banner so the admin knows the link will be created on save.
  • On save, the new EV academy_events row is created AND the corresponding is set in a single transaction. The Sync dashboard row updates to "Linked" without a manual refresh.
  • If the admin cancels the form, no EV event is created and no link is written.
  • Already-linked Corsizio events show no "Clone into EV" button (linked rows already have a different action).
  • Test coverage: a vitest seeds an unlinked Corsizio event, calls the clone endpoint with a minimal payload, asserts the academy_events row was created with the expected fields AND that the corsizio_events row's points back at it.

Out of scope

  • Pushing any value FROM EV back into Corsizio (API is read-only).
  • The side-by-side reconciliation screen (separate task — that's for already-linked pairs).
  • Bulk-cloning multiple Corsizio events at once (this task is one event at a time).
  • Cloning Corsizio attendees as part of the same flow (the existing sync handles attendees once the event is linked).

Steps

1. Clone endpoint — Add an admin-only POST endpoint that accepts a Corsizio event ID plus an optional EV-side overrides payload (event type, registration model, etc.) and, in a single transaction, creates the academy_events row and writes the link back to corsizio_events. 2. Pre-fill helper — Add a small server endpoint or client-side mapper that turns a Corsizio event row into the initial form values for the EV event creation form (handle Regina-local date parsing carefully — never parse Corsizio timestamps as UTC for date display). 3. Dashboard button — In the Corsizio Sync dashboard, render the "Clone into EV" button on unlinked rows only. On click, open the EV event creation form pre-filled from the helper above and pass the Corsizio event ID through so the save-handler calls the new clone endpoint. 4. Linked-state refresh — After a successful clone, invalidate the relevant TanStack Query keys so the dashboard immediately shows the row as Linked. 5. Test coverage — Add a route test for the clone endpoint covering happy path + unlinked-event guard.

Relevant files

- - - - -

Volleyball Elite Academy

Reply to this email — we read every reply.

You received this because you have an account with Volleyball Elite Academy.

elitevolleyball.training

No comments:

Post a Comment