mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-07-02 00:21:09 -04:00
Compare commits
2 Commits
2026.4.0
...
6da0972476
| Author | SHA1 | Date | |
|---|---|---|---|
| 6da0972476 | |||
| 35542ba1b9 |
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo_vehicles do
|
|||||||
name 'Redmine QBO Vehicles plugin'
|
name 'Redmine QBO Vehicles plugin'
|
||||||
author 'Rick Barrette'
|
author 'Rick Barrette'
|
||||||
description 'This is a plugin for Redmine to intergrate with the redmine_qbo plugin to provide vehicle data tracking'
|
description 'This is a plugin for Redmine to intergrate with the redmine_qbo plugin to provide vehicle data tracking'
|
||||||
version '2026.4.0'
|
version '2026.4.1'
|
||||||
url 'https://github.com/rickbarrette/redmine_qbo_vehicles'
|
url 'https://github.com/rickbarrette/redmine_qbo_vehicles'
|
||||||
author_url 'https://barrettefabrication.com'
|
author_url 'https://barrettefabrication.com'
|
||||||
requires_redmine version_or_higher: '6.1.0'
|
requires_redmine version_or_higher: '6.1.0'
|
||||||
|
|||||||
@@ -18,13 +18,17 @@ module Vehicles
|
|||||||
def view_issues_form_details_bottom(context={})
|
def view_issues_form_details_bottom(context={})
|
||||||
|
|
||||||
# Load the customer's vehicles for selection in the issue form.
|
# Load the customer's vehicles for selection in the issue form.
|
||||||
|
vehicles = context[:issue].customer&.vehicles || []
|
||||||
|
|
||||||
context[:controller].send(:render_to_string, {
|
context[:controller].send(:render_to_string, {
|
||||||
partial: 'issues/form_hook_vehicles',
|
partial: 'issues/form_hook_vehicles',
|
||||||
locals: {
|
locals: {
|
||||||
vehicle: context[:form].select( :vehicle_id,
|
vehicle: context[:form].select(
|
||||||
context[:issue].customer ? context[:issue].customer.vehicles.pluck(:name, :id) : [],
|
:vehicle_id,
|
||||||
selected: context[:issue].vehicle ? context[:issue].vehicle.id : nil,
|
vehicles.map { |v| [v.name, v.id] },
|
||||||
include_blank: true )
|
selected: context[:issue].vehicle&.id,
|
||||||
|
include_blank: true
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user