Add customer show hook to display upcoming appointments and refactor appointment list rendering

This commit is contained in:
ricky committed 2026-08-10 15:50:23 -04:00
1 parent 048b7d4198
commit 3c65700b52
5 files changed
+172 -73

No files matched your search

+1 -73
View File
@@ -11,76 +11,4 @@
</div>
<table class="list">
<thead>
<tr>
<th><%= l(:label_customer) %></th>
<th><%= l(:label_vehicle) %></th>
<th><%= l(:label_appointment) %></th>
<th><%= l(:label_user) %></th>
<th><%= l(:label_date) %></th>
<th><%= l(:label_status) %></th>
</tr>
</thead>
<tbody>
<% @appointments.each do |appointment| %>
<tr>
<td>
<%= link_to appointment.customer unless appointment.customer.nil? %>
</td>
<td>
<%= link_to appointment.vehicle unless appointment.vehicle.nil? %>
</td>
<td>
<%= link_to appointment %>
</td>
<td>
<%= link_to appointment.user unless appointment.user.nil? %>
</td>
<td>
<%= format_date(
appointment.date
) %>
</td>
<td>
<%= appointment.status %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= render partial: "list", locals: { appointments: @appointments } %>