|
|
|
@ -3,7 +3,8 @@ import styled from 'styled-components'
|
|
|
|
|
import { connect } from 'react-redux' |
|
|
|
|
import { Redirect, Link } from 'react-router-dom' |
|
|
|
|
|
|
|
|
|
import HorizontalInput from './parts/HorizontalInput' |
|
|
|
|
import Input from './parts/Input' |
|
|
|
|
import Select from './parts/Select' |
|
|
|
|
import { |
|
|
|
|
mapCenterUpdate, draggableMarkerEnable, draggableMarkerDisable |
|
|
|
|
} from '../actions' |
|
|
|
@ -141,14 +142,14 @@ class StopForm extends Component {
|
|
|
|
|
<StyledStopForm> |
|
|
|
|
<h1 className="title">{one.stop_id || 'New Stop'} </h1> |
|
|
|
|
<div className="content"> |
|
|
|
|
<HorizontalInput |
|
|
|
|
<Input |
|
|
|
|
label="Stop ID" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="stop_id" |
|
|
|
|
value={one.stop_id || ''} |
|
|
|
|
handleChange={this.handleChange} /> |
|
|
|
|
|
|
|
|
|
<HorizontalInput |
|
|
|
|
<Input |
|
|
|
|
label="Name" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="name" |
|
|
|
@ -161,49 +162,57 @@ class StopForm extends Component {
|
|
|
|
|
{latlon[0] && latlon[0].toFixed(4)}, {latlon[1] && latlon[1].toFixed(4)} |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<HorizontalInput |
|
|
|
|
<Input |
|
|
|
|
label="Stop code" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="stop_code" |
|
|
|
|
value={one.stop_code || ''} |
|
|
|
|
handleChange={this.handleChange} /> |
|
|
|
|
|
|
|
|
|
<HorizontalInput |
|
|
|
|
<Input |
|
|
|
|
label="Description" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="stop_desc" |
|
|
|
|
value={one.stop_desc || ''} |
|
|
|
|
handleChange={this.handleChange} /> |
|
|
|
|
|
|
|
|
|
<HorizontalInput |
|
|
|
|
<Input |
|
|
|
|
label="Zone ID" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="zone_id" |
|
|
|
|
value={one.zone_id || ''} |
|
|
|
|
handleChange={this.handleChange} /> |
|
|
|
|
|
|
|
|
|
<HorizontalInput |
|
|
|
|
<Select |
|
|
|
|
label="Location Type" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="location_type" |
|
|
|
|
value={one.location_type || ''} |
|
|
|
|
handleChange={this.handleChange} /> |
|
|
|
|
|
|
|
|
|
<HorizontalInput |
|
|
|
|
value={one.location_type || '0'} |
|
|
|
|
handleChange={this.handleChange} |
|
|
|
|
choices={[ |
|
|
|
|
{ value: '0', label: 'Stop' }, |
|
|
|
|
{ value: '1', label: 'Station' }, |
|
|
|
|
{ value: '2', label: 'Station Entrance/Exit' }, |
|
|
|
|
]} /> |
|
|
|
|
|
|
|
|
|
<Input |
|
|
|
|
label="Timezone" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="stop_timezone" |
|
|
|
|
value={one.stop_timezone || ''} |
|
|
|
|
value={one.stop_timezone || 'Asia/Bangkok'} |
|
|
|
|
handleChange={this.handleChange} /> |
|
|
|
|
|
|
|
|
|
<HorizontalInput |
|
|
|
|
<Select |
|
|
|
|
label="Wheelchair" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="wheelchair_boarding" |
|
|
|
|
value={one.wheelchair_boarding || ''} |
|
|
|
|
handleChange={this.handleChange} /> |
|
|
|
|
|
|
|
|
|
{/* <HorizontalInput |
|
|
|
|
value={one.wheelchair_boarding || '0'} |
|
|
|
|
handleChange={this.handleChange} |
|
|
|
|
choices={[ |
|
|
|
|
{ value: '0', label: 'No information' }, |
|
|
|
|
{ value: '1', label: 'Possible (partially or fully)' }, |
|
|
|
|
{ value: '2', label: 'Not possible' }, |
|
|
|
|
]} /> |
|
|
|
|
|
|
|
|
|
{/* <Input |
|
|
|
|
label="Parent Station" |
|
|
|
|
type="text" |
|
|
|
|
fieldName="parent_station" |
|
|
|
|