mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
(feat) show event booking users in member edit page
This commit is contained in:
parent
b577cd1ae2
commit
f6883ea43e
@ -213,10 +213,20 @@
|
||||
<span ng-if="r.nb_reserve_places > 0">
|
||||
<br/>
|
||||
<span translate translate-values="{ NUMBER: r.nb_reserve_places }">{{ 'app.admin.members_edit.NUMBER_full_price_tickets_reserved' }}</span>
|
||||
<span ng-repeat="bu in r.booking_users_attributes | filter:{event_price_category_id:null}">
|
||||
<br/>
|
||||
<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>
|
||||
</span>
|
||||
</span>
|
||||
<span ng-repeat="ticket in r.tickets">
|
||||
<br/>
|
||||
<span translate translate-values="{ NUMBER: ticket.booked, NAME: ticket.price_category.name }">{{ 'app.admin.members_edit.NUMBER_NAME_tickets_reserved' }}</span>
|
||||
<span ng-repeat="bu in r.booking_users_attributes | filter:{event_price_category_id:ticket.event_price_category_id}">
|
||||
<br/>
|
||||
<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>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -77,13 +77,22 @@ json.events_reservations @member.reservations.where(reservable_type: 'Event').jo
|
||||
json.nb_reserve_places sr.reservation.nb_reserve_places
|
||||
json.tickets sr.reservation.tickets do |t|
|
||||
json.booked t.booked
|
||||
json.event_price_category_id t.event_price_category_id
|
||||
json.price_category do
|
||||
json.name t.event_price_category.price_category.name
|
||||
end
|
||||
end
|
||||
json.reservable sr.reservation.reservable
|
||||
json.reservable_type 'Event'
|
||||
json.event_type sr.reservation.reservable.event_type
|
||||
json.canceled_at sr.canceled_at
|
||||
json.booking_users_attributes sr.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
|
||||
end
|
||||
json.invoices @member.invoices.order('reference DESC') do |i|
|
||||
json.id i.id
|
||||
|
Loading…
Reference in New Issue
Block a user