-
- {{ localeDay(timetable.beginDate, $i18n.locale) }}
-
+
- {{
- !timetable.terminated
- ? $t('journal.timetable-active')
- : timetable.fulfilled || timetable.currentDistance >= timetable.routeDistance * 0.9
- ? $t('journal.timetable-fulfilled')
- : `${$t('journal.timetable-abandoned')} ${localeTime(timetable.endDate, $i18n.locale)}`
- }}
-
+ {{ timetable.trainCategoryCode }}
+ {{ timetable.trainNo }}
+ | {{ timetable.driverName }} |
+ #{{ timetable.timetableId }}
+
+
+
+ {{ localeDay(timetable.beginDate, $i18n.locale) }}
+
+ {{
+ !timetable.terminated
+ ? $t('journal.timetable-active')
+ : timetable.fulfilled || timetable.currentDistance >= timetable.routeDistance * 0.9
+ ? $t('journal.timetable-fulfilled')
+ : `${$t('journal.timetable-abandoned')} ${localeTime(timetable.endDate, $i18n.locale)}`
+ }}
+
+
-
- {{ timetable.trainCategoryCode }}
- {{ timetable.trainNo }}
- | {{ timetable.driverName }} |
- #{{ timetable.timetableId }}
-
-
-
+
{{ timetable.route.replace('|', ' - ') }}
@@ -93,20 +95,8 @@
-
-
-
- {{ $t('journal.dispatcher-name') }}
-
- {{ timetable.authorName }}
-
-
-
-
-
+
+
{{ $t('journal.route-length') }}
{{ !timetable.fulfilled ? timetable.currentDistance + ' /' : '' }}
@@ -119,10 +109,36 @@
{{ timetable.allStopsCount }}
-
-
- {{ timetable.stockString}}
+
+
+ {{ $t('journal.dispatcher-name') }}
+
+ {{ timetable.authorName }}
+
+
+
+
+
+
@@ -155,12 +171,13 @@ import { useStore } from '../../store/store';
import JournalOptions from './JournalOptions.vue';
import { JournalTimetableSearcher } from '../../types/JournalTimetablesTypes';
import modalTrainMixin from '../../mixins/modalTrainMixin';
+import imageMixin from '../../mixins/imageMixin';
const TIMETABLES_API_URL = `${URLs.stacjownikAPI}/api/getTimetables`;
export default defineComponent({
components: { DriverStats, Loading, JournalOptions },
- mixins: [dateMixin, routerMixin, modalTrainMixin],
+ mixins: [dateMixin, routerMixin, modalTrainMixin, imageMixin],
name: 'JournalTimetables',
@@ -248,6 +265,7 @@ export default defineComponent({
return this.timetableHistory.map((timetable) => ({
timetable,
sceneryList: this.getSceneryList(timetable),
+ showStock: ref(false),
}));
},
},
@@ -300,6 +318,11 @@ export default defineComponent({
});
},
+ onImageError(e: Event) {
+ const imageEl = e.target as HTMLImageElement;
+ imageEl.src = this.getImage('unknown.png');
+ },
+
handleScroll() {
this.showReturnButton = window.scrollY > window.innerHeight;
@@ -427,22 +450,10 @@ export default defineComponent({
diff --git a/src/styles/JournalSection.scss b/src/styles/JournalSection.scss
index 6aa6e43..8dce167 100644
--- a/src/styles/JournalSection.scss
+++ b/src/styles/JournalSection.scss
@@ -1,65 +1,67 @@
-@import 'responsive.scss';
-
-// Animations
-.warning {
- &-enter-from,
- &-leave-to {
- opacity: 0;
- }
-
- &-enter-active {
- transition: all 150ms ease-out;
- }
-
- &-leave-active {
- transition: all 150ms ease-out;
- }
-}
-
-//Styles
-
-.journal-wrapper {
- width: 1350px;
- padding: 1em 0;
-}
-
-.journal_warning {
- text-align: center;
- font-size: 1.3em;
-
- &.error {
- background-color: var(--clr-error);
- }
-}
-
-.schedule-dates > * {
- margin-right: 0.25em;
-}
-
-.journal_item,
-.journal_warning {
- background: #202020;
- padding: 1em;
- margin: 1em 0;
-}
-
-.journal_top-bar {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-
-button.btn {
- padding: 0.5em 0.7em;
-}
-
-@include smallScreen() {
- .journal-wrapper {
- font-size: 1.25em;
- }
-
- .journal_top-bar {
- justify-content: center;
- flex-wrap: wrap;
- }
-}
+@import 'responsive.scss';
+
+// Animations
+.warning {
+ &-enter-from,
+ &-leave-to {
+ opacity: 0;
+ }
+
+ &-enter-active {
+ transition: all 150ms ease-out;
+ }
+
+ &-leave-active {
+ transition: all 150ms ease-out;
+ }
+}
+
+//Styles
+
+.journal-wrapper {
+ max-width: 1350px;
+ width: 100%;
+
+ padding: 1em 0;
+}
+
+.journal_warning {
+ text-align: center;
+ font-size: 1.3em;
+
+ &.error {
+ background-color: var(--clr-error);
+ }
+}
+
+.schedule-dates > * {
+ margin-right: 0.25em;
+}
+
+.journal_item,
+.journal_warning {
+ background: #202020;
+ padding: 1em;
+ margin: 1em 0;
+}
+
+.journal_top-bar {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+button.btn {
+ padding: 0.5em 0.7em;
+}
+
+@include smallScreen() {
+ .journal-wrapper {
+ font-size: 1.25em;
+ }
+
+ .journal_top-bar {
+ justify-content: center;
+ flex-wrap: wrap;
+ }
+}