From 9f24c439c5bce14aa84f94a6d614ddaece19c209 Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 17 Jun 2022 17:27:59 +0200 Subject: [PATCH] =?UTF-8?q?Wy=C5=9Bwietlanie=20statystyk=20dy=C5=BCurnego?= =?UTF-8?q?=20w=20karcie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JournalView/DispatcherStats.vue | 192 ++++++++++-------- .../JournalView/JournalDispatchers.vue | 57 ++++-- .../interfaces/api/DispatcherStatsAPIData.ts | 40 ++++ src/store/store.ts | 4 + src/store/storeTypes.ts | 3 + src/styles/JournalSection.scss | 17 +- src/styles/global.scss | 10 +- 7 files changed, 216 insertions(+), 107 deletions(-) create mode 100644 src/scripts/interfaces/api/DispatcherStatsAPIData.ts diff --git a/src/components/JournalView/DispatcherStats.vue b/src/components/JournalView/DispatcherStats.vue index 4285d6b..0b99766 100644 --- a/src/components/JournalView/DispatcherStats.vue +++ b/src/components/JournalView/DispatcherStats.vue @@ -1,89 +1,93 @@ @@ -95,25 +99,45 @@ export default defineComponent({ .dispatcher-stats-card { padding: 1em; - max-width: 800px; + max-width: 850px; width: 100vw; + max-height: 750px; + min-height: 600px; +} + +.loading { + font-size: 1.4em; + padding: 0.6em; + text-align: center; + margin: 1em 0 400px 0; + + background-color: #4d4d4d; } h2.card-title { - text-align: center; font-size: 1.8em; } h3 { - margin: 0.5em 0; + margin-top: 1em; +} + +h2, +h3 { + text-align: center; } .info-stats { display: flex; + justify-content: center; flex-wrap: wrap; margin-top: 1em; } +.last-timetables { + overflow-y: scroll; +} + .stat-badge { margin-right: 0.5em; padding-bottom: 1em; @@ -135,15 +159,15 @@ h3 { .timetable-row { display: grid; - grid-template-columns: 2fr 1fr 3fr 1fr; + grid-template-columns: 1fr 1fr 3fr 4fr; gap: 0.2em; margin: 0.5em 0; text-align: center; span { - display: flex; - justify-content: center; - align-items: center; + min-width: 100px; + overflow: hidden; + text-overflow: ellipsis; background-color: #4d4d4d; padding: 0.5em 0.2em; @@ -153,15 +177,15 @@ h3 { @include smallScreen() { .dispatcher-stats-card { text-align: center; - } - .info-stats { - justify-content: center; + font-size: 1.2em; } .timetable-row { - grid-template-columns: 2fr 1fr; - grid-template-rows: 1fr 1fr; - gap: 0; + // display: flex; + // flex-wrap: wrap; + // justify-content: center; + grid-template-columns: 1fr 1fr; + background-color: #4d4d4d; } } diff --git a/src/components/JournalView/JournalDispatchers.vue b/src/components/JournalView/JournalDispatchers.vue index 4f2edcf..5addcc1 100644 --- a/src/components/JournalView/JournalDispatchers.vue +++ b/src/components/JournalView/JournalDispatchers.vue @@ -1,18 +1,33 @@