feat: add config for preset in category + filter on select comb
This commit is contained in:
@@ -14,6 +14,7 @@ import io.quarkus.websockets.next.UserData;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.inject.Inject;
|
||||
import org.hibernate.reactive.mutiny.Mutiny;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@@ -30,18 +31,20 @@ public class SRegister {
|
||||
CardService cardService;
|
||||
|
||||
public Uni<Void> sendRegister(String uuid, RegisterModel registerModel) {
|
||||
return send(uuid, "sendRegister", CombEntity.fromModel(registerModel))
|
||||
.call(__ -> cardService.addTeamCartToNewComb(registerModel.getMembre().getId(),
|
||||
registerModel.getClub2().getClubId(), registerModel.getClub2().getName(),
|
||||
registerModel.getCompetition())
|
||||
.chain(cardModels -> send(uuid, "sendCards", cardModels)));
|
||||
return Mutiny.fetch(registerModel.getCategoriesInscrites()).chain(o ->
|
||||
send(uuid, "sendRegister", CombEntity.fromModel(registerModel).addCategoriesInscrites(o))
|
||||
.call(__ -> cardService.addTeamCartToNewComb(registerModel.getMembre().getId(),
|
||||
registerModel.getClub2().getClubId(), registerModel.getClub2().getName(),
|
||||
registerModel.getCompetition())
|
||||
.chain(cardModels -> send(uuid, "sendCards", cardModels))));
|
||||
}
|
||||
|
||||
public Uni<Void> sendRegister(String uuid, CompetitionGuestModel model) {
|
||||
return send(uuid, "sendRegister", CombEntity.fromModel(model))
|
||||
.call(__ -> cardService.addTeamCartToNewComb(model.getId() * -1,
|
||||
null, model.getClub(), model.getCompetition())
|
||||
.chain(cardModels -> send(uuid, "sendCards", cardModels)));
|
||||
return Mutiny.fetch(model.getCategoriesInscrites()).chain(o ->
|
||||
send(uuid, "sendRegister", CombEntity.fromModel(model).addCategoriesInscrites(o))
|
||||
.call(__ -> cardService.addTeamCartToNewComb(model.getId() * -1,
|
||||
null, model.getClub(), model.getCompetition())
|
||||
.chain(cardModels -> send(uuid, "sendCards", cardModels))));
|
||||
}
|
||||
|
||||
public Uni<Void> sendRegisterRemove(String uuid, Long combId) {
|
||||
|
||||
Reference in New Issue
Block a user