From 8fb20999f2f99cc6ccd82421bede98d5d8263575 Mon Sep 17 00:00:00 2001 From: Cadiducho Date: Sat, 26 Oct 2024 14:20:26 +0200 Subject: [PATCH] admin: set session defining grid from panel --- src/_services/session.service.ts | 9 +- .../seasons/gps/EditGrandPrixInSeason.vue | 560 ++++++++++-------- .../seasons/gps/EditSessionGrandPrix.vue | 461 ++++++++------ 3 files changed, 588 insertions(+), 442 deletions(-) diff --git a/src/_services/session.service.ts b/src/_services/session.service.ts index 3fb6326..542f9f8 100644 --- a/src/_services/session.service.ts +++ b/src/_services/session.service.ts @@ -60,11 +60,14 @@ export class SessionService extends PrognoService { return this.postObjectToAPI(`/gps/${gp.competition.id}/${gp.season.id}/${gp.id}/sessions`, data); } - public async updateSessionInGrandPrix(gp: GrandPrix, session: RaceSession): Promise> { - return await axios.put(`/gps/${gp.competition.id}/${gp.season.id}/${gp.id}/sessions/${session.id}`, session); + public async updateSessionInGrandPrix(gp: GrandPrix, session: RaceSession, data: { + date: Date; + defineGridOf: number[] + }): Promise> { + return await axios.put(`/gps/${gp.competition.id}/${gp.season.id}/${gp.id}/sessions/${session.id}`, data); } public async removeSessionFromGrandPrix(gp: GrandPrix, session: RaceSession): Promise> { return await axios.delete(`/gps/${gp.competition.id}/${gp.season.id}/${gp.id}/sessions/${session.id}`); } -} \ No newline at end of file +} diff --git a/src/pages/admin/seasons/gps/EditGrandPrixInSeason.vue b/src/pages/admin/seasons/gps/EditGrandPrixInSeason.vue index 65a2c75..3cebfd3 100644 --- a/src/pages/admin/seasons/gps/EditGrandPrixInSeason.vue +++ b/src/pages/admin/seasons/gps/EditGrandPrixInSeason.vue @@ -1,148 +1,216 @@ + diff --git a/src/pages/admin/seasons/gps/EditSessionGrandPrix.vue b/src/pages/admin/seasons/gps/EditSessionGrandPrix.vue index dc01abf..6f701b0 100644 --- a/src/pages/admin/seasons/gps/EditSessionGrandPrix.vue +++ b/src/pages/admin/seasons/gps/EditSessionGrandPrix.vue @@ -1,84 +1,142 @@