diff --git a/app/frontend/src/javascript/models/reservation.ts b/app/frontend/src/javascript/models/reservation.ts index b3fbe012b..db950a40d 100644 --- a/app/frontend/src/javascript/models/reservation.ts +++ b/app/frontend/src/javascript/models/reservation.ts @@ -45,6 +45,13 @@ export interface Reservation { }, total_booked_seats?: number, created_at?: TDateISO, + booking_users_attributes?: { + id: number, + name: string, + event_price_category_id: number, + booked_id: number, + booked_type: string, + } } export interface ReservationIndexFilter extends ApiFilter { diff --git a/app/frontend/templates/admin/events/reservations.html b/app/frontend/templates/admin/events/reservations.html index 81d87e088..b7a04527c 100644 --- a/app/frontend/templates/admin/events/reservations.html +++ b/app/frontend/templates/admin/events/reservations.html @@ -29,7 +29,11 @@ - {{ reservation.user_full_name }} + {{ reservation.user_full_name }} +
+ {{bu.name}} + {{bu.name}} +
{{ reservation.created_at | amDateFormat:'LL LTS' }} diff --git a/app/views/api/reservations/_reservation.json.jbuilder b/app/views/api/reservations/_reservation.json.jbuilder index 7ba3e0e12..b5d34bc26 100644 --- a/app/views/api/reservations/_reservation.json.jbuilder +++ b/app/views/api/reservations/_reservation.json.jbuilder @@ -32,3 +32,10 @@ json.reservable do json.id reservation.reservable.id json.name reservation.reservable.name end +json.booking_users_attributes reservation.booking_users.order(booked_type: :desc) do |bu| + json.id bu.id + json.name bu.name + json.event_price_category_id bu.event_price_category_id + json.booked_id bu.booked_id + json.booked_type bu.booked_type +end