Skip to content

feat: event page with photos and an upload area - #109

Merged
wailbentafat merged 2 commits into
developfrom
feat/event-photos-page
Nov 29, 2026
Merged

wailbentafat merged 2 commits into
developfrom
feat/event-photos-page

Conversation

@wailbentafat

Copy link
Copy Markdown
Collaborator

Asked for: on the Events page, see an event's pictures and be able to upload to it.

Backend

  • GET /staff/events/{id}/photos?limit&offset → {total, items[]} (status, visibility, face count).
  • GET /staff/events/{id}/photos/{photo_id}/image streams the image; 404 if the photo belongs to another event.
  • Any signed-in staff member can read them. The two queries are hand-added to db/generated/photos.py (make gen needs db/schema.sql), please re-run make gen to confirm.

Frontend

  • New /multi/events/$eventId: photo grid with load-more, the existing bulk uploader, a link to Drop a Drive. The grid refreshes as uploads finish.
  • Event cards get Photos and Upload buttons; Upload is no longer hidden for archived events.

Test

Backend: 2 new unit tests pass, ruff/mypy clean. Frontend: tsc and eslint clean for the touched files. Not checked in a browser yet.

Known limit

The grid loads full-size originals (1 to 5 MB each) lazily, 24 per page. Thumbnails would be the next improvement.

GET /staff/events/{id}/photos returns every photo of an event (status,
visibility, face count) with a total, and /photos/{id}/image streams the
image from storage. Any signed-in staff member can read them. The two
photo queries are added to db/queries/photos.sql and hand-written in the
generated module because make gen needs db/schema.sql.
New /multi/events/$eventId page: a photo grid (24 at a time, load more)
and the bulk uploader, so photos can be seen and added from the event
itself. Event cards link to it, and the Upload button now shows for
archived events too.
@wailbentafat
wailbentafat merged commit 4c3c3bc into develop Nov 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant