aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/vehicle_journeys/actions
diff options
context:
space:
mode:
authorcedricnjanga2017-10-27 14:47:19 +0200
committercedricnjanga2017-10-27 14:47:19 +0200
commitdf12d7b9bc62cab376106ec2673a19d913d3f43b (patch)
treec07e4ddd9057f1885a786dfe2b11222de53cad71 /app/javascript/vehicle_journeys/actions
parent90174518bcffbb3b347e1fb28894d8317575c6e6 (diff)
downloadchouette-core-df12d7b9bc62cab376106ec2673a19d913d3f43b.tar.bz2
Refs #4794
Added some UX changes on VehicleJourney collection route - truncate the id of the VJ and the JP to 10 characters - only show the 3 first timetable in the metas of the VJ - add a link to the time_table#show in the EditTimeTable modal
Diffstat (limited to 'app/javascript/vehicle_journeys/actions')
-rw-r--r--app/javascript/vehicle_journeys/actions/index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/vehicle_journeys/actions/index.js b/app/javascript/vehicle_journeys/actions/index.js
index 8d7c4d7a0..95c739893 100644
--- a/app/javascript/vehicle_journeys/actions/index.js
+++ b/app/javascript/vehicle_journeys/actions/index.js
@@ -269,7 +269,10 @@ const actions = {
type: 'RECEIVE_TOTAL_COUNT',
total
}),
- humanOID: (oid) => oid.split(':')[2].split("-").pop(),
+ humanOID: (oid) => {
+ let shortOId = oid.split(':')[2].split("-").pop()
+ return shortOId.length > 10 ? `${shortOId.slice(0, 10)}...` : shortOId
+ },
fetchVehicleJourneys : (dispatch, currentPage, nextPage, queryString) => {
if(currentPage == undefined){
currentPage = 1