diff --git a/packages/client/src/AuthenticatedApp.tsx b/packages/client/src/AuthenticatedApp.tsx
index 414f5b4e..ec97cd9c 100644
--- a/packages/client/src/AuthenticatedApp.tsx
+++ b/packages/client/src/AuthenticatedApp.tsx
@@ -23,6 +23,7 @@ import {
} from "./modules/play/Personalization";
import { PersonalizationForm } from "./modules/play/Personalization/PersonalizationForm";
import { PersonalizationPredefinedPersona } from "./modules/play/Personalization/PersonalizationPredefinedPersona";
+import { FormVerification } from "./modules/administration/Games/Game/FormVerification";
export { AuthenticatedApp };
@@ -36,6 +37,10 @@ function AuthenticatedApp() {
}>
} />
} />
+ }
+ />
} />
} />
} />
diff --git a/packages/client/src/modules/administration/Games/Game/FormVerification.styles.tsx b/packages/client/src/modules/administration/Games/Game/FormVerification.styles.tsx
index ae33eb27..e9d862e6 100644
--- a/packages/client/src/modules/administration/Games/Game/FormVerification.styles.tsx
+++ b/packages/client/src/modules/administration/Games/Game/FormVerification.styles.tsx
@@ -1,23 +1,7 @@
-import { Box, Container, ContainerProps } from "@mui/material";
+import { Box } from "@mui/material";
import { styled } from "@mui/material/styles";
-export { VerificationContainer, DataGridBox };
-
-const VerificationContainer = styled(
- (props: ContainerProps & { show: boolean }) =>
-)(({ theme, show }) => ({
- maxWidth: "none !important",
- position: "fixed",
- zIndex: 1250,
- top: 0,
- left: 0,
- paddingTop: "100px",
- paddingLeft: "30px",
- width: "100%",
- height: "100%",
- backdropFilter: "blur(10px)",
- display: `${show ? "block" : "none"}`,
-}));
+export { DataGridBox };
const DataGridBox = styled(Box)(({ theme }) => ({
height: 500,
diff --git a/packages/client/src/modules/administration/Games/Game/FormVerification.tsx b/packages/client/src/modules/administration/Games/Game/FormVerification.tsx
index 4f3c97f4..66135af7 100644
--- a/packages/client/src/modules/administration/Games/Game/FormVerification.tsx
+++ b/packages/client/src/modules/administration/Games/Game/FormVerification.tsx
@@ -1,4 +1,4 @@
-import { Grid, Button, Typography, useTheme } from "@mui/material";
+import { Grid, Button, Typography, useTheme, Box } from "@mui/material";
import { DataGrid, GridCellParams, GridColumns } from "@mui/x-data-grid";
import axios from "axios";
import { useState } from "react";
@@ -17,7 +17,6 @@ import {
PersoForm,
showerTimes,
} from "../../../play/Personalization/models/form";
-import { VerificationContainer } from "./FormVerification.styles";
import { DataGridBox } from "./FormVerification.styles";
import { usePlayers } from "./services/queries";
import {
@@ -34,13 +33,7 @@ import { t } from "../../../translations";
export { FormVerification };
-function FormVerification({
- openFormValidation,
- setOpenFormValidation,
-}: {
- openFormValidation: boolean;
- setOpenFormValidation: (value: boolean) => void;
-}): JSX.Element {
+function FormVerification(): JSX.Element {
const [updatedRows, setUpdatedRows] = useState([]);
const gameId = useGameId();
const theme = useTheme();
@@ -79,7 +72,6 @@ function FormVerification({
onSuccess: (response: any, variables: { draft: boolean }) => {
if (!variables.draft) {
validateForms.mutate();
- setOpenFormValidation(false);
}
setUpdatedRows([]);
queryClient.invalidateQueries(`/api/games/${gameId}/players`);
@@ -132,11 +124,15 @@ function FormVerification({
});
return (
-
+
{updatePersonalizations.isError && (
)}
{updatePersonalizations.isSuccess && }
+
+
+ Vérification des formulaires
+
-
+
-
+
);
}
diff --git a/packages/client/src/modules/administration/Games/Game/GamePlayers.tsx b/packages/client/src/modules/administration/Games/Game/GamePlayers.tsx
index 3e1591c7..cda7a59d 100644
--- a/packages/client/src/modules/administration/Games/Game/GamePlayers.tsx
+++ b/packages/client/src/modules/administration/Games/Game/GamePlayers.tsx
@@ -15,6 +15,7 @@ import {
} from "@mui/x-data-grid";
import DeleteIcon from "@mui/icons-material/Delete";
import axios from "axios";
+import { useNavigate } from "react-router-dom";
import { useMutation, useQueryClient } from "react-query";
import { IGame } from "../../../../utils/types";
import { useState } from "react";
@@ -28,13 +29,11 @@ import { useGameId } from "./utils";
import { hasGameStarted } from "../utils";
import { Icon } from "../../../common/components/Icon";
import { DataGridBox } from "./GameTeams.styles";
-import { FormVerification } from "./FormVerification";
export { GamePlayers };
function GamePlayers({ game }: { game: IGame }): JSX.Element {
- const [openFormValidation, setOpenFormValidation] = useState(false);
-
+ const navigate = useNavigate();
const gameId = useGameId();
const playersQuery = usePlayers(gameId);
@@ -107,7 +106,9 @@ function GamePlayers({ game }: { game: IGame }): JSX.Element {
} les formulaires`}