Skip to content

Commit

Permalink
Change calendar api orderBy
Browse files Browse the repository at this point in the history
  • Loading branch information
O4epegb committed Sep 16, 2024
1 parent 99f88ec commit 4b7d38a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/api/src/app/routes/players/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/screens/Player/Calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ export const Calendar = () => {
maximumFractionDigits: 2,
})}
%) during shown period
<div className="pt-2 text-xs text-gray-300 dark:text-gray-700">
Calendar shows completion based on{' '}
<code className="rounded bg-slate-600 px-1 dark:bg-slate-300">endAt</code> field,
<br /> so it may differ from the game list, which uses{' '}
<code className="rounded bg-slate-600 px-1 dark:bg-slate-300">startAt</code> as the
ordering field.
</div>
</>
}
>
Expand Down

0 comments on commit 4b7d38a

Please sign in to comment.