Add fallback for last service date and introduce 'unknown' label

This commit is contained in:
2026-08-08 14:30:11 -04:00
parent bdfad0d020
commit 7158a8b02c
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -54,7 +54,7 @@
<% mileage = last.custom_values.find_by(custom_field_id: CustomField.find_by_name("Mileage").id) %> <% mileage = last.custom_values.find_by(custom_field_id: CustomField.find_by_name("Mileage").id) %>
<% if mileage %> <% if mileage %>
<p> <p>
<b><%=t(:label_last_service) %></b> <%= last.closed_on.to_date %> <b><%=t(:label_last_service) %></b> <%= last&.closed_on&.to_date || l(:label_unknown) %>
at <%= mileage.value %> at <%= mileage.value %>
<%=t(:label_miles) %> <%=t(:label_miles) %>
</p> </p>
+1
View File
@@ -31,6 +31,7 @@ en:
label_new_vehicle: "New Customer Vehicle" label_new_vehicle: "New Customer Vehicle"
label_no_vehicles: "There are no vehicles containing the term(s)" label_no_vehicles: "There are no vehicles containing the term(s)"
label_search_vehicles: "Search Vehicles" label_search_vehicles: "Search Vehicles"
label_unknown: "Unknown"
label_vehicle: "Vehicle" label_vehicle: "Vehicle"
label_year: "Year" label_year: "Year"
no_customer: "Customer no longer exists" no_customer: "Customer no longer exists"