Compare commits

..

3 Commits

Author SHA1 Message Date
870891a77c Merge pull request 'dev' (#73) from dev into master
Reviewed-on: #73
2025-12-19 15:14:04 +00:00
7e1356b621 fix: cm auto ask new category on empty competition
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 10m17s
2025-12-19 16:13:37 +01:00
b689521e56 fix: comb register with null license 2025-12-19 16:02:28 +01:00
2 changed files with 4 additions and 2 deletions

View File

@ -281,7 +281,7 @@ public class CompetitionService {
public Uni<SimpleRegisterComb> addRegisterComb(SecurityCtx securityCtx, Long id, RegisterRequestData data,
String source) {
if ("admin".equals(source))
if (data.getLicence() != -1) { // not a guest
if (data.getLicence() == null || data.getLicence() != -1) { // not a guest
return permService.hasEditPerm(securityCtx, id)
.chain(c -> findComb(data.getLicence(), data.getFname(), data.getLname())
.call(combModel -> Mutiny.fetch(combModel.getLicences()))

View File

@ -67,6 +67,9 @@ function CategoryHeader({cat, setCatId}) {
useEffect(() => {
if (cats && cats.length > 0 && !cat) {
setCatId(cats.sort((a, b) => a.name.localeCompare(b.name))[0].id);
} else if (cats && cats.length === 0) {
setModal({});
bthRef.current.click();
}
}, [cats]);
@ -77,7 +80,6 @@ function CategoryHeader({cat, setCatId}) {
} else { // New category
setModal({});
bthRef.current.click();
console.log(cat);
e.target.value = cat?.id;
}
}