-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
262 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<template> | ||
<div | ||
v-if="!isInline" | ||
class="schedules-details-time" | ||
> | ||
<UiSchedulesDetailsTimeWrapped | ||
v-if="visit.arrivalTime" | ||
label="Arrivée" | ||
:time="toTime(visit.arrivalTime)" | ||
:sublabel="visit.arrivalStatus !== 'onTime' ? visit.arrivalStatus : null" | ||
/> | ||
<div> | ||
<div v-if="visit.platform">Voie</div> | ||
<div>{{ visit.platform }}</div> | ||
</div> | ||
<UiSchedulesDetailsTimeWrapped | ||
v-if="visit.departureTime" | ||
label="Départ" | ||
:time="toTime(visit.departureTime)" | ||
:sublabel="visit.departureStatus !== 'onTime' ? visit.departureStatus : null" | ||
/> | ||
</div> | ||
<div | ||
v-else | ||
class="schedules-details-time" | ||
> | ||
<UiSchedulesDetailsTimeInline | ||
v-if="visit.departureTime" | ||
label="Départ" | ||
:time="toTime(visit.departureTime)" | ||
/> | ||
<UiSchedulesDetailsTimeInline | ||
v-else | ||
label="Arrivée" | ||
:time="toTime(visit.arrivalTime)" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue, { PropType } from 'vue' | ||
import UiSchedulesDetailsTimeWrapped from '@/components/ui/Schedules/UiSchedulesDetailsTimeWrapped.vue' | ||
import UiSchedulesDetailsTimeInline from '@/components/ui/Schedules/UiSchedulesDetailsTimeInline.vue' | ||
import { VisitType } from '@/utils/fetcher' | ||
import { toTime } from '@/utils/time' | ||
export default Vue.extend({ | ||
name: 'StopSchedulesDetailsTimes', | ||
components: { | ||
UiSchedulesDetailsTimeWrapped, | ||
UiSchedulesDetailsTimeInline, | ||
}, | ||
props: { | ||
visit: {} as PropType<VisitType>, | ||
isInline: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
methods: { | ||
toTime, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.schedules-details-time { | ||
display: flex; | ||
max-width: 20rem; | ||
margin-right: 1rem; | ||
justify-content: space-between; | ||
} | ||
</style> |
46 changes: 46 additions & 0 deletions
46
src/components/Stop/StopSchedulesDetailsTimesNonStopPassage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<template> | ||
<div class="schedules-details-time"> | ||
<div class="text-gray"> | ||
<UiSchedulesDetailsTimeWrapped | ||
v-if="visit.departureTime" | ||
label="Passage sans arrêt" | ||
:time="toTime(visit.departureTime)" | ||
:sublabel="visit.departureStatus !== 'onTime' ? visit.departureStatus : null" | ||
isTimeTextGray | ||
/> | ||
</div> | ||
<div> | ||
<div v-if="visit.platform">Voie</div> | ||
<div>{{ visit.platform }}</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue, { PropType } from 'vue' | ||
import UiSchedulesDetailsTimeWrapped from '@/components/ui/Schedules/UiSchedulesDetailsTimeWrapped.vue' | ||
import { VisitType } from '@/utils/fetcher' | ||
import { toTime } from '@/utils/time' | ||
export default Vue.extend({ | ||
name: 'StopSchedulesDetailsTimesNonStopPassage', | ||
components: { | ||
UiSchedulesDetailsTimeWrapped, | ||
}, | ||
props: { | ||
visit: {} as PropType<VisitType>, | ||
}, | ||
methods: { | ||
toTime, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.schedules-details-time { | ||
display: flex; | ||
max-width: 20rem; | ||
margin: 0 1rem 0.5rem 0; | ||
justify-content: space-between; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.