also respecting day slots
This commit is contained in:
@ -7,7 +7,7 @@ import java.util.List;
|
||||
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.DeleteConditionStep;
|
||||
import org.jooq.InsertValuesStep12;
|
||||
import org.jooq.InsertValuesStep17;
|
||||
import org.jooq.SelectConditionStep;
|
||||
import org.jooq.SelectSeekStep1;
|
||||
import org.jooq.UpdateConditionStep;
|
||||
@ -42,7 +42,7 @@ public class RegistrationRepository {
|
||||
public void save(@Valid RegistrationBean bean, String registrator) {
|
||||
jooq.transaction(t -> {
|
||||
if (bean.getPkRegistration() == null) {
|
||||
InsertValuesStep12<TRegistrationRecord, EnumCamp, String, String, String, EnumSex, Boolean, String, Integer, Boolean, String, Boolean, Integer> sql = DSL.using(t)
|
||||
InsertValuesStep17<TRegistrationRecord, EnumCamp, String, String, String, EnumSex, Boolean, String, Integer, Boolean, String, Boolean, Integer, Boolean, Boolean, Boolean, Boolean, Boolean> sql = DSL.using(t)
|
||||
// @formatter:off
|
||||
.insertInto(T_REGISTRATION,
|
||||
T_REGISTRATION.CAMP,
|
||||
@ -56,10 +56,15 @@ public class RegistrationRepository {
|
||||
T_REGISTRATION.WANT_PLACE_IN_CAR,
|
||||
T_REGISTRATION.DISEASES,
|
||||
T_REGISTRATION.REQUIRE_PAYMENT,
|
||||
T_REGISTRATION.FK_AGE)
|
||||
T_REGISTRATION.FK_AGE,
|
||||
T_REGISTRATION.DAY0,
|
||||
T_REGISTRATION.DAY1,
|
||||
T_REGISTRATION.DAY2,
|
||||
T_REGISTRATION.DAY3,
|
||||
T_REGISTRATION.DAY4)
|
||||
.values(EnumCamp.Gemeindefreizeit_2025, registrator, bean.getForename(), bean.getSurname(), EnumSex.lookupLiteral(bean.getSex()),
|
||||
bean.getBarrierFree(), bean.getNutrition(), bean.getDriverProvidePlaces(), bean.getWantPlaceInCar(), bean.getDiseases(), bean.getRequirePayment(),
|
||||
bean.getFkAge());
|
||||
bean.getFkAge(), bean.getDay0(), bean.getDay1(), bean.getDay2(), bean.getDay3(), bean.getDay4());
|
||||
// @formatter:on
|
||||
Main.LOGGER.trace(sql);
|
||||
sql.execute();
|
||||
@ -78,6 +83,11 @@ public class RegistrationRepository {
|
||||
.set(T_REGISTRATION.DISEASES, bean.getDiseases())
|
||||
.set(T_REGISTRATION.REQUIRE_PAYMENT, bean.getRequirePayment())
|
||||
.set(T_REGISTRATION.FK_AGE, bean.getFkAge())
|
||||
.set(T_REGISTRATION.DAY0, bean.getDay0())
|
||||
.set(T_REGISTRATION.DAY1, bean.getDay1())
|
||||
.set(T_REGISTRATION.DAY2, bean.getDay2())
|
||||
.set(T_REGISTRATION.DAY3, bean.getDay3())
|
||||
.set(T_REGISTRATION.DAY4, bean.getDay4())
|
||||
.where(T_REGISTRATION.PK_REGISTRATION.eq(bean.getPkRegistration()));
|
||||
// @formatter:on
|
||||
Main.LOGGER.trace(sql);
|
||||
|
@ -28,7 +28,6 @@ public class RegistrationBean implements Serializable {
|
||||
private Boolean day2;
|
||||
private Boolean day3;
|
||||
private Boolean day4;
|
||||
private Boolean day5;
|
||||
|
||||
private String nutrition;
|
||||
private Integer driverProvidePlaces;
|
||||
@ -46,7 +45,6 @@ public class RegistrationBean implements Serializable {
|
||||
bean.setDay2(true);
|
||||
bean.setDay3(true);
|
||||
bean.setDay4(true);
|
||||
bean.setDay5(true);
|
||||
return bean;
|
||||
}
|
||||
|
||||
@ -273,18 +271,4 @@ public class RegistrationBean implements Serializable {
|
||||
public void setDay4(Boolean day4) {
|
||||
this.day4 = day4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the day5
|
||||
*/
|
||||
public Boolean getDay5() {
|
||||
return day5;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param day5 the day5 to set
|
||||
*/
|
||||
public void setDay5(Boolean day5) {
|
||||
this.day5 = day5;
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,19 @@
|
||||
<option th:each="a : ${ages}" th:value="${a.pkAge}" th:label="${a.name} + ', ' + ${a.price} + ' € / Tag'"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3">Welche Tage</div>
|
||||
<div class="col-sm-9">
|
||||
<input id="day0" type="checkbox" name="active" th:field="*{day0}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day0">Donnerstag</label>
|
||||
<input id="day1" type="checkbox" name="active" th:field="*{day1}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day1">Freitag</label>
|
||||
<input id="day2" type="checkbox" name="active" th:field="*{day2}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day2">Sonnabend</label>
|
||||
<input id="day3" type="checkbox" name="active" th:field="*{day3}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day3">Sonntag</label>
|
||||
<input id="day4" type="checkbox" name="active" th:field="*{day4}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day4">Montag</label>
|
||||
</div>
|
||||
<div class="col-sm-3">Barrierefrei</div>
|
||||
<div class="col-sm-9">
|
||||
<span th:if="${#fields.hasErrors('barrierFree')}" th:errors="*{barrierFree}" class="text-danger"></span>
|
||||
@ -48,17 +61,13 @@
|
||||
<div class="col-sm-9">
|
||||
<textarea th:field="*{nutrition}" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-3">Besonderheiten / Krankheiten</div>
|
||||
<div class="col-sm-9">
|
||||
<textarea th:field="*{diseases}" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-3">Biete Plätze zum Mitfahren</div>
|
||||
<div class="col-sm-9">
|
||||
<input th:field="*{driverProvidePlaces}" type="number" min="0" max="8" class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-3">Benötige eine Mitfahrgelegenheit</div>
|
||||
<div class="col-sm-9">
|
||||
<input id="wantPlaceInCar" type="checkbox" name="active" th:checked="*{wantPlaceInCar}" class="form-check-input" />
|
||||
<input id="wantPlaceInCar" type="checkbox" name="active" th:field="*{wantPlaceInCar}" class="form-check-input" />
|
||||
<label class="form-check-label" for="wantPlaceInCar">Ja, brauche ich</label>
|
||||
</div>
|
||||
<div class="col-sm-3">Besonderheiten / Krankheiten</div>
|
||||
@ -67,7 +76,7 @@
|
||||
</div>
|
||||
<div class="col-sm-3">Finanzierungsunterstützung</div>
|
||||
<div class="col-sm-9">
|
||||
<input id="requirePayment" type="checkbox" name="active" th:checked="*{requirePayment}" class="form-check-input" />
|
||||
<input id="requirePayment" type="checkbox" name="active" th:field="*{requirePayment}" class="form-check-input" />
|
||||
<label class="form-check-label" for="requirePayment">Ja, brauche ich</label>
|
||||
</div>
|
||||
|
||||
|
@ -65,19 +65,16 @@
|
||||
</div>
|
||||
<div class="col-sm-3">Welche Tage</div>
|
||||
<div class="col-sm-9">
|
||||
<input id="day0" type="checkbox" name="active" th:checked="*{day0}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day0">Mittwoch</label>
|
||||
<input id="day1" type="checkbox" name="active" th:checked="*{day1}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day1">Donnerstag</label>
|
||||
<input id="day2" type="checkbox" name="active" th:checked="*{day2}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day2">Freitag</label>
|
||||
<input id="day3" type="checkbox" name="active" th:checked="*{day3}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day3">Sonnabend</label>
|
||||
<input id="day4" type="checkbox" name="active" th:checked="*{day4}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day4">Sonntag</label>
|
||||
<input id="day5" type="checkbox" name="active" th:checked="*{day5}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day5">Montag</label>
|
||||
<span id="calcprice"></span>
|
||||
<input id="day0" type="checkbox" name="active" th:field="*{day0}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day0">Donnerstag</label>
|
||||
<input id="day1" type="checkbox" name="active" th:field="*{day1}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day1">Freitag</label>
|
||||
<input id="day2" type="checkbox" name="active" th:field="*{day2}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day2">Sonnabend</label>
|
||||
<input id="day3" type="checkbox" name="active" th:field="*{day3}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day3">Sonntag</label>
|
||||
<input id="day4" type="checkbox" name="active" th:field="*{day4}" class="form-check-input" />
|
||||
<label class="form-check-label" for="day4">Montag</label>
|
||||
</div>
|
||||
<div class="col-sm-3">Barrierefrei</div>
|
||||
<div class="col-sm-9">
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="col-sm-3">Benötige eine Mitfahrgelegenheit</div>
|
||||
<div class="col-sm-9">
|
||||
<input id="wantPlaceInCar" type="checkbox" name="active" th:checked="*{wantPlaceInCar}" class="form-check-input" />
|
||||
<input id="wantPlaceInCar" type="checkbox" name="active" th:field="*{wantPlaceInCar}" class="form-check-input" />
|
||||
<label class="form-check-label" for="wantPlaceInCar">Ja, brauche ich</label>
|
||||
</div>
|
||||
<div class="col-sm-3">Besonderheiten / Krankheiten</div>
|
||||
@ -106,7 +103,7 @@
|
||||
</div>
|
||||
<div class="col-sm-3">Finanzierungsunterstützung</div>
|
||||
<div class="col-sm-9">
|
||||
<input id="requirePayment" type="checkbox" name="active" th:checked="*{requirePayment}" class="form-check-input" />
|
||||
<input id="requirePayment" type="checkbox" name="active" th:field="*{requirePayment}" class="form-check-input" />
|
||||
<label class="form-check-label" for="requirePayment">Ja, brauche ich</label>
|
||||
</div>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<body>
|
||||
<th:block layout:fragment="content">
|
||||
<div class="borderdist">
|
||||
<div class="container" sec:authorize="hasAnyRole('Kinderstunde klein', 'Bibelunterricht')">
|
||||
<div class="container" th:if="${hasDateRole || hasBUrole}">
|
||||
<pre>Kommende Einteilung für den Bibelunterricht</pre>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4 col-lg-2 card p-2 m-1" th:each="s : ${list}">
|
||||
@ -13,6 +13,9 @@
|
||||
<div class="alert alert-info" th:if="${list.size() < 1}">Es gibt noch keine neuen Termine oder Zusagen für Termine.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container" th:unless="${hasDateRole || hasBUrole}">
|
||||
Willkommen im Anmeldeportal für die Gemeindefreizeit.
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user