From d9f64a082f7b8a727d5ce3eb4fa6eee986a5058d Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 25 Oct 2024 00:40:52 +0200 Subject: [PATCH] update for staging --- .../dossier/[id]/debat/DebateFilterBar.tsx | 30 +- .../[id]/debat/[compteRenduRef]/page.tsx | 14 +- .../dossier/[id]/debat/layout.tsx | 8 +- prisma/models/acteur.prisma | 112 ++++--- prisma/models/agenda.prisma | 34 +- prisma/models/amendement.prisma | 5 +- prisma/models/debat.prisma | 8 +- prisma/models/document.prisma | 13 +- prisma/models/dossier.prisma | 11 +- prisma/models/mandat.prisma | 5 + prisma/models/organe.prisma | 7 + prisma/models/question.prisma | 8 + prisma/models/scrutin.prisma | 20 +- prisma/models/stats.prisma | 60 ++++ prisma/models/texte_loi.prisma | 2 +- prisma/swagger/json-schema.json | 315 +++++++++++++++--- 16 files changed, 502 insertions(+), 150 deletions(-) create mode 100644 prisma/models/stats.prisma diff --git a/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx b/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx index 7d77fc7..0dfdee8 100644 --- a/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx +++ b/app/[legislature]/dossier/[id]/debat/DebateFilterBar.tsx @@ -15,18 +15,8 @@ import Typography from "@mui/material/Typography"; import ArrowBackIcon from "@mui/icons-material/ArrowBack"; import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; import { Agenda } from "@prisma/client"; -import Button from "@mui/material/Button"; -import Menu from "@mui/material/Menu"; import Link from "next/link"; -type Debat = { - uid: string; - libelleCourtLieu: string | null; - libelleLongLieu: string | null; - timestampDebut: Date; - compteRenduRef: string; -}; - type DebateFilterBarProps = { reunions: Pick< Agenda, @@ -35,7 +25,7 @@ type DebateFilterBarProps = { | "libelleLongLieu" | "timestampDebut" | "timestampFin" - | "compteRenduRef" + | "compteRenduRefUid" >[]; // setDebateRef: (newRef: string) => void; // debats: Debat[]; @@ -46,14 +36,14 @@ export const DebateFilterBar = (props: DebateFilterBarProps) => { const sceanceUid = useSelectedLayoutSegment(); const reunionIndex = reunions.findIndex( - (reunion) => reunion.compteRenduRef === sceanceUid + (reunion) => reunion.compteRenduRefUid === sceanceUid ); if (!sceanceUid || reunionIndex < 0) { if (reunions.length > 0) { if (sceanceUid) { - permanentRedirect(`${reunions[0].compteRenduRef}`); + permanentRedirect(`${reunions[0].compteRenduRefUid}`); } else { - permanentRedirect(`debat/${reunions[0].compteRenduRef}`); + permanentRedirect(`debat/${reunions[0].compteRenduRefUid}`); } } } @@ -86,7 +76,7 @@ export const DebateFilterBar = (props: DebateFilterBarProps) => {