1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(bug) pre-registration event reservations ilimit places

This commit is contained in:
Du Peng 2023-10-26 14:35:18 +02:00
parent 3ee63d4613
commit 0803eb0833
4 changed files with 3 additions and 5 deletions

View File

@ -4,6 +4,7 @@
- Fix a bug: fix all failing tasks of rake task file chain.rake
- Fix a bug: file_size_validator.rb was broken since ruby v3, see https://github.com/rails/rails/issues/41270
- improvement: pre-registration event reservations ilimit places
- decreases sidekiq concurrency from 25 to 5, 25 is too much and consumes memory for nothing
- do not log Notifications#polling action anymore, by default, can be enable via env variable ENABLE_NOTIFICATIONS_POLLING_LOGGING=true

View File

@ -1023,9 +1023,6 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
});
resetEventReserve();
});
if ($scope.currentUser.role === 'admin') {
return $scope.ctrl.member = null;
}
};
/**

View File

@ -60,7 +60,7 @@
<div ng-if="!isCancelled(reservation) && !reservation.is_paid">
<label class="m-r-sm">
<span translate>{{ 'app.admin.event_reservations.negative' }}</span>
<input type="radio" name="invalidate-{{reservation.id}}" ng-value="false" ng-click="invalidateReservation(reservation)" ng-model="reservation.slots_reservations_attributes[0].is_valid" ng-disabled="reservation.total_booked_seats > event.nb_free_places && !reservation.slots_reservations_attributes[0].is_valid">
<input type="radio" name="invalidate-{{reservation.id}}" ng-value="false" ng-click="invalidateReservation(reservation)" ng-model="reservation.slots_reservations_attributes[0].is_valid" ng-disabled="reservation.slots_reservations_attributes[0].is_valid === 'false'">
</label>
<label>
<span translate>{{ 'app.admin.event_reservations.affirmative' }}</span>

View File

@ -69,7 +69,7 @@ class SlotsReservation < ApplicationRecord
Slots::PlacesCacheService.change_places(target_slot,
reservation.reservable_type,
reservation.reservable_id,
reservation.total_booked_seats,
reservation.reservable.pre_registration ? 0 : reservation.total_booked_seats,
operation)
else
Slots::PlacesCacheService.change_places(target_slot, reservation.reservable_type, reservation.reservable_id, 1, operation)