aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2018-04-09 14:03:28 +0200
committerGitHub2018-04-09 14:03:28 +0200
commit2ef506e97dd0e65a475bd9dd67a4f645d3eac045 (patch)
tree444fc17c6cc79308c727dcb88ad55d9df4401f18
parentf9da9a4bda21ef1a4e73b0d5e0e960ab43b27527 (diff)
parentccd2581f1a4fb88d2324df190fa58a5c07e2afa0 (diff)
downloadchouette-core-2ef506e97dd0e65a475bd9dd67a4f645d3eac045.tar.bz2
Merge pull request #451 from af83/6311-fix-calendars-assignment
Fix Purchase Windows assignment. Refs #6311
-rw-r--r--app/javascript/vehicle_journeys/actions/index.js9
-rw-r--r--app/views/autocomplete_purchase_windows/index.rabl13
2 files changed, 9 insertions, 13 deletions
diff --git a/app/javascript/vehicle_journeys/actions/index.js b/app/javascript/vehicle_journeys/actions/index.js
index e00e9b1b0..537dcfc06 100644
--- a/app/javascript/vehicle_journeys/actions/index.js
+++ b/app/javascript/vehicle_journeys/actions/index.js
@@ -113,14 +113,9 @@ const actions = {
type : 'EDIT_PURCHASE_WINDOWS_VEHICLEJOURNEY_MODAL',
vehicleJourneys
}),
- selectPurchaseWindowsModal: (selectedWindow) =>({
+ selectPurchaseWindowsModal: (selectedItem) =>({
type: 'SELECT_PURCHASE_WINDOW_MODAL',
- selectedItem:{
- id: selectedWindow.id,
- name: selectedWindow.name,
- color: selectedWindow.color,
- objectid: selectedWindow.objectid
- }
+ selectedItem
}),
addSelectedPurchaseWindow: () => ({
type: 'ADD_SELECTED_PURCHASE_WINDOW'
diff --git a/app/views/autocomplete_purchase_windows/index.rabl b/app/views/autocomplete_purchase_windows/index.rabl
index 1d0287602..bdc513c31 100644
--- a/app/views/autocomplete_purchase_windows/index.rabl
+++ b/app/views/autocomplete_purchase_windows/index.rabl
@@ -2,11 +2,12 @@ collection @purchase_windows, :object_root => false
node do |window|
{
- :id => window.id,
- :name => window.name,
- :objectid => window.objectid,
- :color => window.color,
- :short_id => window.get_objectid.short_id,
- :text => "<strong><span class='fa fa-circle' style='color:" + (window.color ? window.color : '#4b4b4b') + "'></span> " + window.name + " - " + window.get_objectid.short_id + "</strong>"
+ id: window.id,
+ name: window.name,
+ objectid: window.objectid,
+ color: window.color,
+ short_id: window.get_objectid.short_id,
+ bounding_dates: window.bounding_dates,
+ text: "<strong><span class='fa fa-circle' style='color:" + (window.color ? window.color : '#4b4b4b') + "'></span> " + window.name + " - " + window.get_objectid.short_id + "</strong>"
}
end