From ba16d88659cc697426eb527cee9ed8a488afda75 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sat, 8 Aug 2026 11:09:50 -0400 Subject: [PATCH] only show add link for today and future dates --- app/views/common/_calendar.html.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb index dc1116c..74cf1d9 100644 --- a/app/views/common/_calendar.html.erb +++ b/app/views/common/_calendar.html.erb @@ -65,10 +65,12 @@ <%= day.day %> (<%= abbr_day_name(day.cwday) %>) - <%= link_to sprite_icon('add'), - new_customer_appointment_path(start_date: day), - class: 'icon-only icon-add', - title: l(:label_appointment_new, default: 'New Appointment') %> + <% if day >= User.current.today %> + <%= link_to sprite_icon('add'), + new_customer_appointment_path(start_date: day), + class: 'icon-only icon-add', + title: l(:label_appointment_new, default: 'New Appointment') %> + <% end %>

<%