|
|
|
@ -37,7 +37,7 @@ class TripForm extends Component {
|
|
|
|
|
|
|
|
|
|
state = { |
|
|
|
|
id: null, |
|
|
|
|
trip_id: "", |
|
|
|
|
trip_id: '', |
|
|
|
|
service: null, |
|
|
|
|
frequency_set: [], |
|
|
|
|
newStopTime: false, |
|
|
|
@ -69,9 +69,10 @@ class TripForm extends Component {
|
|
|
|
|
|
|
|
|
|
handleSubmit() { |
|
|
|
|
const { id } = this.state |
|
|
|
|
let body = {...this.state } |
|
|
|
|
let body = { ...this.state } |
|
|
|
|
delete body.id |
|
|
|
|
delete body.newStopTime |
|
|
|
|
delete body.newFrequency |
|
|
|
|
if (id !== null) { |
|
|
|
|
store.dispatch(updateTrip(id, body)) |
|
|
|
|
} else { |
|
|
|
|