Refactored ticket code into kiosk code.
This commit is contained in:
parent
72b245d6d6
commit
3eec81af7f
5 changed files with 110 additions and 190 deletions
|
|
@ -14,14 +14,11 @@ func setupKiosk(t *testing.T) (*App, *http.ServeMux, string) {
|
|||
dept, _ := app.createDepartment(Department{Name: "Gate"})
|
||||
deptID := dept.ID
|
||||
|
||||
// Create participant + ticket with code
|
||||
// Create volunteer with a kiosk_code directly on the volunteer record
|
||||
p, _ := app.createParticipant(Participant{Email: "titania@test.com", PreferredName: "Titania"})
|
||||
token, _ := app.generateUniqueToken()
|
||||
tk, _ := app.createTicket(Ticket{ParticipantID: &p.ID, Name: "Titania", Source: "manual", Code: &token})
|
||||
_ = tk
|
||||
|
||||
// Create linked volunteer via participant_id
|
||||
app.createVolunteer(Volunteer{Name: "Titania", ParticipantID: &p.ID, DepartmentID: &deptID})
|
||||
v, _ := app.createVolunteer(Volunteer{Name: "Titania", ParticipantID: &p.ID, DepartmentID: &deptID})
|
||||
token, _ := app.generateVolunteerKioskCode()
|
||||
app.assignKioskCode(v.ID, token)
|
||||
|
||||
// Create shifts
|
||||
app.createShift(Shift{DepartmentID: deptID, Name: "Morning", Day: "2026-03-15", StartTime: "08:00", EndTime: "12:00", Capacity: 2})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue