gdynia now has 1 based stop sequence
This commit is contained in:
parent
f8c3f77c83
commit
80fcc890fa
@ -4,7 +4,7 @@ import { Component, Prop, Watch } from "vue-property-decorator";
|
|||||||
import urls from '../urls';
|
import urls from '../urls';
|
||||||
import * as moment from "moment";
|
import * as moment from "moment";
|
||||||
import { FetchingState, Jsonified } from "../utils";
|
import { FetchingState, Jsonified } from "../utils";
|
||||||
import { debounce, Notify } from "../decorators";
|
import { debounce, notify } from "../decorators";
|
||||||
|
|
||||||
@Component({ template: require("../../components/departures.html") })
|
@Component({ template: require("../../components/departures.html") })
|
||||||
export class Departures extends Vue {
|
export class Departures extends Vue {
|
||||||
@ -21,7 +21,7 @@ export class Departures extends Vue {
|
|||||||
@Prop({ default: 20, type: Number })
|
@Prop({ default: 20, type: Number })
|
||||||
interval: number;
|
interval: number;
|
||||||
|
|
||||||
@Notify()
|
@notify()
|
||||||
state: FetchingState;
|
state: FetchingState;
|
||||||
|
|
||||||
@Watch('stops')
|
@Watch('stops')
|
||||||
|
@ -58,7 +58,7 @@ export const condition = decorator(function <Args extends any[], Ret extends any
|
|||||||
// decorators.js
|
// decorators.js
|
||||||
import { createDecorator } from 'vue-class-component'
|
import { createDecorator } from 'vue-class-component'
|
||||||
|
|
||||||
export const Notify = (name?: string) => createDecorator((options, key) => {
|
export const notify = (name?: string) => createDecorator((options, key) => {
|
||||||
const symbol = Symbol(key);
|
const symbol = Symbol(key);
|
||||||
|
|
||||||
if (typeof options.computed === 'undefined') {
|
if (typeof options.computed === 'undefined') {
|
||||||
|
@ -176,7 +176,7 @@ class ZtmGdanskDataUpdateSubscriber implements EventSubscriberInterface
|
|||||||
$this->ids->generate($provider, $stop['stopId'])
|
$this->ids->generate($provider, $stop['stopId'])
|
||||||
),
|
),
|
||||||
'track' => $entity,
|
'track' => $entity,
|
||||||
'order' => $stop['stopSequence'],
|
'order' => $stop['stopSequence'] + (int)($stop['stopId'] > 30000), // HACK! Gdynia has 0 based sequence
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user