Ask other plugins for the estimate appointment's extras

The Add appointment link on an estimate no longer matches the estimate's VIN to a vehicle itself; it asks
the qbo_calendar_appointment_params hook (redmine_qbo_vehicles answers with the vehicle).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
Claude committed 2026-10-31 11:34:54 -04:00
1 parent a74caaf3ae
commit 4092045b87
3 files changed
+14 -7

No files matched your search

@@ -20,14 +20,15 @@ module RedmineQboCalendar
locals: { customer: context[:customer] })
end
# Adds "Add appointment" to an estimate's page in redmine_qbo (:view_qbo_estimate_contextual),
# with the customer, the estimate and the vehicle matching its VIN filled in
# Adds "Add appointment" to an estimate's page in redmine_qbo (:view_qbo_estimate_contextual), with the
# customer and the estimate filled in, plus what other plugins add (e.g. redmine_qbo_vehicles: the vehicle)
def view_qbo_estimate_contextual(context = {})
customer = Customer.find_by(id: context[:customer_id])
return '' unless customer
context[:hook_caller].render(partial: 'customer_appointments/estimate_actions',
locals: { customer: customer, estimate_id: context[:estimate_id], vin: context[:vin] })
locals: { customer: customer, estimate_id: context[:estimate_id],
custom_fields: context[:custom_fields] })
end
end