mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
[bug] exports for events reservation always have seats=1 (fixes #54)
This commit is contained in:
parent
a80df7f993
commit
da71ba783c
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
## next release
|
## next release
|
||||||
|
|
||||||
|
- Fix a bug: number of reserved seats for an event is always of 1 in the excel export of reservations
|
||||||
- Fix a bug: conflict between similar translations around "reservations"
|
- Fix a bug: conflict between similar translations around "reservations"
|
||||||
- Fix a bug: later occurrences of recurrent events does not have the initially configured theme and age range
|
- Fix a bug: later occurrences of recurrent events does not have the initially configured theme and age range
|
||||||
|
- [TODO DEPLOY] delete the `exports/users/reservations` folder to prevent the usage of old invalid exports
|
||||||
|
|
||||||
## v2.4.2 2016 November 8
|
## v2.4.2 2016 November 8
|
||||||
|
|
||||||
|
@ -5,7 +5,11 @@ class API::ExportsController < API::ApiController
|
|||||||
def download
|
def download
|
||||||
authorize @export
|
authorize @export
|
||||||
|
|
||||||
send_file File.join(Rails.root, @export.file), :type => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :disposition => 'attachment'
|
if FileTest.exist?(@export.file)
|
||||||
|
send_file File.join(Rails.root, @export.file), :type => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :disposition => 'attachment'
|
||||||
|
else
|
||||||
|
render text: I18n.t('errors.messages.export_not_found'), status: :not_found
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def status
|
def status
|
||||||
|
@ -21,7 +21,7 @@ wb.add_worksheet(name: t('export_reservations.reservations')) do |sheet|
|
|||||||
resrv.created_at.to_date,
|
resrv.created_at.to_date,
|
||||||
resrv.reservable_type,
|
resrv.reservable_type,
|
||||||
(resrv.reservable.nil? ? '' : resrv.reservable.name),
|
(resrv.reservable.nil? ? '' : resrv.reservable.name),
|
||||||
resrv.slots.count,
|
(resrv.reservable_type == 'Event') ? resrv.total_booked_seats: resrv.slots.count,
|
||||||
(resrv.stp_invoice_id.nil?)? t('export_reservations.local_payment') : t('export_reservations.online_payment')
|
(resrv.stp_invoice_id.nil?)? t('export_reservations.local_payment') : t('export_reservations.online_payment')
|
||||||
]
|
]
|
||||||
styles = [nil, nil, nil, date, nil, nil, nil, nil]
|
styles = [nil, nil, nil, date, nil, nil, nil, nil]
|
||||||
|
@ -31,6 +31,7 @@ en:
|
|||||||
wrong_size: "is the wrong size (should be %{file_size})"
|
wrong_size: "is the wrong size (should be %{file_size})"
|
||||||
size_too_small: "is too small (should be at least %{file_size})"
|
size_too_small: "is too small (should be at least %{file_size})"
|
||||||
size_too_big: "is too big (should be at most %{file_size})"
|
size_too_big: "is too big (should be at most %{file_size})"
|
||||||
|
export_not_found: "Requested export was not found. It was probably deleted, please generate a new export."
|
||||||
|
|
||||||
activemodel:
|
activemodel:
|
||||||
errors:
|
errors:
|
||||||
|
@ -31,6 +31,7 @@ fr:
|
|||||||
wrong_size: "ne fait pas la taille du fichier (doit comporter %{file_size})"
|
wrong_size: "ne fait pas la taille du fichier (doit comporter %{file_size})"
|
||||||
size_too_small: "est trop petite (au moins %{file_size})"
|
size_too_small: "est trop petite (au moins %{file_size})"
|
||||||
size_too_big: "est trop grande (pas plus de %{file_size})"
|
size_too_big: "est trop grande (pas plus de %{file_size})"
|
||||||
|
export_not_found: "L'export demandé n'a pas été trouvé. Il a probablement été supprimé, veuillez lancer la génération d'un nouvel export."
|
||||||
|
|
||||||
activemodel:
|
activemodel:
|
||||||
errors:
|
errors:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user