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

(bug) times are not shown in admin/events monitoring page

This commit is contained in:
Sylvain 2022-06-15 09:59:19 +02:00
parent 48e1cf782f
commit a8ca94ce32
3 changed files with 6 additions and 5 deletions

View File

@ -10,6 +10,7 @@
- During the setup, autoconfigure the main domain - During the setup, autoconfigure the main domain
- During the setup, ask to set ALLOW_INSECURE_HTTP if DEFAULT_PROTOCOL was set to http - During the setup, ask to set ALLOW_INSECURE_HTTP if DEFAULT_PROTOCOL was set to http
- Fix a bug: unable to edit an event - Fix a bug: unable to edit an event
- Fix a bug: times are not shown in admin/events monitoring page
- Fix a bug: unable to generate the secret key base during the setup - Fix a bug: unable to generate the secret key base during the setup
- Fix a bug: error message during the setup: the input device is not a TTY - Fix a bug: error message during the setup: the input device is not a TTY
- Fix a bug: when Fab-manager was installed as non-root user, unable to compile the assets during the upgrade - Fix a bug: when Fab-manager was installed as non-root user, unable to compile the assets during the upgrade

View File

@ -28,7 +28,7 @@
<!--One day event--> <!--One day event-->
<span ng-if="(event.start_date | amDateFormat:'LL')==(event.end_date | amDateFormat:'LL')"> <span ng-if="(event.start_date | amDateFormat:'LL')==(event.end_date | amDateFormat:'LL')">
{{ 'app.admin.events.on_DATE' | translate:{DATE:(event.start_date | amDateFormat:'LL')} }} {{ 'app.admin.events.on_DATE' | translate:{DATE:(event.start_date | amDateFormat:'LL')} }}
<span ng-if="event.all_day == 'false'"> <span ng-if="event.all_day === false">
{{ 'app.admin.events.from_TIME' | translate:{TIME:(event.start_date | amDateFormat:'LT')} }} {{ 'app.admin.events.from_TIME' | translate:{TIME:(event.start_date | amDateFormat:'LT')} }}
<span class="text-sm font-thin" translate>{{ 'app.admin.events.to_time' }}</span> <span class="text-sm font-thin" translate>{{ 'app.admin.events.to_time' }}</span>
{{event.end_date | amDateFormat:'LT'}} {{event.end_date | amDateFormat:'LT'}}
@ -39,8 +39,8 @@
<span ng-if="(event.start_date | amDateFormat:'LL')!=(event.end_date | amDateFormat:'LL')"> <span ng-if="(event.start_date | amDateFormat:'LL')!=(event.end_date | amDateFormat:'LL')">
{{'app.admin.events.from_DATE' | translate:{DATE:(event.start_date | amDateFormat:'LL')} }} {{'app.admin.events.from_DATE' | translate:{DATE:(event.start_date | amDateFormat:'LL')} }}
{{'app.admin.events.to_date' | translate}} {{event.end_date | amDateFormat:'LL'}} {{'app.admin.events.to_date' | translate}} {{event.end_date | amDateFormat:'LL'}}
<br ng-if="event.all_day == 'false'"/> <br ng-if="event.all_day === false"/>
<span ng-if="event.all_day == 'false'"> <span ng-if="event.all_day === false">
{{ 'app.admin.events.from_TIME' | translate:{TIME:(event.start_date | amDateFormat:'LT')} }} {{ 'app.admin.events.from_TIME' | translate:{TIME:(event.start_date | amDateFormat:'LT')} }}
<span class="text-sm font-thin" translate>{{ 'app.admin.events.to_time' }}</span> <span class="text-sm font-thin" translate>{{ 'app.admin.events.to_time' }}</span>
{{event.end_date | amDateFormat:'LT'}} {{event.end_date | amDateFormat:'LT'}}

View File

@ -6,12 +6,12 @@ class EventPolicy < ApplicationPolicy
class Scope < Scope class Scope < Scope
def resolve def resolve
if user.nil? || (user && !user.admin? && !user.manager?) if user.nil? || (user && !user.admin? && !user.manager?)
scope.includes(:event_image, :event_files, :availability, :category) scope.includes(:event_image, :event_files, :availability, :category, :event_price_categories, :age_range, :events_event_themes, :event_themes)
.where('availabilities.start_at >= ?', DateTime.current) .where('availabilities.start_at >= ?', DateTime.current)
.order('availabilities.start_at ASC') .order('availabilities.start_at ASC')
.references(:availabilities) .references(:availabilities)
else else
scope.includes(:event_image, :event_files, :availability, :category) scope.includes(:event_image, :event_files, :availability, :category, :event_price_categories, :age_range, :events_event_themes, :event_themes)
.references(:availabilities) .references(:availabilities)
end end
end end