|
|
|
@ -186,7 +186,7 @@ class FareRulesForm extends Component {
|
|
|
|
|
result = { |
|
|
|
|
target: { |
|
|
|
|
name: fieldName, |
|
|
|
|
value: resp.map(el => el.value.stop_id), |
|
|
|
|
value: resp.map(el => el.value.stop_id).join(','), |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if (evt.action === 'clear') { |
|
|
|
@ -215,7 +215,7 @@ class FareRulesForm extends Component {
|
|
|
|
|
result = { |
|
|
|
|
target: { |
|
|
|
|
name: fieldName, |
|
|
|
|
value: resp.map(el => el.value.stop_id), |
|
|
|
|
value: resp.map(el => el.value.stop_id).join(','), |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if (evt.action === 'clear') { |
|
|
|
@ -244,7 +244,8 @@ class FareRulesForm extends Component {
|
|
|
|
|
DELETE</button> |
|
|
|
|
</div>} |
|
|
|
|
<div className="control"> |
|
|
|
|
<Link to={`/fare`} className="button is-text">Cancel</Link> |
|
|
|
|
<Link to={`/fare${one.fare ? `/attributes/${one.fare.id}` : ''}`} |
|
|
|
|
className="button is-text">Cancel</Link> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</StyledFareRulesForm> |
|
|
|
@ -259,7 +260,7 @@ class FareRulesForm extends Component {
|
|
|
|
|
// this is a create form
|
|
|
|
|
if (ruleID === undefined) { |
|
|
|
|
if (one.justSubmit === true && !fetching) { |
|
|
|
|
return <Redirect to={`/fare`} /> |
|
|
|
|
return <Redirect to={`/fare/attributes/${one.fare.id}`} /> |
|
|
|
|
} |
|
|
|
|
return this.renderForm() |
|
|
|
|
} |
|
|
|
@ -269,7 +270,7 @@ class FareRulesForm extends Component {
|
|
|
|
|
|
|
|
|
|
// redirect to fare list if submitted
|
|
|
|
|
if (one.justSubmit === true && !fetching) { |
|
|
|
|
return <Redirect to={`/fare`} /> |
|
|
|
|
return <Redirect to={`/fare/attributes/${one.fare.id}`} /> |
|
|
|
|
} |
|
|
|
|
return this.renderForm() |
|
|
|
|
} |
|
|
|
|