Skip to content

Admin: create and edit events #210

Closed

Description

@Flapjacck

One form used for both new events and editing existing ones (/events/new and /events/:id).

Fields (match the table exactly)

  • Title (required)
  • Date (required, date picker)
  • Time: free text in the table, so use a time picker and save it in the same format the site already uses, like 7:30PM
  • Location (for example BA110)
  • Description (multi-line)
  • Picture: handled by the image upload issue, so leave a slot for it

To do

  • Validate the required fields and show errors inline.
  • Save with insert or update, then go back to the list with a "Saved" message.
  • If you leave with unsaved changes, warn first.

Done when

  • A new event shows up on lauriercs.org with the right date, time and location
  • Editing an existing event changes only what you edited
  • You can't save without a title and date

Activity

  1. added
    admin
    frontend
    phase 1
    on Nov 18, 2026
  2. Flapjacck commented on Nov 19, 2026

    @Flapjacck
    MemberAuthor

    Status update (Nov 19). Insert and update rules for admins are live on LCS-Site (#223), so saving will just work for a signed-in exec. The Event zod schema in src/types/event.ts is a good base for form validation.

    Still to do: everything in the issue. Add createEvent() / updateEvent() next to listEvents() in src/lib/events.ts, and invalidate ['events'] after saving. Do this after #209, since the list links to it.

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 1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions