booking module on dashboard added

This commit is contained in:
Jottyfan
2022-12-10 19:55:43 +01:00
parent 3e1e5e12ab
commit c936b39ad0
6 changed files with 22 additions and 13 deletions

View File

@@ -45,6 +45,7 @@ public class IndexController extends CommonController {
model.addAttribute("mybookings", service.getBookingsOf(super.getCurrentUser(request)));
model.addAttribute("bookingBean", new BookingBean());
model.addAttribute("keycloakProfileUrl", keycloak.getUserClientUrl());
model.addAttribute("camps", service.getAllCamps());
return "/dashboard";
}

View File

@@ -5,7 +5,6 @@ import java.time.LocalDate;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.springframework.format.annotation.DateTimeFormat;
@@ -46,7 +45,6 @@ public class RegistrationBean implements Serializable {
private Integer fkCamp;
@NotNull(message = "Bitte gib an, in welcher Rolle du dich anmelden möchtest.")
private EnumCamprole campRole;
@NotNull(message = "Bitte gib an, ob du dir für spätere Anmeldungen einen Zugang einrichten willst.")
private Boolean registerInKeycloak;
private String login;
private String password;

View File

@@ -48,7 +48,7 @@ public class RegistrationController extends CommonController {
model.addAttribute("camp", campBean);
return "/registration/registration";
}
Boolean result = service.register(bean, getCurrentUser(request));
Boolean result = service.register(bean, (String) model.getAttribute("currentUser"));
return result ? "/registration/success" : "/error";
}