Skip to content

Commit

Permalink
fix: sort reports by meet date
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Oct 18, 2024
1 parent 1be2b15 commit 45cab79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/features/ReportList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ReportActions } from "./ReportActions";
import { Pagination } from "@codegouvfr/react-dsfr/Pagination";
import welcomeImage from "../assets/welcome.svg";
import { useIsDesktop } from "../hooks/useIsDesktop";
import { chunk, makeArrayOf } from "pastable";
import { chunk } from "pastable";

export type ReportWithUser = Report & { user?: { email: string; name: string } };

Expand All @@ -29,7 +29,7 @@ export const MyReports = () => {
where: { disabled: false, OR: [{ createdBy: user.id }, { redactedById: user.id }] },
take: 20,
skip: page * 20,
orderBy: { createdAt: "desc" },
orderBy: [{ meetDate: "desc" }, { createdAt: "desc" }],
include: {
user: true,
},
Expand Down

0 comments on commit 45cab79

Please sign in to comment.