Finished phase005
CI / scan_ruby (push) Failing after 1m5s
CI / scan_js (push) Failing after 6s
CI / lint (push) Failing after 1m29s

This commit is contained in:
2026-09-16 15:34:50 -06:00
parent a3a65c24ed
commit 0826d267f2
38 changed files with 1596 additions and 9 deletions
+38
View File
@@ -0,0 +1,38 @@
<main>
<p><%= notice %></p>
<h1>Vehicles</h1>
<nav aria-label="Vehicle filters">
<%= link_to "Active", vehicles_path %> |
<%= link_to "Inactive", vehicles_path(status: "inactive") %> |
<%= link_to "All", vehicles_path(status: "all") %>
</nav>
<p><%= link_to "New vehicle", new_vehicle_path %></p>
<% if @vehicles.any? %>
<table>
<thead>
<tr>
<th>Vehicle</th>
<th>Licence plate</th>
<th>Odometer</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<% @vehicles.each do |vehicle| %>
<tr>
<td><%= link_to "#{vehicle.year} #{vehicle.make} #{vehicle.model}", vehicle %></td>
<td><%= vehicle.licence_plate %></td>
<td><%= number_with_delimiter(vehicle.current_odometer) %></td>
<td><%= vehicle.active? ? "Active" : "Inactive" %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>No vehicles found.</p>
<% end %>
</main>