From 7d4bcbd30c1ef72b0f4735e81e3eb3b80f3a13d0 Mon Sep 17 00:00:00 2001
From: sipp11
Date: Wed, 25 Jul 2018 17:57:18 +0900
Subject: [PATCH] UI WIP
---
src/components/FloatPane.js | 1 +
src/components/StopList.js | 3 +--
src/components/StopTimeOne.js | 1 +
src/components/TripForm.js | 7 ++++---
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/components/FloatPane.js b/src/components/FloatPane.js
index 9b5eb65..0f26a89 100644
--- a/src/components/FloatPane.js
+++ b/src/components/FloatPane.js
@@ -37,6 +37,7 @@ const StyledLRPaddingNav = styled.nav`
padding-right: 10px;
padding-left: 0;
margin-bottom: 5px !important;
+min-height: 44px;
`
const StyledPaneToggler = styled.div`
diff --git a/src/components/StopList.js b/src/components/StopList.js
index b62cda6..9bf83bc 100644
--- a/src/components/StopList.js
+++ b/src/components/StopList.js
@@ -10,7 +10,6 @@ const StyledBox = styled.div`
background: #fafafa;
`
-
class StopList extends Component {
componentWillMount() {
@@ -60,7 +59,7 @@ class StopList extends Component {
{ele.stop_id} - {ele.name}
))}
- {results.length === 0 &&
+ {results.length === 0 &&
No stop found}
diff --git a/src/components/StopTimeOne.js b/src/components/StopTimeOne.js
index f2e0874..30ffd3d 100644
--- a/src/components/StopTimeOne.js
+++ b/src/components/StopTimeOne.js
@@ -33,6 +33,7 @@ class StopTimeOne extends Component {
Stop this.toggleEditMode()}>EDIT
{item.sequence}. {item.stop.stop_id}
+ {item.stop.name}
diff --git a/src/components/TripForm.js b/src/components/TripForm.js
index a30c7fe..29b16ce 100644
--- a/src/components/TripForm.js
+++ b/src/components/TripForm.js
@@ -223,7 +223,7 @@ class TripForm extends Component {
render () {
const one = this.state
- const { frequency } = this.props
+ const { frequency, stoptime } = this.props
const { fetching } = this.props.trip
// redirect to view page if no data
const { agencyId, routeId } = this.props.match.params
@@ -247,8 +247,9 @@ class TripForm extends Component {
trip={this.state.id}
toggleEditMode={this.toggleNewStopTime} /> }
- {this.props.stoptime.results.map(
- ele => )}
+ {stoptime.results
+ .sort((a, b) => a.sequence - b.sequence)
+ .map(ele => )}
)
}