1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

Merge branch 'dev' for release 2.5.1

This commit is contained in:
cyril 2017-03-28 20:28:36 +02:00
commit f3392e391c
5 changed files with 13 additions and 8 deletions

View File

@ -1 +1 @@
2.5.0
2.5.1

View File

@ -1,5 +1,10 @@
# Changelog Fab Manager
## v2.5.1 2017 March 28
- hide spaces in admin's credit management if spaces are disabled
- Fix a bug : Can not display training tracking (this bug was introduced in version 2.5.0)
- [TODO DEPLOY] `rake assets:precompile`
## v2.5.0 2017 March 28
- Ability to remove an unused custom price for an event (#61)

View File

@ -96,11 +96,11 @@
</tbody>
</table>
<h2 class="m-t-lg" translate>{{ 'pricing.spaces' }}</h2>
<div class="btn-group m-t-md m-b-md">
<h2 ng-hide="fablabWithoutSpaces" class="m-t-lg" translate>{{ 'pricing.spaces' }}</h2>
<div ng-hide="fablabWithoutSpaces" class="btn-group m-t-md m-b-md">
<button type="button" class="btn btn-warning" ng-click="addSpaceCredit($event)" translate>{{ 'pricing.add_a_space_credit' }}</button>
</div>
<table class="table">
<table ng-hide="fablabWithoutSpaces" class="table">
<thead>
<tr>
<th style="width:20%" translate>{{ 'pricing.space' }}</th>

View File

@ -57,7 +57,7 @@ class API::TrainingsController < API::ApiController
def availabilities
authorize Training
@training = Training.find(params[:id])
@availabilities = @training.availabilities.includes(slots: {reservation: {user: [:profile, :trainings] }}).order('start_at DESC')
@availabilities = @training.availabilities.includes(slots: {reservations: {user: [:profile, :trainings] }}).order('start_at DESC')
end
private

View File

@ -4,8 +4,8 @@ json.availabilities @availabilities do |a|
json.start_at a.start_at.iso8601
json.end_at a.end_at.iso8601
json.reservation_users a.slots.map do |slot|
json.id slot.reservation.user_id
json.full_name slot.reservation.user.profile.full_name
json.is_valid slot.reservation.user.trainings.include?(@training)
json.id slot.reservations.first.user_id
json.full_name slot.reservations.first.user.profile.full_name
json.is_valid slot.reservations.first.user.trainings.include?(@training)
end
end