From a47399fe1b0cd97343db666f4b5149c019150003 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 14 Apr 2025 21:02:46 +0200 Subject: [PATCH] chore: added driver stats percentage --- .../JournalDispatcherStats.vue | 12 ++--- .../JournalTimetables/JournalDriverStats.vue | 49 ++++++++++++++++--- src/styles/_badge.scss | 2 +- 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/src/components/JournalView/JournalDispatchers/JournalDispatcherStats.vue b/src/components/JournalView/JournalDispatchers/JournalDispatcherStats.vue index 60ee48d..4923d4b 100644 --- a/src/components/JournalView/JournalDispatchers/JournalDispatcherStats.vue +++ b/src/components/JournalView/JournalDispatchers/JournalDispatcherStats.vue @@ -32,25 +32,25 @@ -
+
-
- +
+ {{ $t('journal.dispatcher-stats.timetables-count') }} {{ stats.issuedTimetables.count }} - + {{ $t('journal.dispatcher-stats.timetables-sum') }} {{ stats.issuedTimetables.distanceSum.toFixed(2) }}km - + {{ $t('journal.dispatcher-stats.timetables-max') }} {{ stats.issuedTimetables.distanceMax.toFixed(2) }}km - + {{ $t('journal.dispatcher-stats.timetables-avg') }} {{ stats.issuedTimetables.distanceAvg.toFixed(2) }}km diff --git a/src/components/JournalView/JournalTimetables/JournalDriverStats.vue b/src/components/JournalView/JournalTimetables/JournalDriverStats.vue index a43d6f7..1005a9b 100644 --- a/src/components/JournalView/JournalTimetables/JournalDriverStats.vue +++ b/src/components/JournalView/JournalTimetables/JournalDriverStats.vue @@ -12,14 +12,6 @@
- - {{ $t('journal.driver-stats.timetables') }} - {{ store.driverStatsData._count.fulfilled }} / - {{ store.driverStatsData._count._all }} - - {{ $t('journal.driver-stats.longest-timetable') }} {{ store.driverStatsData._max.routeDistance.toFixed(2) }}km @@ -29,12 +21,43 @@ {{ $t('journal.driver-stats.avg-timetable') }} {{ store.driverStatsData._avg.routeDistance.toFixed(2) }}km +
+ +
+ +
+ + {{ $t('journal.driver-stats.timetables') }} + + {{ store.driverStatsData._count.fulfilled }} / + {{ store.driverStatsData._count._all }} + + + + {{ $t('journal.driver-stats.distance') }} {{ store.driverStatsData._sum.currentDistance.toFixed(2) }} / {{ store.driverStatsData._sum.routeDistance.toFixed(2) }}km + + @@ -43,6 +66,16 @@ {{ store.driverStatsData._sum.confirmedStopsCount }} / {{ store.driverStatsData._sum.allStopsCount }} + +
diff --git a/src/styles/_badge.scss b/src/styles/_badge.scss index c5b76e4..5721c90 100644 --- a/src/styles/_badge.scss +++ b/src/styles/_badge.scss @@ -8,7 +8,7 @@ margin: 0.25em; - span { + & > span { display: inline-block; background: #585858; padding: 0.2em 0.4em;