Established Participants and Tickets model. Migrated concepts.

This commit is contained in:
Pen Anderson 2026-03-04 10:53:42 -06:00
parent 0df93e1886
commit cd8e1e3b3b
22 changed files with 1345 additions and 191 deletions

View file

@ -125,7 +125,17 @@ func (app *App) handleCheckInAttendee(w http.ResponseWriter, r *http.Request) {
result := map[string]any{"attendee": a}
if body.AlsoVolunteer {
v, _ := app.getVolunteerByAttendeeID(id)
// Try to find volunteer via participant_id first (new model), fall back to attendee_id (legacy).
var v *Volunteer
if a != nil {
p, _ := app.getParticipantByEmail(a.Email)
if p != nil {
v, _ = app.getVolunteerByParticipantID(p.ID)
}
}
if v == nil {
v, _ = app.getVolunteerByAttendeeID(id)
}
if v != nil {
if !v.CheckedIn {
if v2, err := app.checkInVolunteer(v.ID, claims.UserID); err == nil {