mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-22 11:52:21 +01:00
(wip) show event reservation users
This commit is contained in:
parent
1b65540257
commit
4d0fe29bcc
@ -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 {
|
||||
|
@ -29,7 +29,11 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="reservation in reservations" ng-class="{'disabled': isCancelled(reservation)}">
|
||||
<td class="text-c">
|
||||
<a ui-sref="app.logged.members_show({id: reservation.user_id})">{{ reservation.user_full_name }} </a>
|
||||
<a ui-sref="app.logged.members_show({id: reservation.user_id})" ng-if="event.event_type === 'standard'">{{ reservation.user_full_name }} </a>
|
||||
<div ng-repeat="bu in reservation.booking_users_attributes">
|
||||
<span ng-if="bu.booked_type !== 'User'">{{bu.name}}</span>
|
||||
<a ui-sref="app.logged.members_show({id: bu.booked_id})" ng-if="bu.booked_type === 'User'">{{bu.name}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ reservation.created_at | amDateFormat:'LL LTS' }}</td>
|
||||
<td>
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user