mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
fix sortowania statusów dr; linting
This commit is contained in:
@@ -23,6 +23,9 @@ export default defineComponent({
|
||||
dispatcherStatus: {
|
||||
type: Number as PropType<Status.ActiveDispatcher | number>
|
||||
},
|
||||
dispatcherTimestamp: {
|
||||
type: Number as PropType<number | null>
|
||||
},
|
||||
isOnline: {
|
||||
type: Boolean
|
||||
}
|
||||
@@ -59,7 +62,9 @@ export default defineComponent({
|
||||
return 'unknown';
|
||||
|
||||
default:
|
||||
if (this.dispatcherStatus >= Date.now() + 25500000) return 'no-limit';
|
||||
if (this.dispatcherTimestamp != null && this.dispatcherStatus >= Date.now() + 25500000)
|
||||
return 'no-limit';
|
||||
|
||||
return 'online';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<StationStatusBadge
|
||||
:isOnline="onlineScenery ? true : false"
|
||||
:dispatcherStatus="onlineScenery?.dispatcherStatus"
|
||||
:dispatcherTimestamp="onlineScenery?.dispatcherTimestamp"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -52,7 +52,7 @@ export default defineComponent({
|
||||
|
||||
mixins: [modalTrainMixin],
|
||||
|
||||
setup(props) {
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const searchedTrain = inject('searchedTrain') as Ref<string>;
|
||||
const searchedDriver = inject('searchedDriver') as Ref<string>;
|
||||
|
||||
Reference in New Issue
Block a user