Skip to content

Phase 1.4 [Frontend]: V2 CSV formats for events and guests #296

Done

Description

@Flapjacck

Overview

The CSV formats in apps/admin/src/lib/csv/csv-formats.ts still use the v1 shape. EVENTS_CSV has a single time column and no category or streaming, and there's no guest format. Update them to match v2, so export → edit in a spreadsheet → import round-trips.

Replaces the frontend half of #279. Part of #201.

What to do

EVENTS_CSV

  • Columns: id, title, date, start_time, end_time, category, location, description, will_stream, stream_url.
  • start_time / end_time: accept the same free text as now (7:30PM, 19:30). An empty cell means no time, and a saved time that the picker can't show is kept while its cell is unchanged (the current keptTime behaviour, applied to each column).
  • category: one of review, social, career, workshop, hackathon, meet_the_pros. Also accept the labels shown in the admin (for example "Meet the Pros", "Review session") and map them. Required.
  • will_stream: true/false/yes/no, empty means false. stream_url must be a URL when it's set.
  • Errors in words an exec can act on, for example "Category must be one of: review, social, …" or "End time must be after the start time."

TEAM_CSV

  • Check it still matches v2.team (role is just the title, and the department is its own column). No column changes expected.

GUESTS_CSV (new)

  • Columns: id, name, title, company, link_url. company is the company name, looked up to company_id. An unknown name is an error saying to add the company first. Picture is never in the CSV.
  • Uses the guest form schema from 2.3 Backend if that has landed. Otherwise add a small schema here and switch it over later.

Import pages

  • ImportEventsPage and ImportTeamPage use the new formats and the atomic import functions from 1.4 Backend. The preview (ImportPreview / FieldChanges) shows the new columns.
  • The import page for guests is wired up in 2.3 Frontend (guests page).

Tests

  • tests/lib/csv/csv-formats.test.ts: round trip for each format, every validation message, and a kept unreadable time.
  • tests/pages/CsvImportPages.test.tsx: updated for the new columns.

Done when

  • Events CSV has the v2 columns and validates category, times and streaming
  • GUESTS_CSV exists and resolves companies by name
  • Export, then import, of an unchanged file reports no changes
  • Tests pass

Activity

  1. added
    admin
    frontend
    v2-migration
    phase-1
    on Nov 28, 2026
  2. Flapjacck commented on Nov 30, 2026

    @Flapjacck
    MemberAuthor

    Progress check: not started yet. EVENTS_CSV still uses the v1 columns (id, title, date, time, location, description), there's no guests CSV, and there are no v2 import RPCs. Note that #319 added more event fields (category, building and room, format, link name, highlights, colours), so the v2 CSV format should cover them too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    adminfrontendphase-1v2-migration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions