still buggy on rejecting people and loading old bookings
This commit is contained in:
20
build.gradle
20
build.gradle
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'org.springframework.boot' version '3.2.4'
|
id 'org.springframework.boot' version '3.3.4'
|
||||||
id "io.spring.dependency-management" version "1.1.4"
|
id "io.spring.dependency-management" version "1.1.4"
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'war'
|
id 'war'
|
||||||
@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = 'de.jottyfan.camporganizer'
|
group = 'de.jottyfan.camporganizer'
|
||||||
version = '0.8.6'
|
version = '0.8.7'
|
||||||
|
|
||||||
description = """CampOrganizer2"""
|
description = """CampOrganizer2"""
|
||||||
|
|
||||||
@ -40,15 +40,15 @@ war {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.jooq:jooq:3.19.6'
|
implementation 'org.jooq:jooq:3.19.14'
|
||||||
implementation 'de.jottyfan:COJooq:2024.03.16c'
|
implementation 'de.jottyfan:COJooq:2024.10.24'
|
||||||
|
|
||||||
implementation 'org.apache.logging.log4j:log4j-api:2.23.1'
|
implementation 'org.apache.logging.log4j:log4j-api:2.24.1'
|
||||||
implementation 'org.apache.logging.log4j:log4j-core:2.23.1'
|
implementation 'org.apache.logging.log4j:log4j-core:2.24.1'
|
||||||
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.23.1'
|
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.24.1'
|
||||||
|
|
||||||
implementation 'org.webjars:bootstrap:5.3.2'
|
implementation 'org.webjars:bootstrap:5.3.3'
|
||||||
implementation 'org.webjars:font-awesome:6.5.1'
|
implementation 'org.webjars:font-awesome:6.5.2'
|
||||||
implementation 'org.webjars:jquery:3.7.1'
|
implementation 'org.webjars:jquery:3.7.1'
|
||||||
implementation 'org.webjars:popper.js:2.11.7'
|
implementation 'org.webjars:popper.js:2.11.7'
|
||||||
implementation 'org.webjars:datatables:1.13.5'
|
implementation 'org.webjars:datatables:1.13.5'
|
||||||
@ -74,7 +74,7 @@ dependencies {
|
|||||||
implementation 'org.springframework.boot:spring-boot-starter-jooq'
|
implementation 'org.springframework.boot:spring-boot-starter-jooq'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||||
implementation "org.springframework.boot:spring-boot-starter-oauth2-client"
|
implementation "org.springframework.boot:spring-boot-starter-oauth2-client"
|
||||||
implementation 'org.springframework.security:spring-security-oauth2-authorization-server:1.2.1'
|
implementation 'org.springframework.security:spring-security-oauth2-authorization-server:1.3.3'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package de.jottyfan.camporganizer.module.business.bookings;
|
package de.jottyfan.camporganizer.module.business.bookings;
|
||||||
|
|
||||||
|
import static de.jottyfan.camporganizer.db.jooq.Tables.T_CAMPPROFILE;
|
||||||
import static de.jottyfan.camporganizer.db.jooq.Tables.T_PERSON;
|
import static de.jottyfan.camporganizer.db.jooq.Tables.T_PERSON;
|
||||||
import static de.jottyfan.camporganizer.db.jooq.Tables.T_PROFILE;
|
import static de.jottyfan.camporganizer.db.jooq.Tables.T_PROFILE;
|
||||||
import static de.jottyfan.camporganizer.db.jooq.Tables.T_CAMPPROFILE;
|
|
||||||
import static de.jottyfan.camporganizer.db.jooq.Tables.V_CAMP;
|
import static de.jottyfan.camporganizer.db.jooq.Tables.V_CAMP;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -27,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import de.jottyfan.camporganizer.db.EnumConverter;
|
import de.jottyfan.camporganizer.db.EnumConverter;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumSex;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumSex;
|
||||||
import de.jottyfan.camporganizer.db.jooq.tables.records.TPersonRecord;
|
import de.jottyfan.camporganizer.db.jooq.tables.records.TPersonRecord;
|
||||||
import de.jottyfan.camporganizer.module.business.bookings.model.BookerBean;
|
import de.jottyfan.camporganizer.module.business.bookings.model.BookerBean;
|
||||||
@ -52,9 +53,9 @@ public class BookingsRepository {
|
|||||||
* @return a list of bookings; an empty one at least
|
* @return a list of bookings; an empty one at least
|
||||||
*/
|
*/
|
||||||
public List<BookerBean> getBookings(String username) {
|
public List<BookerBean> getBookings(String username) {
|
||||||
SelectSeekStep4<Record10<Integer, Boolean, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, String, Double>, EnumCamprole, EnumSex, String, String> sql = jooq
|
SelectSeekStep4<Record10<Integer, EnumProgress, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, String, Double>, EnumCamprole, EnumSex, String, String> sql = jooq
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
.select(T_PERSON.PK, T_PERSON.ACCEPT, T_PERSON.PAID, T_PERSON.FORENAME, T_PERSON.SURNAME, T_PERSON.CAMPROLE, T_PERSON.SEX, T_PERSON.CREATED, V_CAMP.NAME, V_CAMP.YEAR)
|
.select(T_PERSON.PK, T_PERSON.PROGRESS, T_PERSON.PAID, T_PERSON.FORENAME, T_PERSON.SURNAME, T_PERSON.CAMPROLE, T_PERSON.SEX, T_PERSON.CREATED, V_CAMP.NAME, V_CAMP.YEAR)
|
||||||
.from(T_PERSON)
|
.from(T_PERSON)
|
||||||
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
||||||
.leftJoin(T_CAMPPROFILE).on(T_CAMPPROFILE.FK_CAMP.eq(T_PERSON.FK_CAMP)).and(T_CAMPPROFILE.MODULE.eq(EnumModule.business))
|
.leftJoin(T_CAMPPROFILE).on(T_CAMPPROFILE.FK_CAMP.eq(T_PERSON.FK_CAMP)).and(T_CAMPPROFILE.MODULE.eq(EnumModule.business))
|
||||||
@ -64,13 +65,14 @@ public class BookingsRepository {
|
|||||||
// @formatter:on
|
// @formatter:on
|
||||||
LOGGER.debug(sql.toString());
|
LOGGER.debug(sql.toString());
|
||||||
List<BookerBean> list = new ArrayList<>();
|
List<BookerBean> list = new ArrayList<>();
|
||||||
Iterator<Record10<Integer, Boolean, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, String, Double>> i = sql.fetch().iterator();
|
Iterator<Record10<Integer, EnumProgress, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, String, Double>> i = sql.fetch().iterator();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
Record10<Integer, Boolean, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, String, Double> r = i.next();
|
Record10<Integer, EnumProgress, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, String, Double> r = i.next();
|
||||||
String forename = r.get(T_PERSON.FORENAME);
|
String forename = r.get(T_PERSON.FORENAME);
|
||||||
String surname = r.get(T_PERSON.SURNAME);
|
String surname = r.get(T_PERSON.SURNAME);
|
||||||
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
||||||
EnumSex sex = r.get(T_PERSON.SEX);
|
EnumSex sex = r.get(T_PERSON.SEX);
|
||||||
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
String campName = r.get(V_CAMP.NAME);
|
String campName = r.get(V_CAMP.NAME);
|
||||||
Double campYear = r.get(V_CAMP.YEAR);
|
Double campYear = r.get(V_CAMP.YEAR);
|
||||||
BookerBean bean = new BookerBean();
|
BookerBean bean = new BookerBean();
|
||||||
@ -79,7 +81,7 @@ public class BookingsRepository {
|
|||||||
bean.setRole(EnumConverter.role2GermanNames(role));
|
bean.setRole(EnumConverter.role2GermanNames(role));
|
||||||
bean.setSex(EnumConverter.sex2GermanNames(sex));
|
bean.setSex(EnumConverter.sex2GermanNames(sex));
|
||||||
bean.setBookingDate(r.get(T_PERSON.CREATED));
|
bean.setBookingDate(r.get(T_PERSON.CREATED));
|
||||||
bean.setAccept(r.get(T_PERSON.ACCEPT));
|
bean.setProgress(progress == null ? null : progress.getLiteral());
|
||||||
bean.setPaid(r.get(T_PERSON.PAID));
|
bean.setPaid(r.get(T_PERSON.PAID));
|
||||||
bean.setCamp(String.format("%s %4.0f", campName, campYear));
|
bean.setCamp(String.format("%s %4.0f", campName, campYear));
|
||||||
list.add(bean);
|
list.add(bean);
|
||||||
@ -95,10 +97,10 @@ public class BookingsRepository {
|
|||||||
* @return the booker bean or null
|
* @return the booker bean or null
|
||||||
*/
|
*/
|
||||||
public BookerBean getBooking(Integer id, String username) {
|
public BookerBean getBooking(Integer id, String username) {
|
||||||
SelectConditionStep<Record13<Integer, Boolean, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, BigDecimal, String, Double, String, Integer>> sql = jooq
|
SelectConditionStep<Record13<Integer, EnumProgress, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime, BigDecimal, String, Double, String, Integer>> sql = jooq
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
.select(T_PERSON.PK,
|
.select(T_PERSON.PK,
|
||||||
T_PERSON.ACCEPT,
|
T_PERSON.PROGRESS,
|
||||||
T_PERSON.PAID,
|
T_PERSON.PAID,
|
||||||
T_PERSON.FORENAME,
|
T_PERSON.FORENAME,
|
||||||
T_PERSON.SURNAME,
|
T_PERSON.SURNAME,
|
||||||
@ -126,6 +128,7 @@ public class BookingsRepository {
|
|||||||
String surname = r.get(T_PERSON.SURNAME);
|
String surname = r.get(T_PERSON.SURNAME);
|
||||||
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
||||||
EnumSex sex = r.get(T_PERSON.SEX);
|
EnumSex sex = r.get(T_PERSON.SEX);
|
||||||
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
BigDecimal requiredPrice = r.get(T_PERSON.REQUIRED_PRICE);
|
BigDecimal requiredPrice = r.get(T_PERSON.REQUIRED_PRICE);
|
||||||
String campName = r.get(V_CAMP.NAME);
|
String campName = r.get(V_CAMP.NAME);
|
||||||
Double campYear = r.get(V_CAMP.YEAR);
|
Double campYear = r.get(V_CAMP.YEAR);
|
||||||
@ -136,7 +139,7 @@ public class BookingsRepository {
|
|||||||
bean.setRole(EnumConverter.role2GermanNames(role));
|
bean.setRole(EnumConverter.role2GermanNames(role));
|
||||||
bean.setSex(EnumConverter.sex2GermanNames(sex));
|
bean.setSex(EnumConverter.sex2GermanNames(sex));
|
||||||
bean.setBookingDate(r.get(T_PERSON.CREATED));
|
bean.setBookingDate(r.get(T_PERSON.CREATED));
|
||||||
bean.setAccept(r.get(T_PERSON.ACCEPT));
|
bean.setProgress(progress == null ? null : progress.getLiteral());
|
||||||
bean.setPaid(r.get(T_PERSON.PAID));
|
bean.setPaid(r.get(T_PERSON.PAID));
|
||||||
bean.setCamp(String.format("%s %4.0f", campName, campYear));
|
bean.setCamp(String.format("%s %4.0f", campName, campYear));
|
||||||
bean.setCampId(campId);
|
bean.setCampId(campId);
|
||||||
|
@ -10,13 +10,13 @@ import java.time.LocalDateTime;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BookerBean implements Serializable {
|
public class BookerBean implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 2L;
|
||||||
|
|
||||||
private Integer pk;
|
private Integer pk;
|
||||||
private String name;
|
private String name;
|
||||||
private String role;
|
private String role;
|
||||||
private String sex;
|
private String sex;
|
||||||
private Boolean accept;
|
private String progress;
|
||||||
private LocalDateTime bookingDate;
|
private LocalDateTime bookingDate;
|
||||||
private BigDecimal paid;
|
private BigDecimal paid;
|
||||||
private String camp;
|
private String camp;
|
||||||
@ -24,20 +24,6 @@ public class BookerBean implements Serializable {
|
|||||||
private Integer campId;
|
private Integer campId;
|
||||||
private BigDecimal requiredPrice;
|
private BigDecimal requiredPrice;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the accept
|
|
||||||
*/
|
|
||||||
public Boolean getAccept() {
|
|
||||||
return accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param accept the accept to set
|
|
||||||
*/
|
|
||||||
public void setAccept(Boolean accept) {
|
|
||||||
this.accept = accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the paid
|
* @return the paid
|
||||||
*/
|
*/
|
||||||
@ -141,4 +127,18 @@ public class BookerBean implements Serializable {
|
|||||||
public void setRequiredPrice(BigDecimal requiredPrice) {
|
public void setRequiredPrice(BigDecimal requiredPrice) {
|
||||||
this.requiredPrice = requiredPrice;
|
this.requiredPrice = requiredPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the progress
|
||||||
|
*/
|
||||||
|
public String getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param progress the progress to set
|
||||||
|
*/
|
||||||
|
public void setProgress(String progress) {
|
||||||
|
this.progress = progress;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import de.jottyfan.camporganizer.db.EnumConverter;
|
import de.jottyfan.camporganizer.db.EnumConverter;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumSex;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumSex;
|
||||||
import de.jottyfan.camporganizer.module.business.camp.model.CampBean;
|
import de.jottyfan.camporganizer.module.business.camp.model.CampBean;
|
||||||
import de.jottyfan.camporganizer.module.business.camp.model.PersonBean;
|
import de.jottyfan.camporganizer.module.business.camp.model.PersonBean;
|
||||||
@ -84,9 +85,9 @@ public class CampRepository {
|
|||||||
* @return a list of bookings; an empty one at least
|
* @return a list of bookings; an empty one at least
|
||||||
*/
|
*/
|
||||||
public List<PersonBean> getBookings(Integer pk, String username) {
|
public List<PersonBean> getBookings(Integer pk, String username) {
|
||||||
SelectSeekStep4<Record8<Integer, Boolean, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime>, EnumCamprole, EnumSex, String, String> sql = jooq
|
SelectSeekStep4<Record8<Integer, EnumProgress, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime>, EnumCamprole, EnumSex, String, String> sql = jooq
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
.select(T_PERSON.PK, T_PERSON.ACCEPT, T_PERSON.PAID, T_PERSON.FORENAME, T_PERSON.SURNAME, T_PERSON.CAMPROLE, T_PERSON.SEX, T_PERSON.CREATED)
|
.select(T_PERSON.PK, T_PERSON.PROGRESS, T_PERSON.PAID, T_PERSON.FORENAME, T_PERSON.SURNAME, T_PERSON.CAMPROLE, T_PERSON.SEX, T_PERSON.CREATED)
|
||||||
.from(T_PERSON)
|
.from(T_PERSON)
|
||||||
.leftJoin(T_CAMPPROFILE).on(T_CAMPPROFILE.FK_CAMP.eq(T_PERSON.FK_CAMP)).and(T_CAMPPROFILE.MODULE.eq(EnumModule.business))
|
.leftJoin(T_CAMPPROFILE).on(T_CAMPPROFILE.FK_CAMP.eq(T_PERSON.FK_CAMP)).and(T_CAMPPROFILE.MODULE.eq(EnumModule.business))
|
||||||
.leftJoin(T_PROFILE).on(T_PROFILE.PK.eq(T_CAMPPROFILE.FK_PROFILE))
|
.leftJoin(T_PROFILE).on(T_PROFILE.PK.eq(T_CAMPPROFILE.FK_PROFILE))
|
||||||
@ -96,20 +97,21 @@ public class CampRepository {
|
|||||||
// @formatter:on
|
// @formatter:on
|
||||||
LOGGER.debug(sql.toString());
|
LOGGER.debug(sql.toString());
|
||||||
List<PersonBean> list = new ArrayList<>();
|
List<PersonBean> list = new ArrayList<>();
|
||||||
Iterator<Record8<Integer, Boolean, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime>> i = sql.fetch().iterator();
|
Iterator<Record8<Integer, EnumProgress, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime>> i = sql.fetch().iterator();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
Record8<Integer, Boolean, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime> r = i.next();
|
Record8<Integer, EnumProgress, BigDecimal, String, String, EnumCamprole, EnumSex, LocalDateTime> r = i.next();
|
||||||
String forename = r.get(T_PERSON.FORENAME);
|
String forename = r.get(T_PERSON.FORENAME);
|
||||||
String surname = r.get(T_PERSON.SURNAME);
|
String surname = r.get(T_PERSON.SURNAME);
|
||||||
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
||||||
EnumSex sex = r.get(T_PERSON.SEX);
|
EnumSex sex = r.get(T_PERSON.SEX);
|
||||||
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
PersonBean bean = new PersonBean();
|
PersonBean bean = new PersonBean();
|
||||||
bean.setPk(r.get(T_PERSON.PK));
|
bean.setPk(r.get(T_PERSON.PK));
|
||||||
bean.setName(String.format("%s %s", forename, surname));
|
bean.setName(String.format("%s %s", forename, surname));
|
||||||
bean.setRole(EnumConverter.role2GermanNames(role));
|
bean.setRole(EnumConverter.role2GermanNames(role));
|
||||||
bean.setSex(EnumConverter.sex2GermanNames(sex));
|
bean.setSex(EnumConverter.sex2GermanNames(sex));
|
||||||
bean.setBookingDate(r.get(T_PERSON.CREATED));
|
bean.setBookingDate(r.get(T_PERSON.CREATED));
|
||||||
bean.setAccept(r.get(T_PERSON.ACCEPT));
|
bean.setProgress(progress == null ? null : progress.getLiteral());
|
||||||
bean.setPaid(r.get(T_PERSON.PAID));
|
bean.setPaid(r.get(T_PERSON.PAID));
|
||||||
list.add(bean);
|
list.add(bean);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.module.business.camp.model.BookingBean;
|
import de.jottyfan.camporganizer.module.business.camp.model.BookingBean;
|
||||||
import de.jottyfan.camporganizer.module.business.camp.model.CampBean;
|
import de.jottyfan.camporganizer.module.business.camp.model.CampBean;
|
||||||
import de.jottyfan.camporganizer.module.business.camp.model.PersonBean;
|
import de.jottyfan.camporganizer.module.business.camp.model.PersonBean;
|
||||||
@ -31,12 +32,12 @@ public class CampService {
|
|||||||
Integer rejected = 0;
|
Integer rejected = 0;
|
||||||
BigDecimal paid = new BigDecimal(0);
|
BigDecimal paid = new BigDecimal(0);
|
||||||
for (PersonBean p : campGateway.getBookings(id, username)) {
|
for (PersonBean p : campGateway.getBookings(id, username)) {
|
||||||
Boolean acceptence = p.getAccept();
|
String progress = p.getProgress();
|
||||||
if (acceptence == null) {
|
if (EnumProgress.requested.getLiteral().equals(progress)) {
|
||||||
open += 1;
|
open += 1;
|
||||||
} else if (acceptence) {
|
} else if (EnumProgress.approved.getLiteral().equals(progress)) {
|
||||||
approved += 1;
|
approved += 1;
|
||||||
} else {
|
} else if (EnumProgress.rejected.getLiteral().equals(progress)) {
|
||||||
rejected += 1;
|
rejected += 1;
|
||||||
}
|
}
|
||||||
paid = paid.add(p.getPaid() == null ? new BigDecimal(0) : p.getPaid());
|
paid = paid.add(p.getPaid() == null ? new BigDecimal(0) : p.getPaid());
|
||||||
|
@ -16,24 +16,10 @@ public class PersonBean implements Serializable {
|
|||||||
private String name;
|
private String name;
|
||||||
private String role;
|
private String role;
|
||||||
private String sex;
|
private String sex;
|
||||||
private Boolean accept;
|
private String progress;
|
||||||
private LocalDateTime bookingDate;
|
private LocalDateTime bookingDate;
|
||||||
private BigDecimal paid;
|
private BigDecimal paid;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the accept
|
|
||||||
*/
|
|
||||||
public Boolean getAccept() {
|
|
||||||
return accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param accept the accept to set
|
|
||||||
*/
|
|
||||||
public void setAccept(Boolean accept) {
|
|
||||||
this.accept = accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the paid
|
* @return the paid
|
||||||
*/
|
*/
|
||||||
@ -99,4 +85,18 @@ public class PersonBean implements Serializable {
|
|||||||
public void setBookingDate(LocalDateTime bookingDate) {
|
public void setBookingDate(LocalDateTime bookingDate) {
|
||||||
this.bookingDate = bookingDate;
|
this.bookingDate = bookingDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the progress
|
||||||
|
*/
|
||||||
|
public String getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param progress the progress to set
|
||||||
|
*/
|
||||||
|
public void setProgress(String progress) {
|
||||||
|
this.progress = progress;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumDocument;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumDocument;
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.db.jooq.tables.TProfile;
|
import de.jottyfan.camporganizer.db.jooq.tables.TProfile;
|
||||||
import de.jottyfan.camporganizer.db.jooq.tables.records.VCampRecord;
|
import de.jottyfan.camporganizer.db.jooq.tables.records.VCampRecord;
|
||||||
import de.jottyfan.camporganizer.module.camplist.model.BookingBean;
|
import de.jottyfan.camporganizer.module.camplist.model.BookingBean;
|
||||||
@ -76,7 +77,7 @@ public class CamplistRepository {
|
|||||||
T_PERSON.CREATED,
|
T_PERSON.CREATED,
|
||||||
T_PERSON.EMAIL,
|
T_PERSON.EMAIL,
|
||||||
T_PERSON.SEX,
|
T_PERSON.SEX,
|
||||||
T_PERSON.ACCEPT,
|
T_PERSON.PROGRESS,
|
||||||
T_PERSON.FK_CAMP,
|
T_PERSON.FK_CAMP,
|
||||||
T_PROFILE.FORENAME,
|
T_PROFILE.FORENAME,
|
||||||
T_PROFILE.SURNAME,
|
T_PROFILE.SURNAME,
|
||||||
@ -106,6 +107,8 @@ public class CamplistRepository {
|
|||||||
Record r = i.next();
|
Record r = i.next();
|
||||||
Integer fkCamp = r.get(T_PERSON.FK_CAMP);
|
Integer fkCamp = r.get(T_PERSON.FK_CAMP);
|
||||||
BookingBean bean = new BookingBean();
|
BookingBean bean = new BookingBean();
|
||||||
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
|
bean.setProgress(progress == null ? null : progress.getLiteral());
|
||||||
bean.setPk(r.get(T_PERSON.PK));
|
bean.setPk(r.get(T_PERSON.PK));
|
||||||
bean.setForename(r.get(T_PERSON.FORENAME));
|
bean.setForename(r.get(T_PERSON.FORENAME));
|
||||||
bean.setSurname(r.get(T_PERSON.SURNAME));
|
bean.setSurname(r.get(T_PERSON.SURNAME));
|
||||||
@ -129,7 +132,6 @@ public class CamplistRepository {
|
|||||||
bean.setUrl(r.get(V_CAMP.URL));
|
bean.setUrl(r.get(V_CAMP.URL));
|
||||||
bean.setIsOver(r.get(V_CAMP.IS_OVER));
|
bean.setIsOver(r.get(V_CAMP.IS_OVER));
|
||||||
bean.setCampName(r.get(V_CAMP.NAME));
|
bean.setCampName(r.get(V_CAMP.NAME));
|
||||||
bean.setAccept(r.get(T_PERSON.ACCEPT));
|
|
||||||
StringBuilder buf = new StringBuilder();
|
StringBuilder buf = new StringBuilder();
|
||||||
String forename = r.get(REGISTRATOR.FORENAME);
|
String forename = r.get(REGISTRATOR.FORENAME);
|
||||||
String surname = r.get(REGISTRATOR.SURNAME);
|
String surname = r.get(REGISTRATOR.SURNAME);
|
||||||
|
@ -41,7 +41,7 @@ public class BookingBean implements Serializable {
|
|||||||
private Boolean isOver;
|
private Boolean isOver;
|
||||||
private String campName;
|
private String campName;
|
||||||
private String registrator;
|
private String registrator;
|
||||||
private Boolean accept;
|
private String progress;
|
||||||
private String subscriber;
|
private String subscriber;
|
||||||
|
|
||||||
private List<DocumentBean> documents;
|
private List<DocumentBean> documents;
|
||||||
@ -396,14 +396,6 @@ public class BookingBean implements Serializable {
|
|||||||
this.registrator = registrator;
|
this.registrator = registrator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getAccept() {
|
|
||||||
return accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAccept(Boolean accept) {
|
|
||||||
this.accept = accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSubscriber() {
|
public String getSubscriber() {
|
||||||
return subscriber;
|
return subscriber;
|
||||||
}
|
}
|
||||||
@ -416,4 +408,18 @@ public class BookingBean implements Serializable {
|
|||||||
return documents;
|
return documents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the progress
|
||||||
|
*/
|
||||||
|
public String getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param progress the progress to set
|
||||||
|
*/
|
||||||
|
public void setProgress(String progress) {
|
||||||
|
this.progress = progress;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumSex;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumSex;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.board.model.CampBean;
|
import de.jottyfan.camporganizer.module.confirmation.board.model.CampBean;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.board.model.PersonBean;
|
import de.jottyfan.camporganizer.module.confirmation.board.model.PersonBean;
|
||||||
@ -93,7 +94,8 @@ public class ConfirmationBoardRepository {
|
|||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
Record r = i.next();
|
Record r = i.next();
|
||||||
PersonBean bean = new PersonBean();
|
PersonBean bean = new PersonBean();
|
||||||
bean.setAccept(r.get(T_PERSON.ACCEPT));
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
|
bean.setProgress(progress == null ? null : progress.getLiteral());
|
||||||
bean.setBirthDate(r.get(T_PERSON.BIRTHDATE));
|
bean.setBirthDate(r.get(T_PERSON.BIRTHDATE));
|
||||||
bean.setCamprole(r.get(T_PERSON.CAMPROLE) == null ? null : r.get(T_PERSON.CAMPROLE).getLiteral());
|
bean.setCamprole(r.get(T_PERSON.CAMPROLE) == null ? null : r.get(T_PERSON.CAMPROLE).getLiteral());
|
||||||
bean.setCity(r.get(T_PERSON.CITY));
|
bean.setCity(r.get(T_PERSON.CITY));
|
||||||
|
@ -61,7 +61,7 @@ public class List2CSVService {
|
|||||||
append(buf, bean.getSex());
|
append(buf, bean.getSex());
|
||||||
append(buf, bean.getCamprolle());
|
append(buf, bean.getCamprolle());
|
||||||
append(buf, bean.getBirthDate());
|
append(buf, bean.getBirthDate());
|
||||||
append(buf, bean.getAccept());
|
append(buf, bean.getProgress());
|
||||||
append(buf, bean.getCreated());
|
append(buf, bean.getCreated());
|
||||||
append(buf, bean.getConsentCatalogPhoto());
|
append(buf, bean.getConsentCatalogPhoto());
|
||||||
append(buf, bean.getComment());
|
append(buf, bean.getComment());
|
||||||
|
@ -22,7 +22,7 @@ public class PersonBean implements Serializable {
|
|||||||
private String email;
|
private String email;
|
||||||
private LocalDate birthDate;
|
private LocalDate birthDate;
|
||||||
private String camprole;
|
private String camprole;
|
||||||
private Boolean accept;
|
private String progress;
|
||||||
private LocalDateTime created;
|
private LocalDateTime created;
|
||||||
private String sex;
|
private String sex;
|
||||||
private Double paid;
|
private Double paid;
|
||||||
@ -181,20 +181,6 @@ public class PersonBean implements Serializable {
|
|||||||
this.camprole = camprole;
|
this.camprole = camprole;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the accept
|
|
||||||
*/
|
|
||||||
public Boolean getAccept() {
|
|
||||||
return accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param accept the accept to set
|
|
||||||
*/
|
|
||||||
public void setAccept(Boolean accept) {
|
|
||||||
this.accept = accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the created
|
* @return the created
|
||||||
*/
|
*/
|
||||||
@ -264,4 +250,18 @@ public class PersonBean implements Serializable {
|
|||||||
public void setConsentCatalogPhoto(Boolean consentCatalogPhoto) {
|
public void setConsentCatalogPhoto(Boolean consentCatalogPhoto) {
|
||||||
this.consentCatalogPhoto = consentCatalogPhoto;
|
this.consentCatalogPhoto = consentCatalogPhoto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the progress
|
||||||
|
*/
|
||||||
|
public String getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param progress the progress to set
|
||||||
|
*/
|
||||||
|
public void setProgress(String progress) {
|
||||||
|
this.progress = progress;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.BookingBean;
|
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.BookingBean;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.CampOverviewBean;
|
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.CampOverviewBean;
|
||||||
|
|
||||||
@ -55,10 +56,10 @@ public class ConfirmationRepository {
|
|||||||
*/
|
*/
|
||||||
public List<CampOverviewBean> getCampOverviewBeans(String currentUser) {
|
public List<CampOverviewBean> getCampOverviewBeans(String currentUser) {
|
||||||
Name COUNT = DSL.name("count");
|
Name COUNT = DSL.name("count");
|
||||||
SelectHavingStep<Record4<Integer, Boolean, String, LocalDateTime>> sql = jooq
|
SelectHavingStep<Record4<Integer, EnumProgress, String, LocalDateTime>> sql = jooq
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
.select(DSL.count(T_PERSON.PK).as(COUNT),
|
.select(DSL.count(T_PERSON.PK).as(COUNT),
|
||||||
T_PERSON.ACCEPT,
|
T_PERSON.PROGRESS,
|
||||||
T_CAMP.NAME,
|
T_CAMP.NAME,
|
||||||
T_CAMP.ARRIVE)
|
T_CAMP.ARRIVE)
|
||||||
.from(T_PERSON)
|
.from(T_PERSON)
|
||||||
@ -68,15 +69,15 @@ public class ConfirmationRepository {
|
|||||||
.where(T_CAMP.ARRIVE.isNotNull())
|
.where(T_CAMP.ARRIVE.isNotNull())
|
||||||
.and(T_CAMPPROFILE.MODULE.eq(EnumModule.registration))
|
.and(T_CAMPPROFILE.MODULE.eq(EnumModule.registration))
|
||||||
.and(T_PROFILE.USERNAME.eq(currentUser))
|
.and(T_PROFILE.USERNAME.eq(currentUser))
|
||||||
.groupBy(T_CAMP.NAME, T_CAMP.ARRIVE, T_PERSON.ACCEPT);
|
.groupBy(T_CAMP.NAME, T_CAMP.ARRIVE, T_PERSON.PROGRESS);
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
LOGGER.debug(sql.toString());
|
LOGGER.debug(sql.toString());
|
||||||
Map<LocalDateTime, CampOverviewBean> map = new HashMap<>();
|
Map<LocalDateTime, CampOverviewBean> map = new HashMap<>();
|
||||||
Iterator<Record4<Integer, Boolean, String, LocalDateTime>> i = sql.fetch().iterator();
|
Iterator<Record4<Integer, EnumProgress, String, LocalDateTime>> i = sql.fetch().iterator();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
Record4<Integer, Boolean, String, LocalDateTime> r = i.next();
|
Record4<Integer, EnumProgress, String, LocalDateTime> r = i.next();
|
||||||
Integer count = r.get(COUNT, Integer.class);
|
Integer count = r.get(COUNT, Integer.class);
|
||||||
Boolean accept = r.get(T_PERSON.ACCEPT);
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
String campname = r.get(T_CAMP.NAME);
|
String campname = r.get(T_CAMP.NAME);
|
||||||
LocalDateTime arrive = r.get(T_CAMP.ARRIVE);
|
LocalDateTime arrive = r.get(T_CAMP.ARRIVE);
|
||||||
CampOverviewBean bean = map.get(arrive);
|
CampOverviewBean bean = map.get(arrive);
|
||||||
@ -84,11 +85,11 @@ public class ConfirmationRepository {
|
|||||||
bean = new CampOverviewBean(arrive.toLocalDate(), campname);
|
bean = new CampOverviewBean(arrive.toLocalDate(), campname);
|
||||||
map.put(arrive, bean);
|
map.put(arrive, bean);
|
||||||
}
|
}
|
||||||
if (accept == null) {
|
if (progress == null || EnumProgress.requested.equals(progress)) {
|
||||||
bean.setUntouched(count);
|
bean.setUntouched(count);
|
||||||
} else if (accept) {
|
} else if (EnumProgress.approved.equals(progress)) {
|
||||||
bean.setApproved(count);
|
bean.setApproved(count);
|
||||||
} else {
|
} else if (EnumProgress.rejected.equals(progress)){
|
||||||
bean.setRejected(count);
|
bean.setRejected(count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,7 +146,7 @@ public class ConfirmationRepository {
|
|||||||
* @return a list of booking beans; an empty one at least
|
* @return a list of booking beans; an empty one at least
|
||||||
*/
|
*/
|
||||||
public List<BookingBean> getUntouched(String currentUser) {
|
public List<BookingBean> getUntouched(String currentUser) {
|
||||||
return getListWithCondition(currentUser, T_PERSON.ACCEPT.isNull());
|
return getListWithCondition(currentUser, T_PERSON.PROGRESS.eq(EnumProgress.requested));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -155,7 +156,7 @@ public class ConfirmationRepository {
|
|||||||
* @return a list of booking beans; an empty one at least
|
* @return a list of booking beans; an empty one at least
|
||||||
*/
|
*/
|
||||||
public List<BookingBean> getApproved(String currentUser) {
|
public List<BookingBean> getApproved(String currentUser) {
|
||||||
return getListWithCondition(currentUser, T_PERSON.ACCEPT.isTrue());
|
return getListWithCondition(currentUser, T_PERSON.PROGRESS.eq(EnumProgress.approved));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -165,7 +166,7 @@ public class ConfirmationRepository {
|
|||||||
* @return a list of booking beans; an empty one at least
|
* @return a list of booking beans; an empty one at least
|
||||||
*/
|
*/
|
||||||
public List<BookingBean> getRejected(String currentUser) {
|
public List<BookingBean> getRejected(String currentUser) {
|
||||||
return getListWithCondition(currentUser, T_PERSON.ACCEPT.isFalse());
|
return getListWithCondition(currentUser, T_PERSON.PROGRESS.eq(EnumProgress.rejected));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -183,9 +184,9 @@ public class ConfirmationRepository {
|
|||||||
.or(V_CAMP.YEAR.cast(String.class).containsIgnoreCase(needle));
|
.or(V_CAMP.YEAR.cast(String.class).containsIgnoreCase(needle));
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
SelectSeekStep1<Record8<Integer, String, String, EnumCamprole, String, Double, String, Boolean>, LocalDateTime> sql = jooq
|
SelectSeekStep1<Record8<Integer, String, String, EnumCamprole, String, Double, String, EnumProgress>, LocalDateTime> sql = jooq
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
.select(T_PERSON.PK, T_PERSON.FORENAME, T_PERSON.SURNAME, T_PERSON.CAMPROLE, V_CAMP.NAME, V_CAMP.YEAR, V_CAMP.LOCATION_NAME, T_PERSON.ACCEPT)
|
.select(T_PERSON.PK, T_PERSON.FORENAME, T_PERSON.SURNAME, T_PERSON.CAMPROLE, V_CAMP.NAME, V_CAMP.YEAR, V_CAMP.LOCATION_NAME, T_PERSON.PROGRESS)
|
||||||
.from(T_PERSON)
|
.from(T_PERSON)
|
||||||
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
||||||
.leftJoin(T_CAMPPROFILE).on(T_CAMPPROFILE.FK_CAMP.eq(T_PERSON.FK_CAMP))
|
.leftJoin(T_CAMPPROFILE).on(T_CAMPPROFILE.FK_CAMP.eq(T_PERSON.FK_CAMP))
|
||||||
@ -197,20 +198,20 @@ public class ConfirmationRepository {
|
|||||||
// @formatter:on
|
// @formatter:on
|
||||||
LOGGER.debug(sql.toString());
|
LOGGER.debug(sql.toString());
|
||||||
List<BookingBean> list = new ArrayList<>();
|
List<BookingBean> list = new ArrayList<>();
|
||||||
Iterator<Record8<Integer, String, String, EnumCamprole, String, Double, String, Boolean>> i = sql.fetch().iterator();
|
Iterator<Record8<Integer, String, String, EnumCamprole, String, Double, String, EnumProgress>> i = sql.fetch().iterator();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
Record8<Integer, String, String, EnumCamprole, String, Double, String, Boolean> r = i.next();
|
Record8<Integer, String, String, EnumCamprole, String, Double, String, EnumProgress> r = i.next();
|
||||||
Integer pkPerson = r.get(T_PERSON.PK);
|
Integer pkPerson = r.get(T_PERSON.PK);
|
||||||
String forename = r.get(T_PERSON.FORENAME);
|
String forename = r.get(T_PERSON.FORENAME);
|
||||||
String surname = r.get(T_PERSON.SURNAME);
|
String surname = r.get(T_PERSON.SURNAME);
|
||||||
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
EnumCamprole role = r.get(T_PERSON.CAMPROLE);
|
||||||
String campname = r.get(V_CAMP.NAME);
|
String campname = r.get(V_CAMP.NAME);
|
||||||
Double year = r.get(V_CAMP.YEAR);
|
Double year = r.get(V_CAMP.YEAR);
|
||||||
Boolean accept = r.get(T_PERSON.ACCEPT);
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
BookingBean bean = new BookingBean(pkPerson, null, String.format("%s %4.0f", campname, year));
|
BookingBean bean = new BookingBean(pkPerson, null, String.format("%s %4.0f", campname, year));
|
||||||
bean.setRole(role == null ? null : role.getLiteral());
|
bean.setRole(role == null ? null : role.getLiteral());
|
||||||
bean.setFullname(new StringBuilder().append(forename).append(" ").append(surname).toString());
|
bean.setFullname(new StringBuilder().append(forename).append(" ").append(surname).toString());
|
||||||
bean.setAccept(accept);
|
bean.setProgress(progress == null ? null : progress.getLiteral());
|
||||||
list.add(bean);
|
list.add(bean);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.BookingBean;
|
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.BookingBean;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.CampOverviewBean;
|
import de.jottyfan.camporganizer.module.confirmation.confirmation.model.CampOverviewBean;
|
||||||
|
|
||||||
@ -39,12 +40,14 @@ public class ConfirmationService {
|
|||||||
"<table class=\"table table-striped\"><thead><tr><th>Dabei</th><th>Name</th><th>Freizeit</th><th>Rolle</th></tr><tbody>");
|
"<table class=\"table table-striped\"><thead><tr><th>Dabei</th><th>Name</th><th>Freizeit</th><th>Rolle</th></tr><tbody>");
|
||||||
for (BookingBean bean : gateway.getSearchResult(needle, currentUser)) {
|
for (BookingBean bean : gateway.getSearchResult(needle, currentUser)) {
|
||||||
String acceptHtml = "";
|
String acceptHtml = "";
|
||||||
if (bean.getAccept() == null) {
|
if (EnumProgress.requested.equals(bean.getProgress())) {
|
||||||
acceptHtml = "<i class=\"fas fa-question framed framed-orange\"></i>";
|
acceptHtml = "<i class=\"fas fa-question framed framed-orange\"></i>";
|
||||||
} else if (bean.getAccept()) {
|
} else if (EnumProgress.approved.equals(bean.getProgress())) {
|
||||||
acceptHtml = "<i class=\"fas fa-check framed framed-green\"></i>";
|
acceptHtml = "<i class=\"fas fa-check framed framed-green\"></i>";
|
||||||
} else {
|
} else if (EnumProgress.rejected.equals(bean.getProgress())) {
|
||||||
acceptHtml = "<i class=\"fas fa-ban framed framed-red\"></i>";
|
acceptHtml = "<i class=\"fas fa-ban framed framed-red\"></i>";
|
||||||
|
} else if (EnumProgress.revoked.equals(bean.getProgress())) {
|
||||||
|
acceptHtml = "<i class=\"fas fa-skull framed framed-pink\"></i>";
|
||||||
}
|
}
|
||||||
buf.append(String.format("<tr><td>%s</td><td><a href=\"%s/%d\">%s</a></td><td>%s</td><td>%s</td></tr>",
|
buf.append(String.format("<tr><td>%s</td><td><a href=\"%s/%d\">%s</a></td><td>%s</td><td>%s</td></tr>",
|
||||||
acceptHtml, linkURL, bean.getPkPerson(), bean.getFullname(), bean.getCamp(), bean.getRolename()));
|
acceptHtml, linkURL, bean.getPkPerson(), bean.getFullname(), bean.getCamp(), bean.getRolename()));
|
||||||
|
@ -20,7 +20,7 @@ public class BookingBean implements Serializable, Comparable<BookingBean> {
|
|||||||
private String fullname;
|
private String fullname;
|
||||||
private String role;
|
private String role;
|
||||||
private LocalDateTime registered;
|
private LocalDateTime registered;
|
||||||
private Boolean accept;
|
private String progress;
|
||||||
|
|
||||||
public BookingBean(Integer pkPerson, LocalDate date, String camp) {
|
public BookingBean(Integer pkPerson, LocalDate date, String camp) {
|
||||||
this.pkPerson = pkPerson;
|
this.pkPerson = pkPerson;
|
||||||
@ -114,11 +114,17 @@ public class BookingBean implements Serializable, Comparable<BookingBean> {
|
|||||||
return pkPerson;
|
return pkPerson;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getAccept() {
|
/**
|
||||||
return accept;
|
* @return the progress
|
||||||
|
*/
|
||||||
|
public String getProgress() {
|
||||||
|
return progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAccept(Boolean accept) {
|
/**
|
||||||
this.accept = accept;
|
* @param progress the progress to set
|
||||||
|
*/
|
||||||
|
public void setProgress(String progress) {
|
||||||
|
this.progress = progress;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ public class PersonController extends CommonController {
|
|||||||
model.addAttribute("camps", personService.getCamps(username));
|
model.addAttribute("camps", personService.getCamps(username));
|
||||||
model.addAttribute("annotations", personService.getAnnotations(pk));
|
model.addAttribute("annotations", personService.getAnnotations(pk));
|
||||||
model.addAttribute("campPrice", personService.getCampPrice(pk));
|
model.addAttribute("campPrice", personService.getCampPrice(pk));
|
||||||
|
model.addAttribute("progresses", personService.getProgresses());
|
||||||
return "confirmation/person";
|
return "confirmation/person";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ public class PersonController extends CommonController {
|
|||||||
model.addAttribute("camps", personService.getCamps(username));
|
model.addAttribute("camps", personService.getCamps(username));
|
||||||
model.addAttribute("annotations", personService.getAnnotations(bean.getPk()));
|
model.addAttribute("annotations", personService.getAnnotations(bean.getPk()));
|
||||||
model.addAttribute("campPrice", personService.getCampPrice(bean.getPk()));
|
model.addAttribute("campPrice", personService.getCampPrice(bean.getPk()));
|
||||||
|
model.addAttribute("progresses", personService.getProgresses());
|
||||||
return "confirmation/person";
|
return "confirmation/person";
|
||||||
}
|
}
|
||||||
personService.updatePerson(bean, username);
|
personService.updatePerson(bean, username);
|
||||||
|
@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumCamprole;
|
||||||
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumModule;
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.db.jooq.tables.TProfile;
|
import de.jottyfan.camporganizer.db.jooq.tables.TProfile;
|
||||||
import de.jottyfan.camporganizer.db.jooq.tables.records.TCampRecord;
|
import de.jottyfan.camporganizer.db.jooq.tables.records.TCampRecord;
|
||||||
import de.jottyfan.camporganizer.db.jooq.tables.records.TPersonRecord;
|
import de.jottyfan.camporganizer.db.jooq.tables.records.TPersonRecord;
|
||||||
@ -118,7 +119,8 @@ public class PersonRepository {
|
|||||||
Record r = i.next();
|
Record r = i.next();
|
||||||
PersonBean bean = new PersonBean();
|
PersonBean bean = new PersonBean();
|
||||||
bean.setPk(pk);
|
bean.setPk(pk);
|
||||||
bean.setAccept(r.get(T_PERSON.ACCEPT));
|
EnumProgress progress = r.get(T_PERSON.PROGRESS);
|
||||||
|
bean.setProgress(progress == null ? null : progress.getLiteral());
|
||||||
bean.setBirthdate(r.get(T_PERSON.BIRTHDATE));
|
bean.setBirthdate(r.get(T_PERSON.BIRTHDATE));
|
||||||
bean.setCamprole(r.get(T_PERSON.CAMPROLE));
|
bean.setCamprole(r.get(T_PERSON.CAMPROLE));
|
||||||
bean.setCity(r.get(T_PERSON.CITY));
|
bean.setCity(r.get(T_PERSON.CITY));
|
||||||
@ -158,8 +160,8 @@ public class PersonRepository {
|
|||||||
SelectConditionStep<TPersonRecord> sql1 = jooq.selectFrom(T_PERSON).where(T_PERSON.PK.eq(bean.getPk()));
|
SelectConditionStep<TPersonRecord> sql1 = jooq.selectFrom(T_PERSON).where(T_PERSON.PK.eq(bean.getPk()));
|
||||||
LOGGER.debug(sql1.toString());
|
LOGGER.debug(sql1.toString());
|
||||||
TPersonRecord r = sql1.fetchOne();
|
TPersonRecord r = sql1.fetchOne();
|
||||||
lrw.putBoolean("acceptOld", r == null ? null : r.getAccept());
|
lrw.putBoolean("acceptOld", r == null ? null : EnumProgress.approved.equals(r.getProgress()));
|
||||||
lrw.putBoolean("acceptNew", bean.getAccept());
|
lrw.putBoolean("acceptNew", EnumProgress.approved.getLiteral().equals(bean.getProgress()));
|
||||||
Integer fkCamp = r == null ? null : r.getFkCamp();
|
Integer fkCamp = r == null ? null : r.getFkCamp();
|
||||||
String email = r.getEmail(); // use the old one, too
|
String email = r.getEmail(); // use the old one, too
|
||||||
lrw.putString("oldEmail", email);
|
lrw.putString("oldEmail", email);
|
||||||
@ -186,7 +188,7 @@ public class PersonRepository {
|
|||||||
.set(T_PERSON.PHONE, bean.getPhone())
|
.set(T_PERSON.PHONE, bean.getPhone())
|
||||||
.set(T_PERSON.EMAIL, bean.getEmail())
|
.set(T_PERSON.EMAIL, bean.getEmail())
|
||||||
.set(T_PERSON.COMMENT, bean.getComment())
|
.set(T_PERSON.COMMENT, bean.getComment())
|
||||||
.set(T_PERSON.ACCEPT, bean.getAccept())
|
.set(T_PERSON.PROGRESS, EnumProgress.lookupLiteral(bean.getProgress()))
|
||||||
.set(T_PERSON.CAMPROLE, bean.getCamprole())
|
.set(T_PERSON.CAMPROLE, bean.getCamprole())
|
||||||
.set(T_PERSON.FK_REGISTRATOR, fkRegistrator)
|
.set(T_PERSON.FK_REGISTRATOR, fkRegistrator)
|
||||||
.set(T_PERSON.REQUIRED_PRICE, bean.getRequiredPrice())
|
.set(T_PERSON.REQUIRED_PRICE, bean.getRequiredPrice())
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package de.jottyfan.camporganizer.module.confirmation.person;
|
package de.jottyfan.camporganizer.module.confirmation.person;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import de.jottyfan.camporganizer.db.jooq.enums.EnumProgress;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.person.model.CampBean;
|
import de.jottyfan.camporganizer.module.confirmation.person.model.CampBean;
|
||||||
import de.jottyfan.camporganizer.module.confirmation.person.model.PersonBean;
|
import de.jottyfan.camporganizer.module.confirmation.person.model.PersonBean;
|
||||||
|
|
||||||
@ -43,4 +45,12 @@ public class PersonService {
|
|||||||
public String getCampPrice(Integer pk) {
|
public String getCampPrice(Integer pk) {
|
||||||
return gateway.getCampprice(pk);
|
return gateway.getCampprice(pk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getProgresses() {
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
for (EnumProgress p : EnumProgress.values()) {
|
||||||
|
list.add(p.getLiteral());
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ public class PersonBean implements Serializable {
|
|||||||
private String email;
|
private String email;
|
||||||
private Integer fkCamp;
|
private Integer fkCamp;
|
||||||
private Integer fkProfile;
|
private Integer fkProfile;
|
||||||
private Boolean accept;
|
private String progress;
|
||||||
private LocalDateTime created;
|
private LocalDateTime created;
|
||||||
private EnumSex sex;
|
private EnumSex sex;
|
||||||
private Integer fkRegistrator;
|
private Integer fkRegistrator;
|
||||||
@ -194,20 +194,6 @@ public class PersonBean implements Serializable {
|
|||||||
this.fkProfile = fkProfile;
|
this.fkProfile = fkProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the accept
|
|
||||||
*/
|
|
||||||
public Boolean getAccept() {
|
|
||||||
return accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param accept the accept to set
|
|
||||||
*/
|
|
||||||
public void setAccept(Boolean accept) {
|
|
||||||
this.accept = accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the created
|
* @return the created
|
||||||
*/
|
*/
|
||||||
@ -291,4 +277,18 @@ public class PersonBean implements Serializable {
|
|||||||
public void setRequiredPrice(BigDecimal requiredPrice) {
|
public void setRequiredPrice(BigDecimal requiredPrice) {
|
||||||
this.requiredPrice = requiredPrice;
|
this.requiredPrice = requiredPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the progress
|
||||||
|
*/
|
||||||
|
public String getProgress() {
|
||||||
|
return progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param progress the progress to set
|
||||||
|
*/
|
||||||
|
public void setProgress(String progress) {
|
||||||
|
this.progress = progress;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,6 +356,12 @@ div {
|
|||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.framed-pink {
|
||||||
|
background: linear-gradient(to bottom right, #9141ac, #613583);
|
||||||
|
color: #9141ac;
|
||||||
|
border: 1px solid #613583;
|
||||||
|
}
|
||||||
|
|
||||||
.nomaxwidth {
|
.nomaxwidth {
|
||||||
max-width: none !important;
|
max-width: none !important;
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
<td th:text="${#temporals.format(booker.bookingDate, 'dd.MM.yyyy')}"></td>
|
<td th:text="${#temporals.format(booker.bookingDate, 'dd.MM.yyyy')}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bestätigt</th>
|
<th>Status</th>
|
||||||
<td th:text="${booker.accept == null ? '' : (booker.accept ? 'Ja' : 'abgelehnt')}"></td>
|
<td th:text="${booker.progress}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Freizeitpreis</th>
|
<th>Freizeitpreis</th>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<th>Freizeit</th>
|
<th>Freizeit</th>
|
||||||
<th>Rolle</th>
|
<th>Rolle</th>
|
||||||
<th>Kontostand</th>
|
<th>Kontostand</th>
|
||||||
<th>Angemeldet</th>
|
<th>Status</th>
|
||||||
<th>Bestätigt</th>
|
<th>Bestätigt</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td class="middled" th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
|
<td class="middled" th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
|
||||||
<td class="middled" th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
|
<td class="middled" th:text="${b.progress}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<th>Geschlecht</th>
|
<th>Geschlecht</th>
|
||||||
<th>Rolle</th>
|
<th>Rolle</th>
|
||||||
<th>Kontostand</th>
|
<th>Kontostand</th>
|
||||||
<th>Angemeldet</th>
|
<th>Status</th>
|
||||||
<th>Bestätigt</th>
|
<th>Bestätigt</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
<td th:text="${b.role}"></td>
|
<td th:text="${b.role}"></td>
|
||||||
<td><span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" th:if="${b.paid != null}"></span></td>
|
<td><span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" th:if="${b.paid != null}"></span></td>
|
||||||
<td th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
|
<td th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
|
||||||
<td th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
|
<td th:text="${b.progress}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<div th:text="${p.camprolle}"></div></td>
|
<div th:text="${p.camprolle}"></div></td>
|
||||||
<td><div th:text="${#temporals.format(p.birthDate, 'dd.MM.yyyy')}"></div>
|
<td><div th:text="${#temporals.format(p.birthDate, 'dd.MM.yyyy')}"></div>
|
||||||
<div th:text="${p.getAge(campStartDate)} + ' Jahre'"></div></td>
|
<div th:text="${p.getAge(campStartDate)} + ' Jahre'"></div></td>
|
||||||
<td th:text="${p.accept}"></td>
|
<td th:text="${p.progress}"></td>
|
||||||
<td th:text="${#temporals.format(p.created, 'dd.MM.yyyy HH:mm')}"></td>
|
<td th:text="${#temporals.format(p.created, 'dd.MM.yyyy HH:mm')}"></td>
|
||||||
<td><span th:text="${p.consentCatalogPhoto ? 'ja' : 'nein'}" th:if="${p.consentCatalogPhoto}"></span></td>
|
<td><span th:text="${p.consentCatalogPhoto ? 'ja' : 'nein'}" th:if="${p.consentCatalogPhoto}"></span></td>
|
||||||
<td th:text="${p.comment}"></td>
|
<td th:text="${p.comment}"></td>
|
||||||
|
@ -113,12 +113,9 @@
|
|||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<label for="inputAccept" class="col-sm-2 col-form-label">Status</label>
|
<label for="inputAccept" class="col-sm-2 col-form-label">Status</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="form-group">
|
<select th:field="*{progress}">
|
||||||
<input type="radio" class="btn-check" id="accept1" name="accept1" value="" th:field="*{accept}" /> <label class="btn btn-outline-primary" for="accept1"><i
|
<option th:each="p : ${progresses}" value="${p}"><th:block th:text="${p}"></th:block></option>
|
||||||
class="fas fa-question"></i> offen</label> <input type="radio" class="btn-check" id="accept2" name="accept2" value="true" th:field="*{accept}" /> <label class="btn btn-outline-success"
|
</select>
|
||||||
for="accept2"><i class="fas fa-check"></i> bestätigt</label> <input type="radio" class="btn-check" id="accept3" name="accept3" value="false" th:field="*{accept}" /> <label
|
|
||||||
class="btn btn-outline-danger" for="accept3"><i class="fas fa-ban"></i> abgelehnt</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
|
@ -32,10 +32,10 @@
|
|||||||
<div class="accordion" id="acc" th:if="${mybookings.size() > 0}" style="max-width: 800px; margin-left: auto; margin-right: auto">
|
<div class="accordion" id="acc" th:if="${mybookings.size() > 0}" style="max-width: 800px; margin-left: auto; margin-right: auto">
|
||||||
<div class="accordion-item" th:each="b : ${mybookings}">
|
<div class="accordion-item" th:each="b : ${mybookings}">
|
||||||
<h2 class="accordion-header" th:id="'acc-head-' + ${b.pk}" th:if="${b.pk}">
|
<h2 class="accordion-header" th:id="'acc-head-' + ${b.pk}" th:if="${b.pk}">
|
||||||
<button th:class="'accordion-button collapsed acc_' + ${b.isOver ? 'over' : b.accept}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}"
|
<button th:class="'accordion-button collapsed acc_' + ${b.isOver ? 'over' : b.progress == 'approved'}" type="button" data-bs-toggle="collapse" th:data-bs-target="'#acc-body-' + ${b.pk}"
|
||||||
aria-expanded="true" th:aria-controls="'#acc-body-' + ${b.pk}">
|
aria-expanded="true" th:aria-controls="'#acc-body-' + ${b.pk}">
|
||||||
<i class="fas fa-check framed framed-green" th:if="${b.accept}"></i> <i class="fas fa-ban framed framed-red" th:if="${b.accept} == false"></i> <i
|
<i class="fas fa-check framed framed-green" th:if="${b.progress} == 'approved'"></i> <i class="fas fa-ban framed framed-red" th:if="${b.progress} == 'rejected'"></i> <i
|
||||||
class="fas fa-question framed framed-orange" th:if="${b.accept} == null"></i>
|
class="fas fa-question framed framed-orange" th:if="${b.progress} == 'requested'"></i>
|
||||||
<span th:text="${b.forename + ' ' + b.surname + ' für ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" class="headlinefont"></span>
|
<span th:text="${b.forename + ' ' + b.surname + ' für ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" class="headlinefont"></span>
|
||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card" th:if="${b.accept}">
|
<div class="card" th:if="${b.progress} == 'approved'">
|
||||||
<div class="card-header">Dokumente</div>
|
<div class="card-header">Dokumente</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -150,8 +150,8 @@
|
|||||||
<div class="alert alert-primary" th:if="${b.created != null}">
|
<div class="alert alert-primary" th:if="${b.created != null}">
|
||||||
angemeldet am <span th:text="${#temporals.format(b.created, 'dd.MM.yyyy')}"></span> von <span th:text="${b.subscriber}"></span>
|
angemeldet am <span th:text="${#temporals.format(b.created, 'dd.MM.yyyy')}"></span> von <span th:text="${b.subscriber}"></span>
|
||||||
</div>
|
</div>
|
||||||
<div th:class="'alert ' + ${b.accept ? 'alert-success' : 'alert-danger'}" th:if="${b.accept != null}">
|
<div th:class="'alert ' + ${b.progress} == 'approved' ? 'alert-success' : 'alert-danger'}" th:if="${b.progress} != 'requested'}">
|
||||||
<span th:text="${b.accept ? 'bestätigt' : 'abgelehnt'}"></span> von <span th:text="${b.registrator}"></span>
|
<span th:text="${b.progress} == 'approved'">bestätigt</span><span th:text="${b.progress} == 'rejected'">abgelehnt</span> von <span th:text="${b.registrator}"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-warning" th:if="${b.isOver}">Die Freizeit ist bereits vorbei.</div>
|
<div class="alert alert-warning" th:if="${b.isOver}">Die Freizeit ist bereits vorbei.</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security" data-bs-theme="light">
|
||||||
<head>
|
<head>
|
||||||
<title>Camp Organizer 2</title>
|
<title>Camp Organizer 2</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/bootstrap/5.3.2/css/bootstrap.min.css} " />
|
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/bootstrap/5.3.3/css/bootstrap.min.css} " />
|
||||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/font-awesome/6.5.1/css/all.min.css} " />
|
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/font-awesome/6.5.2/css/all.min.css} " />
|
||||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/datatables/1.13.5/css/jquery.dataTables.min.css}" />
|
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/datatables/1.13.5/css/jquery.dataTables.min.css}" />
|
||||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/select2/4.0.13/css/select2.min.css}" />
|
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/select2/4.0.13/css/select2.min.css}" />
|
||||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/css/style.css}" />
|
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/css/style.css}" />
|
||||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/css/select2-bootstrap-5-theme.min.css}" />
|
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/css/select2-bootstrap-5-theme.min.css}" />
|
||||||
<script th:src="@{/webjars/jquery/3.7.1/jquery.min.js}"></script>
|
<script th:src="@{/webjars/jquery/3.7.1/jquery.min.js}"></script>
|
||||||
<script th:src="@{/webjars/bootstrap/5.3.2/js/bootstrap.bundle.min.js}"></script>
|
<script th:src="@{/webjars/bootstrap/5.3.3/js/bootstrap.bundle.min.js}"></script>
|
||||||
<script th:src="@{/webjars/datatables/1.13.5/js/jquery.dataTables.min.js}"></script>
|
<script th:src="@{/webjars/datatables/1.13.5/js/jquery.dataTables.min.js}"></script>
|
||||||
<script th:src="@{/webjars/select2/4.0.13/js/select2.full.min.js}"></script>
|
<script th:src="@{/webjars/select2/4.0.13/js/select2.full.min.js}"></script>
|
||||||
<script th:src="@{/js/dataTables.de.js}"></script>
|
<script th:src="@{/js/dataTables.de.js}"></script>
|
||||||
|
Reference in New Issue
Block a user