From a0054aed14b9511bb8d665c0a2535801e88a1cca Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 2 Jun 2023 00:51:03 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20optymalizacja=20zapyta=C5=84=20historii?= =?UTF-8?q?=20RJ=20scenerii?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SceneryView/SceneryTimetablesHistory.vue | 47 ++++--------------- .../interfaces/api/TimetablesAPIData.ts | 8 ++-- 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/src/components/SceneryView/SceneryTimetablesHistory.vue b/src/components/SceneryView/SceneryTimetablesHistory.vue index b158b8c..fdc11b6 100644 --- a/src/components/SceneryView/SceneryTimetablesHistory.vue +++ b/src/components/SceneryView/SceneryTimetablesHistory.vue @@ -4,16 +4,16 @@ - - - - - - + + + + + + - + @@ -40,31 +40,6 @@
{{ $t('scenery.timetables-history-id') }}{{ $t('scenery.timetables-history-number')}}{{ $t('scenery.timetables-history-route')}}{{ $t('scenery.timetables-history-driver')}}{{ $t('scenery.timetables-history-author')}}{{ $t('scenery.timetables-history-date')}}{{ $t('scenery.timetables-history-id') }}{{ $t('scenery.timetables-history-number') }}{{ $t('scenery.timetables-history-route') }}{{ $t('scenery.timetables-history-driver') }}{{ $t('scenery.timetables-history-author') }}{{ $t('scenery.timetables-history-date') }}
#{{ historyItem.id }}
{{ $t('scenery.history-list-empty') }}
- - @@ -99,19 +74,15 @@ export default defineComponent({ methods: { async fetchAPIData(countFrom = 0, countLimit = 15) { try { - const requestString = `${URLs.stacjownikAPI}/api/getSceneryTimetables?name=${this.station.name}&countFrom=${countFrom}&countLimit=${countLimit}`; + const requestString = `${URLs.stacjownikAPI}/api/getIssuedTimetables?name=${this.station.name}&countFrom=${countFrom}&countLimit=${countLimit}`; const historyAPIData: SceneryTimetableHistory = await (await axios.get(requestString)).data; - this.sceneryHistoryList = historyAPIData.sceneryTimetables; + this.sceneryHistoryList = historyAPIData.timetables; this.dataStatus = DataStatus.Loaded; } catch (error) { console.error(error); } }, - - test() { - console.log('test'); - }, }, components: { Loading }, }); diff --git a/src/scripts/interfaces/api/TimetablesAPIData.ts b/src/scripts/interfaces/api/TimetablesAPIData.ts index 11859f6..8a32b84 100644 --- a/src/scripts/interfaces/api/TimetablesAPIData.ts +++ b/src/scripts/interfaces/api/TimetablesAPIData.ts @@ -47,10 +47,12 @@ export interface TimetableHistory { hashesString?: string; currentSceneryName?: string; currentSceneryHash?: string; + + routeSceneries?: string; } export interface SceneryTimetableHistory { - sceneryTimetables: TimetableHistory[]; - totalCount: number; - sceneryName: string; + timetables: TimetableHistory[]; + // totalCount: number; + // sceneryName: string; }