From eef6295bae6ad7c15da29fc5d4c5d3f42674950f Mon Sep 17 00:00:00 2001 From: Jottyfan Date: Tue, 3 Dec 2024 21:13:52 +0100 Subject: [PATCH] also respecting day slots --- build.gradle | 4 +-- .../modules/camp/RegistrationRepository.java | 18 ++++++++++--- .../modules/camp/model/RegistrationBean.java | 16 ----------- src/main/resources/templates/camp/edit.html | 21 ++++++++++----- .../templates/camp/registration.html | 27 +++++++++---------- src/main/resources/templates/next.html | 5 +++- 6 files changed, 47 insertions(+), 44 deletions(-) diff --git a/build.gradle b/build.gradle index 7a86f59..c2353b1 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'de.jottyfan.bico' -version = '0.1.7' +version = '0.1.8' description = """BibleClassOrganizer""" @@ -47,7 +47,7 @@ war { } dependencies { - implementation 'de.jottyfan:bicolib:6' + implementation 'de.jottyfan:bicolib:7' implementation 'org.mnode.ical4j:ical4j:4.0.4' diff --git a/src/main/java/de/jottyfan/bico/modules/camp/RegistrationRepository.java b/src/main/java/de/jottyfan/bico/modules/camp/RegistrationRepository.java index ed49cfc..95c2cff 100644 --- a/src/main/java/de/jottyfan/bico/modules/camp/RegistrationRepository.java +++ b/src/main/java/de/jottyfan/bico/modules/camp/RegistrationRepository.java @@ -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 sql = DSL.using(t) + InsertValuesStep17 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); diff --git a/src/main/java/de/jottyfan/bico/modules/camp/model/RegistrationBean.java b/src/main/java/de/jottyfan/bico/modules/camp/model/RegistrationBean.java index b17d567..15c8fba 100644 --- a/src/main/java/de/jottyfan/bico/modules/camp/model/RegistrationBean.java +++ b/src/main/java/de/jottyfan/bico/modules/camp/model/RegistrationBean.java @@ -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; - } } diff --git a/src/main/resources/templates/camp/edit.html b/src/main/resources/templates/camp/edit.html index ecec256..d13322b 100644 --- a/src/main/resources/templates/camp/edit.html +++ b/src/main/resources/templates/camp/edit.html @@ -36,6 +36,19 @@ +
Welche Tage
+
+ + + + + + + + + + +
Barrierefrei
@@ -48,17 +61,13 @@
-
Besonderheiten / Krankheiten
-
- -
Biete Plätze zum Mitfahren
Benötige eine Mitfahrgelegenheit
- +
Besonderheiten / Krankheiten
@@ -67,7 +76,7 @@
Finanzierungsunterstützung
- +
diff --git a/src/main/resources/templates/camp/registration.html b/src/main/resources/templates/camp/registration.html index 63254c4..c1d6a3e 100644 --- a/src/main/resources/templates/camp/registration.html +++ b/src/main/resources/templates/camp/registration.html @@ -65,19 +65,16 @@
Welche Tage
- - - - - - - - - - - - - + + + + + + + + + +
Barrierefrei
@@ -97,7 +94,7 @@
Benötige eine Mitfahrgelegenheit
- +
Besonderheiten / Krankheiten
@@ -106,7 +103,7 @@
Finanzierungsunterstützung
- +
diff --git a/src/main/resources/templates/next.html b/src/main/resources/templates/next.html index 476e5d8..531c983 100644 --- a/src/main/resources/templates/next.html +++ b/src/main/resources/templates/next.html @@ -3,7 +3,7 @@
-
+
Kommende Einteilung für den Bibelunterricht
@@ -13,6 +13,9 @@
Es gibt noch keine neuen Termine oder Zusagen für Termine.
+
+ Willkommen im Anmeldeportal für die Gemeindefreizeit. +