mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
aktualizacja endpointu API statystyk
This commit is contained in:
@@ -5,15 +5,12 @@
|
|||||||
{{ $t('app.loading') }}
|
{{ $t('app.loading') }}
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
<b v-else-if="stats.distanceSum == null">
|
|
||||||
{{ $t('journal.daily-stats-info') }}
|
|
||||||
</b>
|
|
||||||
|
|
||||||
<span class="stats-list" v-else>
|
<span class="stats-list" v-else>
|
||||||
<h3>
|
<h3>
|
||||||
{{ $t('journal.daily-stats-title') }}
|
{{ $t('journal.daily-stats-title') }}
|
||||||
<b class="text--primary">{{ new Date().toLocaleDateString($i18n.locale) }}</b>
|
<b class="text--primary">{{ new Date().toLocaleDateString($i18n.locale) }}</b>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<hr style="margin-bottom: 0.5em" />
|
<hr style="margin-bottom: 0.5em" />
|
||||||
|
|
||||||
<div v-if="stats.totalTimetables">
|
<div v-if="stats.totalTimetables">
|
||||||
@@ -177,23 +174,9 @@ export default defineComponent({
|
|||||||
async fetchDailyTimetableStats() {
|
async fetchDailyTimetableStats() {
|
||||||
try {
|
try {
|
||||||
const res: API.DailyStats.Response = await (
|
const res: API.DailyStats.Response = await (
|
||||||
await axios.get(`${URLs.stacjownikAPI}/api/getDailyTimetableStats`)
|
await axios.get(`${URLs.stacjownikAPI}/api/getDailyStats`)
|
||||||
).data;
|
).data;
|
||||||
|
|
||||||
// this.stats = {
|
|
||||||
// totalTimetables: res.totalTimetables,
|
|
||||||
// distanceSum: res.distanceSum,
|
|
||||||
// distanceAvg: res.distanceAvg,
|
|
||||||
// // timetableAuthor: res.maxTimetable?.authorName || '',
|
|
||||||
// // timetableDriver: res.maxTimetable?.driverName || '',
|
|
||||||
// // timetableId: res.maxTimetable?.id || 0,
|
|
||||||
// // timetableRouteDistance: res.maxTimetable?.routeDistance || 0,
|
|
||||||
|
|
||||||
// mostActiveDispatchers: res.mostActiveDispatchers,
|
|
||||||
// mostActiveDrivers: res.mostActiveDrivers,
|
|
||||||
// longestDuties: res.longestDuties
|
|
||||||
// };
|
|
||||||
|
|
||||||
this.stats = res;
|
this.stats = res;
|
||||||
|
|
||||||
this.statsStatus = Status.Data.Loaded;
|
this.statsStatus = Status.Data.Loaded;
|
||||||
|
|||||||
Reference in New Issue
Block a user