fix(frontend): corrections workflow v3.0 — inscription événements, CreateMembreRequest, AJAX session expiry
Services:
- EvenementService: POST /inscriptions (sans membreId), DELETE /inscriptions, GET /recherche, GET /type/{type}
- MembreService: creer() accepte CreateMembreRequest au lieu de MembreResponse
- Nouveaux services: BackupService, EpargneService, FinanceApprovalService, LogsService, MessageService, OrganisationService, PaiementClientService
Beans:
- MembreInscriptionBean: construit CreateMembreRequest.builder() avec organisationId UUID
- EvenementsBean: inscrireParticipant(id) sans userId (backend infère depuis token)
- DashboardBean: checkAccessAndRedirect() SUPER_ADMIN en premier
Sécurité:
- AuthenticationFilter: gestion AJAX PrimeFaces (partial/ajax → XML partial-response redirect)
- PermissionChecker: vérification rôles côté bean
- k8s/: manifestes secrets SMTP et Wave (placeholders à remplir)
Pages XHTML: dashboards rôles, cotisations, membres, événements, organisations
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package dev.lions.unionflow.client.service;
|
||||
|
||||
import dev.lions.unionflow.server.api.dto.common.PagedResponse;
|
||||
import dev.lions.unionflow.server.api.dto.membre.request.CreateMembreRequest;
|
||||
import dev.lions.unionflow.server.api.dto.membre.response.MembreResponse;
|
||||
import dev.lions.unionflow.server.api.dto.membre.response.MembreSummaryResponse;
|
||||
import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
import jakarta.ws.rs.*;
|
||||
@@ -17,7 +19,14 @@ import java.util.UUID;
|
||||
public interface MembreService {
|
||||
|
||||
@GET
|
||||
PagedResponse<MembreResponse> listerTous();
|
||||
PagedResponse<MembreSummaryResponse> listerTous(
|
||||
@QueryParam("page") @DefaultValue("0") int page,
|
||||
@QueryParam("size") @DefaultValue("20") int size);
|
||||
|
||||
/** Surcharge sans pagination — retourne jusqu'à 1000 membres (usage hors DataTable). */
|
||||
default PagedResponse<MembreSummaryResponse> listerTous() {
|
||||
return listerTous(0, 1000);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/{id}")
|
||||
@@ -53,8 +62,8 @@ public interface MembreService {
|
||||
@QueryParam("direction") @DefaultValue("asc") String sortDirection);
|
||||
|
||||
@GET
|
||||
@Path("/association/{associationId}")
|
||||
List<MembreResponse> listerParAssociation(@PathParam("associationId") UUID associationId);
|
||||
@Path("/organisation/{organisationId}")
|
||||
List<MembreResponse> listerParOrganisation(@PathParam("organisationId") UUID organisationId);
|
||||
|
||||
@GET
|
||||
@Path("/actifs")
|
||||
@@ -65,7 +74,7 @@ public interface MembreService {
|
||||
List<MembreResponse> listerInactifs();
|
||||
|
||||
@POST
|
||||
MembreResponse creer(MembreResponse membre);
|
||||
MembreResponse creer(CreateMembreRequest membre);
|
||||
|
||||
@PUT
|
||||
@Path("/{id}")
|
||||
@@ -137,6 +146,46 @@ public interface MembreService {
|
||||
@Path("/autocomplete/villes")
|
||||
List<String> obtenirVilles(@QueryParam("query") String query);
|
||||
|
||||
@GET
|
||||
@Path("/mes-organisations")
|
||||
List<OrganisationSwitcherDTO> mesOrganisations();
|
||||
|
||||
// ── Cycle de vie des adhésions ─────────────────────────────────────────
|
||||
|
||||
@GET
|
||||
@Path("/{membreId}/adhesion")
|
||||
@SuppressWarnings("unchecked")
|
||||
java.util.Map<String, Object> getAdhesionStatut(@PathParam("membreId") UUID membreId,
|
||||
@QueryParam("organisationId") UUID organisationId);
|
||||
|
||||
@PUT
|
||||
@Path("/{membreId}/inviter-organisation")
|
||||
java.util.Map<String, Object> inviterMembreOrg(@PathParam("membreId") UUID membreId,
|
||||
@QueryParam("organisationId") UUID organisationId,
|
||||
@QueryParam("roleOrg") String roleOrg);
|
||||
|
||||
@POST
|
||||
@Path("/accepter-invitation/{token}")
|
||||
java.util.Map<String, Object> accepterInvitation(@PathParam("token") String token);
|
||||
|
||||
@PUT
|
||||
@Path("/{membreId}/adhesion/activer")
|
||||
java.util.Map<String, Object> activerAdhesion(@PathParam("membreId") UUID membreId,
|
||||
@QueryParam("organisationId") UUID organisationId,
|
||||
java.util.Map<String, String> body);
|
||||
|
||||
@PUT
|
||||
@Path("/{membreId}/adhesion/suspendre")
|
||||
java.util.Map<String, Object> suspendrAdhesion(@PathParam("membreId") UUID membreId,
|
||||
@QueryParam("organisationId") UUID organisationId,
|
||||
java.util.Map<String, String> body);
|
||||
|
||||
@PUT
|
||||
@Path("/{membreId}/adhesion/radier")
|
||||
java.util.Map<String, Object> radierAdhesion(@PathParam("membreId") UUID membreId,
|
||||
@QueryParam("organisationId") UUID organisationId,
|
||||
java.util.Map<String, String> body);
|
||||
|
||||
@GET
|
||||
@Path("/autocomplete/professions")
|
||||
List<String> obtenirProfessions(@QueryParam("query") String query);
|
||||
@@ -150,6 +199,52 @@ public interface MembreService {
|
||||
@QueryParam("format") @DefaultValue("EXCEL") String format);
|
||||
|
||||
// Classes DTO internes pour les réponses spécialisées
|
||||
|
||||
/**
|
||||
* DTO pour le sélecteur d'organisation (multi-org switcher).
|
||||
* Mappé depuis GET /api/membres/mes-organisations.
|
||||
*/
|
||||
class OrganisationSwitcherDTO implements java.io.Serializable {
|
||||
public String organisationId;
|
||||
public String nom;
|
||||
public String nomCourt;
|
||||
public String typeOrganisation;
|
||||
public String categorieType;
|
||||
public String modulesActifs;
|
||||
public String statut;
|
||||
public String statutMembre;
|
||||
public String roleOrg;
|
||||
public String dateAdhesion;
|
||||
|
||||
public String getOrganisationId() { return organisationId; }
|
||||
public void setOrganisationId(String v) { this.organisationId = v; }
|
||||
public String getNom() { return nom; }
|
||||
public void setNom(String v) { this.nom = v; }
|
||||
public String getNomCourt() { return nomCourt; }
|
||||
public void setNomCourt(String v) { this.nomCourt = v; }
|
||||
public String getTypeOrganisation() { return typeOrganisation; }
|
||||
public void setTypeOrganisation(String v) { this.typeOrganisation = v; }
|
||||
public String getCategorieType() { return categorieType; }
|
||||
public void setCategorieType(String v) { this.categorieType = v; }
|
||||
public String getModulesActifs() { return modulesActifs; }
|
||||
public void setModulesActifs(String v) { this.modulesActifs = v; }
|
||||
public String getStatut() { return statut; }
|
||||
public void setStatut(String v) { this.statut = v; }
|
||||
public String getStatutMembre() { return statutMembre; }
|
||||
public void setStatutMembre(String v) { this.statutMembre = v; }
|
||||
public String getRoleOrg() { return roleOrg; }
|
||||
public void setRoleOrg(String v) { this.roleOrg = v; }
|
||||
public String getDateAdhesion() { return dateAdhesion; }
|
||||
public void setDateAdhesion(String v) { this.dateAdhesion = v; }
|
||||
|
||||
/** Retourne le libellé court à afficher dans le switcher. */
|
||||
public String getLibelleCourt() {
|
||||
if (nomCourt != null && !nomCourt.isBlank()) return nomCourt;
|
||||
if (nom != null && nom.length() > 25) return nom.substring(0, 22) + "…";
|
||||
return nom;
|
||||
}
|
||||
}
|
||||
|
||||
class StatistiquesMembreDTO {
|
||||
public Long totalMembres;
|
||||
public Long membresActifs;
|
||||
|
||||
Reference in New Issue
Block a user