Skip to content

Commit

Permalink
Merge branch 'dev' for release 2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jarod022 committed Mar 28, 2017
2 parents c9beb31 + 4245bda commit f3392e3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .fabmanager-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.5.1
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions app/assets/templates/admin/pricing/credits.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/trainings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def destroy
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
Expand Down
6 changes: 3 additions & 3 deletions app/views/api/trainings/availabilities.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f3392e3

Please sign in to comment.