Browse Source

bugfix - tripform

dev
sipp11 7 years ago
parent
commit
2bfec7f796
  1. 5
      src/components/TripForm.js
  2. 2
      src/store.js

5
src/components/TripForm.js

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

2
src/store.js

@ -10,7 +10,7 @@ import gruntApp from './reducers'
const persistConfig = { const persistConfig = {
key: 'root', key: 'root',
storage, storage,
blacklist: ['agency', 'route', 'calendar', 'geo'] blacklist: ['agency', 'calendar']
} }
const middleware = [ thunk, apiMiddleware ] const middleware = [ thunk, apiMiddleware ]

Loading…
Cancel
Save