Compare commits
3 Commits
e81f475402
...
870891a77c
| Author | SHA1 | Date | |
|---|---|---|---|
| 870891a77c | |||
| 7e1356b621 | |||
| b689521e56 |
@ -281,7 +281,7 @@ public class CompetitionService {
|
|||||||
public Uni<SimpleRegisterComb> addRegisterComb(SecurityCtx securityCtx, Long id, RegisterRequestData data,
|
public Uni<SimpleRegisterComb> addRegisterComb(SecurityCtx securityCtx, Long id, RegisterRequestData data,
|
||||||
String source) {
|
String source) {
|
||||||
if ("admin".equals(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)
|
return permService.hasEditPerm(securityCtx, id)
|
||||||
.chain(c -> findComb(data.getLicence(), data.getFname(), data.getLname())
|
.chain(c -> findComb(data.getLicence(), data.getFname(), data.getLname())
|
||||||
.call(combModel -> Mutiny.fetch(combModel.getLicences()))
|
.call(combModel -> Mutiny.fetch(combModel.getLicences()))
|
||||||
|
|||||||
@ -67,6 +67,9 @@ function CategoryHeader({cat, setCatId}) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (cats && cats.length > 0 && !cat) {
|
if (cats && cats.length > 0 && !cat) {
|
||||||
setCatId(cats.sort((a, b) => a.name.localeCompare(b.name))[0].id);
|
setCatId(cats.sort((a, b) => a.name.localeCompare(b.name))[0].id);
|
||||||
|
} else if (cats && cats.length === 0) {
|
||||||
|
setModal({});
|
||||||
|
bthRef.current.click();
|
||||||
}
|
}
|
||||||
}, [cats]);
|
}, [cats]);
|
||||||
|
|
||||||
@ -77,7 +80,6 @@ function CategoryHeader({cat, setCatId}) {
|
|||||||
} else { // New category
|
} else { // New category
|
||||||
setModal({});
|
setModal({});
|
||||||
bthRef.current.click();
|
bthRef.current.click();
|
||||||
console.log(cat);
|
|
||||||
e.target.value = cat?.id;
|
e.target.value = cat?.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user