commit
677cfb955d
@ -17,6 +17,7 @@
|
|||||||
# replace FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9 for jvm need sub application (ie. make_pdf)
|
# replace FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9 for jvm need sub application (ie. make_pdf)
|
||||||
FROM registry.access.redhat.com/ubi8/openjdk-17:1.18
|
FROM registry.access.redhat.com/ubi8/openjdk-17:1.18
|
||||||
|
|
||||||
|
USER 0
|
||||||
WORKDIR /work/
|
WORKDIR /work/
|
||||||
RUN chown 1001 /work \
|
RUN chown 1001 /work \
|
||||||
&& chmod "g+rwX" /work \
|
&& chmod "g+rwX" /work \
|
||||||
|
|||||||
@ -91,10 +91,10 @@ public class ClubService {
|
|||||||
PanacheQuery<ClubModel> query;
|
PanacheQuery<ClubModel> query;
|
||||||
|
|
||||||
if (country == null || country.isBlank())
|
if (country == null || country.isBlank())
|
||||||
query = repository.find("name LIKE ?1",
|
query = repository.find("LOWER(name) LIKE LOWER(?1)",
|
||||||
Sort.ascending("name"), search).page(Page.ofSize(limit));
|
Sort.ascending("name"), search).page(Page.ofSize(limit));
|
||||||
else
|
else
|
||||||
query = repository.find("name LIKE ?1 AND country LIKE ?2",
|
query = repository.find("LOWER(name) LIKE LOWER(?1) AND country LIKE ?2",
|
||||||
Sort.ascending("name"), search, country + "%").page(Page.ofSize(limit));
|
Sort.ascending("name"), search, country + "%").page(Page.ofSize(limit));
|
||||||
return getPageResult(query, limit, page);
|
return getPageResult(query, limit, page);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public class LicenceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Uni<List<LicenceModel>> getCurrentSaisonLicence(SecurityCtx securityCtx) {
|
public Uni<List<LicenceModel>> getCurrentSaisonLicence(SecurityCtx securityCtx) {
|
||||||
if (securityCtx.getSubject() == null)
|
if (securityCtx == null || securityCtx.getSubject() == null)
|
||||||
return repository.find("saison = ?1", Utils.getSaison()).list();
|
return repository.find("saison = ?1", Utils.getSaison()).list();
|
||||||
|
|
||||||
return combRepository.find("userId = ?1", securityCtx.getSubject()).firstResult().map(MembreModel::getClub)
|
return combRepository.find("userId = ?1", securityCtx.getSubject()).firstResult().map(MembreModel::getClub)
|
||||||
|
|||||||
@ -68,7 +68,7 @@ public class MembreService {
|
|||||||
|
|
||||||
public SimpleCombModel find(int licence, String np) throws Throwable {
|
public SimpleCombModel find(int licence, String np) throws Throwable {
|
||||||
return VertxContextSupport.subscribeAndAwait(() -> Panache.withTransaction(() ->
|
return VertxContextSupport.subscribeAndAwait(() -> Panache.withTransaction(() ->
|
||||||
repository.find("licence = ?1 AND (lname ILIKE ?2 OR fname ILIKE ?2)",
|
repository.find("licence = ?1 AND (LOWER(lname) LIKE LOWER(?2) OR LOWER(fname) LIKE LOWER(?2))",
|
||||||
licence, np).firstResult().map(SimpleCombModel::fromModel)));
|
licence, np).firstResult().map(SimpleCombModel::fromModel)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,10 +85,10 @@ public class MembreService {
|
|||||||
PanacheQuery<MembreModel> query;
|
PanacheQuery<MembreModel> query;
|
||||||
|
|
||||||
if (club == null || club.isBlank())
|
if (club == null || club.isBlank())
|
||||||
query = repository.find("(lname LIKE ?1 OR fname LIKE ?1)",
|
query = repository.find("(LOWER(lname) LIKE LOWER(?1) OR LOWER(fname) LIKE LOWER(?1))",
|
||||||
Sort.ascending("fname", "lname"), search).page(Page.ofSize(limit));
|
Sort.ascending("fname", "lname"), search).page(Page.ofSize(limit));
|
||||||
else
|
else
|
||||||
query = repository.find("club.name LIKE ?2 AND (lname LIKE ?1 OR fname LIKE ?1)",
|
query = repository.find("LOWER(club.name) LIKE LOWER(?2) AND (LOWER(lname) LIKE LOWER(?1) OR LOWER(fname) LIKE LOWER(?1))",
|
||||||
Sort.ascending("fname", "lname"), search, club + "%").page(Page.ofSize(limit));
|
Sort.ascending("fname", "lname"), search, club + "%").page(Page.ofSize(limit));
|
||||||
return getPageResult(query, limit, page);
|
return getPageResult(query, limit, page);
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ public class MembreService {
|
|||||||
String finalSearch = search;
|
String finalSearch = search;
|
||||||
return repository.find("userId = ?1", subject).firstResult()
|
return repository.find("userId = ?1", subject).firstResult()
|
||||||
.chain(membreModel -> {
|
.chain(membreModel -> {
|
||||||
PanacheQuery<MembreModel> query = repository.find("club = ?1 AND (lname LIKE ?2 OR fname LIKE ?2)",
|
PanacheQuery<MembreModel> query = repository.find("club = ?1 AND (LOWER(lname) LIKE LOWER(?2) OR LOWER(fname) LIKE LOWER(?2))",
|
||||||
Sort.ascending("fname", "lname"), membreModel.getClub(), finalSearch)
|
Sort.ascending("fname", "lname"), membreModel.getClub(), finalSearch)
|
||||||
.page(Page.ofSize(limit));
|
.page(Page.ofSize(limit));
|
||||||
return getPageResult(query, limit, page);
|
return getPageResult(query, limit, page);
|
||||||
|
|||||||
@ -2,18 +2,20 @@ package fr.titionfire.ffsaf.rest.exception;
|
|||||||
|
|
||||||
import jakarta.ws.rs.core.MediaType;
|
import jakarta.ws.rs.core.MediaType;
|
||||||
import jakarta.ws.rs.core.Response;
|
import jakarta.ws.rs.core.Response;
|
||||||
import jakarta.ws.rs.ext.ExceptionMapper;
|
import org.jboss.resteasy.reactive.server.ServerExceptionMapper;
|
||||||
import jakarta.ws.rs.ext.Provider;
|
import org.jboss.resteasy.reactive.server.UnwrapException;
|
||||||
|
|
||||||
@Provider
|
import java.util.concurrent.CompletionException;
|
||||||
public class DetailExceptionMapper implements ExceptionMapper<DetailException> {
|
|
||||||
|
|
||||||
@Override
|
@UnwrapException({CompletionException.class, RuntimeException.class})
|
||||||
public Response toResponse(DetailException e) {
|
public class DetailExceptionMapper{
|
||||||
|
|
||||||
|
@ServerExceptionMapper
|
||||||
|
public Response mapException(DetailException e) {
|
||||||
|
System.out.println("DetailExceptionMapper: " + e.getMessage());
|
||||||
return Response.status(e.getStatus())
|
return Response.status(e.getStatus())
|
||||||
.entity(e.getMessage())
|
.entity(e.getMessage())
|
||||||
.type(MediaType.TEXT_PLAIN_TYPE)
|
.type(MediaType.TEXT_PLAIN_TYPE)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,7 +135,7 @@ public class Main {
|
|||||||
|
|
||||||
// Adding member photo
|
// Adding member photo
|
||||||
Image memberPhoto;
|
Image memberPhoto;
|
||||||
if (pdfData.photo_file != null && pdfData.photo_file.exists()) {
|
if (pdfData.photo_file != null && pdfData.photo_file.exists() && pdfData.photo_file.getAbsolutePath().equals("/dev/null")) {
|
||||||
memberPhoto = Image.getInstance(Files.readAllBytes(pdfData.photo_file.toPath()));
|
memberPhoto = Image.getInstance(Files.readAllBytes(pdfData.photo_file.toPath()));
|
||||||
} else {
|
} else {
|
||||||
memberPhoto = Image.getInstance(
|
memberPhoto = Image.getInstance(
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import {useLoadingSwitcher} from "../../../hooks/useLoading.jsx";
|
import {useLoadingSwitcher} from "../../../hooks/useLoading.jsx";
|
||||||
import {apiAxios} from "../../../utils/Tools.js";
|
import {apiAxios, errFormater} from "../../../utils/Tools.js";
|
||||||
import {toast} from "react-toastify";
|
import {toast} from "react-toastify";
|
||||||
import imageCompression from "browser-image-compression";
|
import imageCompression from "browser-image-compression";
|
||||||
import {BirthDayField, CountryList, OptionField, RoleList, TextField} from "../../../components/MemberCustomFiels.jsx";
|
import {BirthDayField, CountryList, OptionField, RoleList, TextField} from "../../../components/MemberCustomFiels.jsx";
|
||||||
@ -70,7 +70,7 @@ export function InformationForm({data}) {
|
|||||||
toast.success('Profile mis à jours avec succès 🎉');
|
toast.success('Profile mis à jours avec succès 🎉');
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e.response)
|
console.log(e.response)
|
||||||
toast.error('Échec de la mise à jours du profile 😕 (code: ' + e.response.status + ')');
|
toast.error(errFormater(e,'Échec de la mise à jours du profile 😕'));
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
if (setLoading)
|
if (setLoading)
|
||||||
setLoading(0)
|
setLoading(0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user