From b94f4b43ce375d9d18e94963afdd52cc08c42268 Mon Sep 17 00:00:00 2001 From: Thibaut Valentin Date: Thu, 25 Dec 2025 19:26:48 +0100 Subject: [PATCH] fix: reword message + fix missing comb un cat list (cma) --- src/main/java/fr/titionfire/ffsaf/ws/recv/RMatch.java | 10 ++++++---- .../webapp/src/pages/club/club/AffiliationCard.jsx | 4 ++-- .../pages/competition/editor/CategoryAdminContent.jsx | 2 +- .../competition/editor/CompetitionManagerRoot.jsx | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/fr/titionfire/ffsaf/ws/recv/RMatch.java b/src/main/java/fr/titionfire/ffsaf/ws/recv/RMatch.java index c184f3d..abae418 100644 --- a/src/main/java/fr/titionfire/ffsaf/ws/recv/RMatch.java +++ b/src/main/java/fr/titionfire/ffsaf/ws/recv/RMatch.java @@ -292,9 +292,10 @@ public class RMatch { if (!o.getCompet().getUuid().equals(connection.pathParam("uuid"))) throw new DForbiddenException("Permission denied"); })) - .call(cm -> matchRepository.delete("id IN ?1 AND category = ?2", data.matchesToRemove, cm) + .call(cm -> Panache.withTransaction( + () -> matchRepository.delete("id IN ?1 AND category = ?2", data.matchesToRemove, cm)) .call(__ -> SSMatch.sendDeleteMatch(connection, data.matchesToRemove))) - .call(cm -> matchRepository.list("id IN ?1 AND category = ?2", + .call(cm -> Panache.withSession(() -> matchRepository.list("id IN ?1 AND category = ?2", Stream.concat(data.matchOrderToUpdate.keySet().stream(), data.matchPouleToUpdate.keySet().stream()) .distinct().toList(), cm) @@ -305,13 +306,14 @@ public class RMatch { model.setCategory_ord(data.matchOrderToUpdate.get(model.getId())); })) .call(mm -> Panache.withTransaction(() -> matchRepository.persist(mm))) - .invoke(mm -> matches.addAll(mm.stream().map(MatchEntity::fromModel).toList())) + .invoke(mm -> matches.addAll(mm.stream().map(MatchEntity::fromModel).toList()))) ) .chain(categoryModel -> { Uni> uni = Uni.createFrom().item(new ArrayList<>()); for (AddMatch match : data.newMatch) uni = uni.call(l -> creatMatch(categoryModel, match).invoke(l::add)); - return uni; + Uni> finalUni = uni; + return Panache.withSession(() -> finalUni); } ) .chain(mm -> Panache.withTransaction(() -> matchRepository.create(mm)) diff --git a/src/main/webapp/src/pages/club/club/AffiliationCard.jsx b/src/main/webapp/src/pages/club/club/AffiliationCard.jsx index 33439d6..216053e 100644 --- a/src/main/webapp/src/pages/club/club/AffiliationCard.jsx +++ b/src/main/webapp/src/pages/club/club/AffiliationCard.jsx @@ -155,8 +155,8 @@ function ModalContent2({clubData, data}) { aria-label="Close">
-

Veuillez sélectionner 3 membres du bureau pour remplir la pré-demande. (Si un membre non-bureau va le devenir l'an prochain, - vous pourrez toujours remplacer un des membres sélectionné à la prochaine étape)

+

Veuillez sélectionner 0 à 3 membres du bureau pour remplir la pré-demande. (Si un membre non-bureau va le devenir l'an prochain, + vous pourrez les renseigner à la prochaine étape)

{data && data.map((d, index) => { return
diff --git a/src/main/webapp/src/pages/competition/editor/CategoryAdminContent.jsx b/src/main/webapp/src/pages/competition/editor/CategoryAdminContent.jsx index fab5e33..7df2e9d 100644 --- a/src/main/webapp/src/pages/competition/editor/CategoryAdminContent.jsx +++ b/src/main/webapp/src/pages/competition/editor/CategoryAdminContent.jsx @@ -116,7 +116,7 @@ export function CategoryContent({cat, catId, setCat}) { const activeMatches = matches2.filter(m => m.poule !== '-') - const combsIDs = activeMatches.flatMap(d => [d.c1, d.c2]).filter((v, i, a) => v != null && a.indexOf(v) === i) + const combsIDs = matches2.flatMap(d => [d.c1, d.c2]).filter((v, i, a) => v != null && a.indexOf(v) === i) .map(d => { let poule = activeMatches.find(m => (m.c1 === d || m.c2 === d) && m.categorie_ord !== -42)?.poule if (!poule) diff --git a/src/main/webapp/src/pages/competition/editor/CompetitionManagerRoot.jsx b/src/main/webapp/src/pages/competition/editor/CompetitionManagerRoot.jsx index 3e112fd..f47dbd3 100644 --- a/src/main/webapp/src/pages/competition/editor/CompetitionManagerRoot.jsx +++ b/src/main/webapp/src/pages/competition/editor/CompetitionManagerRoot.jsx @@ -111,11 +111,11 @@ function Home2({perm}) {

Sélectionne les modes d'affichage

{perm === "ADMIN" && <> - + } {perm === "TABLE" && <> - + }