1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

(bug) event is over before the end

This commit is contained in:
Sylvain 2023-01-09 11:37:58 +01:00
parent 4ee7b21d63
commit e24fca7f9d
3 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# Changelog Fab-manager
- Improved fix_invoice_item task
- Fix a bug: events are shown as over and unbookable, starting from midnight at the event end's day
- Fix a bug: updating a space/machine/event/training removes the image
- Fix a bug: cryptic error message when failed to create a manager
- Fix a bug: unable to restore accounting periods closed by a deleted admin

View File

@ -162,6 +162,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
// Get the details for the current event (event's id is recovered from the current URL)
$scope.event = eventPromise;
$scope.eventEndDateTime = moment(`${eventPromise.end_date}T${eventPromise.end_time}:00`);
// the application global settings
$scope.settings = settingsPromise;
@ -259,7 +260,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
$scope.isShowReserveEventButton = () => {
return $scope.event.nb_free_places > 0 &&
!$scope.reserve.toReserve &&
$scope.now.isBefore($scope.event.end_date) &&
$scope.now.isBefore($scope.eventEndDateTime) &&
helpers.isUserValidatedByType($scope.ctrl.member, $scope.settings, 'event');
};

View File

@ -173,7 +173,7 @@
</div>
<div ng-show="now.isSameOrAfter(event.end_date)" class="alert alert-info">
<div ng-show="now.isSameOrAfter(eventEndDateTime)" class="alert alert-info">
<span translate>{{ 'app.public.events_show.event_is_over' }}</span>
<span ng-show="reservations.length > 0" translate>{{ 'app.public.events_show.thanks_for_coming' }}</span>
<a ui-sref="app.public.events_list" translate>{{ 'app.public.events_show.view_event_list' }}</a>