From 4b7d38ae3e70abf64f7b1d80a663dae634cb1b9d Mon Sep 17 00:00:00 2001 From: Daniil Demidovich Date: Mon, 16 Sep 2024 18:06:54 +0200 Subject: [PATCH] Change calendar api orderBy --- apps/api/src/app/routes/players/index.ts | 2 +- apps/web/src/screens/Player/Calendar/index.tsx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/api/src/app/routes/players/index.ts b/apps/api/src/app/routes/players/index.ts index 551c58b..85d1f3a 100644 --- a/apps/api/src/app/routes/players/index.ts +++ b/apps/api/src/app/routes/players/index.ts @@ -236,7 +236,7 @@ export const playersRoute = (app: AppType) => { playerId: player.id, endAt: { gte: request.query.from }, }, - orderBy: { startAt: 'asc' }, + orderBy: { endAt: 'asc' }, select: { isWin: true, endAt: true, diff --git a/apps/web/src/screens/Player/Calendar/index.tsx b/apps/web/src/screens/Player/Calendar/index.tsx index 1682466..682253a 100644 --- a/apps/web/src/screens/Player/Calendar/index.tsx +++ b/apps/web/src/screens/Player/Calendar/index.tsx @@ -117,6 +117,13 @@ export const Calendar = () => { maximumFractionDigits: 2, })} %) during shown period +
+ Calendar shows completion based on{' '} + endAt field, +
so it may differ from the game list, which uses{' '} + startAt as the + ordering field. +
} >