mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-04 04:40:43 -04:00
Add customer show hook to display upcoming appointments and refactor appointment list rendering
This commit is contained in:
1 parent
048b7d4198
commit
3c65700b52
5 files changed
+172
-73
No files matched your search
@@ -0,0 +1,73 @@
|
||||
<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>
|
||||
@@ -0,0 +1,57 @@
|
||||
<table class="list">
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<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 %>
|
||||
|
||||
</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>
|
||||
@@ -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 } %>
|
||||
Reference in new issue
Block a user