Change: departureuser4 to work correctly and updated UI for disruptions
This commit is contained in:
parent
19282607ba
commit
2b8c08e082
@ -3,7 +3,7 @@
|
||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestDepartureBoard.xsd",
|
||||
"servertime": "10:11",
|
||||
"serverdate": "2020-12-10",
|
||||
"Departure": [
|
||||
"Departure":
|
||||
{
|
||||
"name": "Buss 928",
|
||||
"sname": "928",
|
||||
@ -26,6 +26,5 @@
|
||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=261732%2F87569%2F149176%2F12656%2F80%3Fdate%3D2020-12-10%26station_evaId%3D14225001%26station_type%3Ddep%26format%3Djson%26"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@ class DisruptionButton extends Button {
|
||||
|
||||
|
||||
genDisrupt = () => {
|
||||
this.state.disruption = ""
|
||||
this.state.disruption = undefined
|
||||
if(this.state.jsonLocation === "ex1"){
|
||||
for (let stopPoint of ex1.affectedStopPoints) {
|
||||
if(stopPoint.gid === globData.user.stoppointgid){
|
||||
|
@ -9,7 +9,7 @@ import Button from './Button.js';
|
||||
import './css/NavigationDrawer.css';
|
||||
|
||||
import userIcon from '../img/user.svg';
|
||||
import FindStops from './FindStops.js';
|
||||
import { glob } from 'glob';
|
||||
|
||||
|
||||
class NavigationDrawer extends Component {
|
||||
@ -44,6 +44,10 @@ class NavigationDrawer extends Component {
|
||||
showPopup = () => {
|
||||
this.popupElem.current.show();
|
||||
};
|
||||
|
||||
updatePage = () => {
|
||||
globalData.currentPage.render();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@ -51,10 +55,8 @@ class NavigationDrawer extends Component {
|
||||
<Popup ref={this.popupElem}>
|
||||
<h3>Välj hållplats:</h3>
|
||||
<ul>
|
||||
<li><Button>Hållplats 1</Button></li>
|
||||
<li><Button>Hållplats 2</Button></li>
|
||||
<li><Button>Hållplats 3</Button></li>
|
||||
<li><Button>Hållplats 4</Button></li>
|
||||
<li><DisruptionButton path={"ex1"} onClick={[]}>Störnings Scenario 1</DisruptionButton></li>
|
||||
<li><DisruptionButton path={"ex2"} onClick={[]}>Störnings Scenario 2</DisruptionButton></li>
|
||||
</ul>
|
||||
</Popup>
|
||||
|
||||
@ -69,9 +71,7 @@ class NavigationDrawer extends Component {
|
||||
<SelectUserButton path={"user2"} username="user2"/>
|
||||
<SelectUserButton path={"user3"} username="user3"/>
|
||||
<SelectUserButton path={"user4"} username="user4"/>
|
||||
<FindStops/>
|
||||
<DisruptionButton path={"ex1"} onClick={[this.showPopup, this.close]} />
|
||||
<DisruptionButton path={"ex2"} onClick={[this.showPopup, this.close]} />
|
||||
<Button onClick={[this.showPopup, this.close]}><span>Generera Störning</span></Button>
|
||||
</div>
|
||||
<hr />
|
||||
<span id="version">Projektgrupp 3 - Utmaning 7</span>
|
||||
|
Loading…
Reference in New Issue
Block a user