Fixed various issues with the new appointment form

This commit is contained in:
ricky committed 2026-08-06 20:36:35 -04:00
1 parent 10fdfba032
commit d17f58fb62
6 files changed
+74 -7

No files matched your search

@@ -6,17 +6,17 @@
<p>
<%= f.text_field :customer, label: :label_customer, class: "customer-name", autocomplete: "off", data: { autocomplete_url: "/customers/autocomplete" } %>
<%= f.hidden_field :customer_id, id: "customer_id", onchange: "this.form.requestSubmit()" %>
<%= f.hidden_field :customer_id, id: "customer_id" %>
</p>
<p>
<%= f.label :vehicle_id, l(:label_vehicle) %>
<%= f.collection_select :vehicle_id, @appointment.customer&.vehicles || [], :id, :name, { include_blank: true }, { label: false } %>
<%= f.collection_select :vehicle_id, @appointment.customer&.vehicles || [], :id, :name, { include_blank: true }, { label: false, id: "appointment_vehicle_id" } %>
</p>
<p>
<%= f.label :estimate_id, l(:label_estimate) %>
<%= f.collection_select :estimate_id, @appointment.customer&.estimates || [], :id, :name, { include_blank: true }, { label: false } %>
<%= f.collection_select :estimate_id, @appointment.customer&.estimates || [], :id, :name, { include_blank: true }, { label: false, id: "appointment_estimate_id" } %>
</p>
<p>
@@ -24,7 +24,7 @@
<%= f.collection_select :user_id, User.active.sorted, :id, :name, { include_blank: true }, { label: false } %>
</p>
<p><%= f.date_field :start_date, size: 10 %></p>
<p><%= f.datetime_local_field :start_date %></p>
<p><%= f.date_field :end_date, size: 10 %></p>
<p><%= f.number_field :estimated_hours, step: 0.1, size: 6 %></p>