@@ -58,7 +58,7 @@ class MeetingsController < ApplicationController
58
58
def index
59
59
@query = load_query
60
60
@meetings = load_meetings ( @query )
61
- render ' index' , locals : { menu_name : project_or_global_menu }
61
+ render " index" , locals : { menu_name : project_or_global_menu }
62
62
end
63
63
64
64
current_menu_item :index do
@@ -70,11 +70,11 @@ def show
70
70
if @meeting . is_a? ( StructuredMeeting )
71
71
render ( Meetings ::ShowComponent . new ( meeting : @meeting , project : @project ) )
72
72
elsif @meeting . agenda . present? && @meeting . agenda . locked?
73
- params [ :tab ] ||= ' minutes'
73
+ params [ :tab ] ||= " minutes"
74
74
end
75
75
end
76
76
77
- def create
77
+ def create # rubocop:disable Metrics/AbcSize
78
78
call =
79
79
if @copy_from
80
80
::Meetings ::CopyService
@@ -90,14 +90,15 @@ def create
90
90
text = I18n . t ( :notice_successful_create )
91
91
if User . current . time_zone . nil?
92
92
link = I18n . t ( :notice_timezone_missing , zone : Time . zone )
93
- text += " #{ view_context . link_to ( link , { controller : '/my' , action : :settings , anchor : 'pref_time_zone' } , class : 'link_to_profile' ) } "
93
+ text += " #{ view_context . link_to ( link , { controller : '/my' , action : :settings , anchor : 'pref_time_zone' } ,
94
+ class : 'link_to_profile' ) } "
94
95
end
95
96
flash [ :notice ] = text . html_safe # rubocop:disable Rails/OutputSafety
96
97
97
- redirect_to action : ' show' , id : call . result
98
+ redirect_to action : " show" , id : call . result
98
99
else
99
100
@meeting = call . result
100
- render template : ' meetings/new' , project_id : @project , locals : { copy_from : @copy_from }
101
+ render template : " meetings/new" , project_id : @project , locals : { copy_from : @copy_from }
101
102
end
102
103
end
103
104
@@ -114,13 +115,13 @@ def copy
114
115
. call ( save : false )
115
116
116
117
@meeting = call . result
117
- render action : ' new' , project_id : @project , locals : { copy_from : }
118
+ render action : " new" , project_id : @project , locals : { copy_from : }
118
119
end
119
120
120
121
def destroy
121
122
@meeting . destroy
122
123
flash [ :notice ] = I18n . t ( :notice_successful_delete )
123
- redirect_to action : ' index' , project_id : @project
124
+ redirect_to action : " index" , project_id : @project
124
125
end
125
126
126
127
def edit
@@ -155,9 +156,9 @@ def update
155
156
@meeting . attributes = @converted_params
156
157
if @meeting . save
157
158
flash [ :notice ] = I18n . t ( :notice_successful_update )
158
- redirect_to action : ' show' , id : @meeting
159
+ redirect_to action : " show" , id : @meeting
159
160
else
160
- render action : ' edit'
161
+ render action : " edit"
161
162
end
162
163
end
163
164
@@ -239,7 +240,7 @@ def notify
239
240
flash [ :notice ] = I18n . t ( :notice_successful_notification )
240
241
else
241
242
flash [ :error ] = I18n . t ( :error_notification_with_errors ,
242
- recipients : result . errors . map ( &:name ) . join ( '; ' ) )
243
+ recipients : result . errors . map ( &:name ) . join ( "; " ) )
243
244
end
244
245
245
246
redirect_to action : :show , id : @meeting
@@ -256,7 +257,7 @@ def load_query
256
257
query = apply_default_filter_if_none_given ( query )
257
258
258
259
if @project
259
- query . where ( "project_id" , '=' , @project . id )
260
+ query . where ( "project_id" , "=" , @project . id )
260
261
end
261
262
262
263
query
@@ -266,6 +267,7 @@ def apply_default_filter_if_none_given(query)
266
267
return query if query . filters . any?
267
268
268
269
query . where ( "time" , "=" , Queries ::Meetings ::Filters ::TimeFilter ::FUTURE_VALUE )
270
+ query . where ( "invited_user_id" , "=" , [ User . current . id . to_s ] )
269
271
end
270
272
271
273
def load_meetings ( query )
@@ -337,15 +339,15 @@ def structured_meeting_params
337
339
338
340
def meeting_type ( given_type )
339
341
case given_type
340
- when ' dynamic'
341
- ' StructuredMeeting'
342
+ when " dynamic"
343
+ " StructuredMeeting"
342
344
else
343
- ' Meeting'
345
+ " Meeting"
344
346
end
345
347
end
346
348
347
349
def verify_activities_module_activated
348
- render_403 if @project && !@project . module_enabled? ( ' activity' )
350
+ render_403 if @project && !@project . module_enabled? ( " activity" )
349
351
end
350
352
351
353
def set_activity
@@ -368,12 +370,12 @@ def activity_scope
368
370
end
369
371
370
372
def determine_date_range
371
- @days = 31 # Setting.activity_days_default.to_i
373
+ @days = Setting . activity_days_default . to_i
372
374
373
375
if params [ :from ]
374
376
begin
375
- ; @date_to = params [ :from ] . to_date + 1 . day ;
376
- rescue StandardError ;
377
+ @date_to = params [ :from ] . to_date + 1 . day
378
+ rescue StandardError
377
379
end
378
380
end
379
381
@@ -395,8 +397,8 @@ def find_copy_from_meeting
395
397
396
398
def copy_attributes
397
399
{
398
- copy_agenda : params [ :copy_agenda ] == '1' ,
399
- copy_attachments : params [ :copy_attachments ] == '1' ,
400
+ copy_agenda : params [ :copy_agenda ] == "1" ,
401
+ copy_attachments : params [ :copy_attachments ] == "1"
400
402
}
401
403
end
402
404
end
0 commit comments