only show furture appointments

This commit is contained in:
ricky committed 2026-08-08 11:10:49 -04:00
1 parent 5960127b26
commit f3583528ea
1 file changed
+2 -2
@@ -28,9 +28,9 @@ class CustomerAppointmentsController < ApplicationController
def index def index
if params[:project_id] if params[:project_id]
@project = Project.find(params[:project_id]) @project = Project.find(params[:project_id])
@appointments = CustomerAppointment.where(project: @project).order(:start_date) @appointments = CustomerAppointment.where(project: @project).where('date >= ?', Time.zone.now.beginning_of_day).order(:date)
else else
@appointments = CustomerAppointment.order(:start_date) @appointments = CustomerAppointment.where('date >= ?', Time.zone.now.beginning_of_day).order(:date)
end end
end end