diff --git a/src/main/webapp/src/pages/competition/editor/CMTable.jsx b/src/main/webapp/src/pages/competition/editor/CMTable.jsx
index f487c09..37a999c 100644
--- a/src/main/webapp/src/pages/competition/editor/CMTable.jsx
+++ b/src/main/webapp/src/pages/competition/editor/CMTable.jsx
@@ -8,6 +8,7 @@ import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faCircleQuestion} from "@fortawesome/free-regular-svg-icons";
import {DrawGraph} from "../../result/DrawGraph.jsx";
import {scorePrint, win} from "../../../utils/Tools.js";
+import {toast} from "react-toastify";
function CupImg() {
return
{
- setCurrentMatch({matchSelect: matchId, matchNext: new TreeNode(matchId).nextMatchTree(trees)});
+ setCurrentMatch({matchSelect: matchId, matchNext: new TreeNode(matchId).nextMatchTree(trees.reverse())});
}
const onClickVoid = () => {
@@ -288,7 +289,7 @@ function BuildTree({treeData, matches}) {
return
+ matchSelect={currentMatch?.matchSelect} matchNext={currentMatch?.matchNext} size={23}/>
{currentMatch?.matchSelect &&
}
@@ -381,6 +382,14 @@ function ScorePanel({matchId, matches}) {
if (!match || match?.end === end)
return;
+ if (end){
+ if (win(match?.scores) === 0 && match.categorie_ord === -42){
+ toast.error("Impossible de terminer un match nul en tournois.");
+ setEnd(false);
+ return;
+ }
+ }
+
setLoading(1)
sendRequest('updateMatchEnd', {matchId: matchId, end})
.finally(() => {
diff --git a/src/main/webapp/src/pages/result/DrawGraph.jsx b/src/main/webapp/src/pages/result/DrawGraph.jsx
index 640fdf5..c518ea7 100644
--- a/src/main/webapp/src/pages/result/DrawGraph.jsx
+++ b/src/main/webapp/src/pages/result/DrawGraph.jsx
@@ -2,7 +2,6 @@ import {useEffect, useRef} from "react";
import {scorePrint, win} from "../../utils/Tools.js";
const max_x = 500;
-const size = 24;
function getMousePos(canvas, evt) {
const rect = canvas.getBoundingClientRect();
@@ -21,6 +20,7 @@ export function DrawGraph({
},
matchSelect = null,
matchNext = null,
+ size = 24
}) {
const canvasRef = useRef(null);
const actionCanvasRef = useRef(null);