| 
				
			 | 
			
			
				@@ -2,11 +2,20 @@ class DashboardController < ApplicationController 
			 | 
		
	
		
			
			| 
				2
			 | 
			
				2
			 | 
			
			
				   before_action :require_login! 
			 | 
		
	
		
			
			| 
				3
			 | 
			
				3
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				4
			 | 
			
				4
			 | 
			
			
				   def home 
			 | 
		
	
		
			
			| 
				5
			 | 
			
				
			 | 
			
			
				-    @user_organized = current_person.participants.includes(:activity).where(is_organizer: true) 
			 | 
		
	
		
			
			| 
				6
			 | 
			
				
			 | 
			
			
				-    @need_response = current_person.participants.includes(:activity).where(attending: nil) 
			 | 
		
	
		
			
			| 
				7
			 | 
			
				
			 | 
			
			
				-    @upcoming = current_person.activities.where('start > ?', DateTime.now).includes(:participants) 
			 | 
		
	
		
			
			| 
				8
			 | 
			
				
			 | 
			
			
				-    @upcoming = current_person.participants 
			 | 
		
	
		
			
			| 
				9
			 | 
			
				
			 | 
			
			
				-      .includes(:activity).joins(:activity) 
			 | 
		
	
		
			
			| 
				10
			 | 
			
				
			 | 
			
			
				-      .where("activities.start >= ?", DateTime.now) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				5
			 | 
			
			
				+    @user_organized = current_person 
			 | 
		
	
		
			
			| 
				
			 | 
			
				6
			 | 
			
			
				+      .participants 
			 | 
		
	
		
			
			| 
				
			 | 
			
				7
			 | 
			
			
				+      .joins(:activity) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8
			 | 
			
			
				+      .where(is_organizer: true) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				9
			 | 
			
			
				+      .order('activities.start ASC') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				10
			 | 
			
			
				+    @need_response = current_person 
			 | 
		
	
		
			
			| 
				
			 | 
			
				11
			 | 
			
			
				+      .participants 
			 | 
		
	
		
			
			| 
				
			 | 
			
				12
			 | 
			
			
				+      .joins(:activity) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				13
			 | 
			
			
				+      .where(attending: nil) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				14
			 | 
			
			
				+      .order('activities.start ASC') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				15
			 | 
			
			
				+    @upcoming = current_person 
			 | 
		
	
		
			
			| 
				
			 | 
			
				16
			 | 
			
			
				+      .participants 
			 | 
		
	
		
			
			| 
				
			 | 
			
				17
			 | 
			
			
				+      .joins(:activity) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				18
			 | 
			
			
				+      .where('activities.start >= ?', DateTime.now) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				19
			 | 
			
			
				+      .order('activities.start ASC') 
			 | 
		
	
		
			
			| 
				11
			 | 
			
				20
			 | 
			
			
				   end 
			 | 
		
	
		
			
			| 
				12
			 | 
			
				21
			 | 
			
			
				 end 
			 |