From c7d8486e006f91dc3001c17792040b79fbfd35a1 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sun, 9 Aug 2026 22:06:44 -0400 Subject: [PATCH] Add appointment time display in tooltip and show view --- .../customer_appointments/_tooltip.html.erb | 7 ++++++ app/views/customer_appointments/show.html.erb | 22 +++++++++++++------ config/locales/en.yml | 1 + 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/app/views/customer_appointments/_tooltip.html.erb b/app/views/customer_appointments/_tooltip.html.erb index 50e1467..5ae112a 100644 --- a/app/views/customer_appointments/_tooltip.html.erb +++ b/app/views/customer_appointments/_tooltip.html.erb @@ -9,6 +9,13 @@ + <% if appointment.date %> + + + + + <% end %> + <% if appointment.customer %> diff --git a/app/views/customer_appointments/show.html.erb b/app/views/customer_appointments/show.html.erb index a735405..c1af6ff 100644 --- a/app/views/customer_appointments/show.html.erb +++ b/app/views/customer_appointments/show.html.erb @@ -17,20 +17,22 @@

- <% if @appointment.start_date %> + <% if @appointment.date %>
-
<%= @appointment.start_date.strftime('%b').upcase %>
-
<%= @appointment.start_date.day %>
+
<%= @appointment.date.strftime('%b').upcase %>
+
<%= @appointment.date.day %>
<% end %> <%= @appointment.subject %> - (<%= format_date(@appointment.start_date) %> - <% if @appointment.duration > 1 %> - - <%= format_date(@appointment.due_date) %> - <% end %>) + <% if @appointment.date %> + (<%= format_date(@appointment.date) %> <%= l(:label_at, default: 'at') %> <%= @appointment.date.strftime('%I:%M %p') %> + <% if @appointment.respond_to?(:due_date) && @appointment.due_date.present? && @appointment.duration.to_i > 1 %> + - <%= format_date(@appointment.due_date) %> + <% end %>) + <% end %>

@@ -80,6 +82,12 @@ +
+
<%= l(:label_time, default: 'Time') %>:
+
+ <%= @appointment.date ? @appointment.date.strftime('%I:%M %p') : '-' %> +
+
<%= l(:field_user) %>:
<%= link_to_user(@appointment.user) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index a10a99a..6d4e145 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -29,6 +29,7 @@ en: label_open_appointment: Open Appointment label_start_date: Start Date label_status: Status + label_time: Time label_title: Title label_upcoming_appointments: "My Upcoming Appointments" permission_manage_customer_appointments: Manage Customer Appointments
<%= l(:label_time) %><%= appointment.date.strftime('%I:%M %p') %>
<%= l(:label_customer, default: "Customer") %>