aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-01-31 11:17:02 +0100
committercedricnjanga2018-02-06 11:04:59 -0800
commit607cc587b2b2719feb3fafaf9a1b754cada143a9 (patch)
tree1500c4cb7147d08e461a132496e7d7efd0db1f76
parent19a25d3ebb1ce40483104c6cc19c8e1654413e65 (diff)
downloadchouette-core-607cc587b2b2719feb3fafaf9a1b754cada143a9.tar.bz2
Refs #5750; Remove useless validation
-rw-r--r--app/javascript/vehicle_journeys/actions/index.js17
1 files changed, 1 insertions, 16 deletions
diff --git a/app/javascript/vehicle_journeys/actions/index.js b/app/javascript/vehicle_journeys/actions/index.js
index b01158212..4a4ec371d 100644
--- a/app/javascript/vehicle_journeys/actions/index.js
+++ b/app/javascript/vehicle_journeys/actions/index.js
@@ -382,23 +382,8 @@ const actions = {
},
validate : (dispatch, vehicleJourneys, next) => {
- let valid = true
- let vj, vjas
- for (vj of vehicleJourneys){
- vj.errors = false
- for(vjas of vj.vehicle_journey_at_stops){
- vjas.errors = null
- if (vjas.area_kind == "non_commercial" && parseInt(vjas.departure_time.hour) == 0 && parseInt(vjas.departure_time.minute) == 0){
- vjas.errors = "Champ requis"
- vj.errors = true
- valid = false
- }
- }
- }
dispatch(actions.didValidateVehicleJourneys(vehicleJourneys))
- if(valid){
- actions.submitVehicleJourneys(dispatch, vehicleJourneys, next)
- }
+ actions.submitVehicleJourneys(dispatch, vehicleJourneys, next)
},
didValidateVehicleJourneys : (vehicleJourneys) => ({