diff options
| author | Zog | 2018-01-31 11:17:02 +0100 |
|---|---|---|
| committer | cedricnjanga | 2018-02-06 11:04:59 -0800 |
| commit | 607cc587b2b2719feb3fafaf9a1b754cada143a9 (patch) | |
| tree | 1500c4cb7147d08e461a132496e7d7efd0db1f76 | |
| parent | 19a25d3ebb1ce40483104c6cc19c8e1654413e65 (diff) | |
| download | chouette-core-607cc587b2b2719feb3fafaf9a1b754cada143a9.tar.bz2 | |
Refs #5750; Remove useless validation
| -rw-r--r-- | app/javascript/vehicle_journeys/actions/index.js | 17 |
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) => ({ |
