eye candy
This commit is contained in:
parent
cde060559e
commit
be5b28e120
@ -13,7 +13,7 @@ import de.jottyfan.camporganizer.db.jooq.enums.EnumSex;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BookingBean implements Serializable {
|
public class BookingBean implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 2L;
|
||||||
|
|
||||||
private Integer pk;
|
private Integer pk;
|
||||||
private String forename;
|
private String forename;
|
||||||
@ -38,6 +38,7 @@ public class BookingBean implements Serializable {
|
|||||||
private String url;
|
private String url;
|
||||||
private Boolean isOver;
|
private Boolean isOver;
|
||||||
private String campName;
|
private String campName;
|
||||||
|
private String registrator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the forename
|
* @return the forename
|
||||||
@ -349,4 +350,12 @@ public class BookingBean implements Serializable {
|
|||||||
this.campName = campName;
|
this.campName = campName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRegistrator() {
|
||||||
|
return registrator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrator(String registrator) {
|
||||||
|
this.registrator = registrator;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,12 @@ import org.jooq.Condition;
|
|||||||
import org.jooq.DSLContext;
|
import org.jooq.DSLContext;
|
||||||
import org.jooq.Record;
|
import org.jooq.Record;
|
||||||
import org.jooq.SelectConditionStep;
|
import org.jooq.SelectConditionStep;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,6 +42,7 @@ public class IndexGateway {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<BookingBean> getAllBookings(String username) {
|
public List<BookingBean> getAllBookings(String username) {
|
||||||
|
TProfile REGISTRATOR = TProfile.T_PROFILE.as("registrator");
|
||||||
SelectConditionStep<Record> sql = jooq
|
SelectConditionStep<Record> sql = jooq
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
.select(T_PERSON.PK,
|
.select(T_PERSON.PK,
|
||||||
@ -56,6 +59,8 @@ public class IndexGateway {
|
|||||||
T_PERSON.CREATED,
|
T_PERSON.CREATED,
|
||||||
T_PERSON.EMAIL,
|
T_PERSON.EMAIL,
|
||||||
T_PERSON.SEX,
|
T_PERSON.SEX,
|
||||||
|
REGISTRATOR.FORENAME,
|
||||||
|
REGISTRATOR.SURNAME,
|
||||||
V_CAMP.NAME,
|
V_CAMP.NAME,
|
||||||
V_CAMP.LOCATION_NAME,
|
V_CAMP.LOCATION_NAME,
|
||||||
V_CAMP.PRICE,
|
V_CAMP.PRICE,
|
||||||
@ -67,6 +72,7 @@ public class IndexGateway {
|
|||||||
V_CAMP.IS_OVER)
|
V_CAMP.IS_OVER)
|
||||||
.from(T_PROFILE)
|
.from(T_PROFILE)
|
||||||
.leftJoin(T_PERSON).on(T_PERSON.FK_PROFILE.eq(T_PROFILE.PK))
|
.leftJoin(T_PERSON).on(T_PERSON.FK_PROFILE.eq(T_PROFILE.PK))
|
||||||
|
.leftJoin(REGISTRATOR).on(REGISTRATOR.PK.eq(T_PERSON.FK_REGISTRATOR))
|
||||||
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
.leftJoin(V_CAMP).on(V_CAMP.PK.eq(T_PERSON.FK_CAMP))
|
||||||
.where(T_PROFILE.USERNAME.eq(username));
|
.where(T_PROFILE.USERNAME.eq(username));
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
@ -97,6 +103,14 @@ public class IndexGateway {
|
|||||||
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));
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
String forename = r.get(REGISTRATOR.FORENAME);
|
||||||
|
String surname = r.get(REGISTRATOR.SURNAME);
|
||||||
|
if (forename != null) {
|
||||||
|
buf.append(forename).append(" ");
|
||||||
|
}
|
||||||
|
buf.append(surname != null ? surname : "");
|
||||||
|
bean.setRegistrator(buf.toString());
|
||||||
list.add(bean);
|
list.add(bean);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
@ -167,6 +167,10 @@ body {
|
|||||||
background-color: rgba(255, 255, 255, 0.8) !important;
|
background-color: rgba(255, 255, 255, 0.8) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nomaxwidth {
|
||||||
|
max-width: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.mytoggle_collapsed {
|
.mytoggle_collapsed {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -14,61 +14,73 @@
|
|||||||
</header>
|
</header>
|
||||||
<content>
|
<content>
|
||||||
<div class="mainpage">
|
<div class="mainpage">
|
||||||
<div class="card usercard" th:each="b : ${mybookings}">
|
<div class="container nomaxwidth">
|
||||||
<div class="card-header">
|
<div class="row">
|
||||||
<span th:text="${b.forename + ' ' + b.surname + ' an ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" style="font-weight: bolder"></span> in <a th:href="${b.url}"
|
<div class="col-xs-6 col-sm-4 col-lg-3">
|
||||||
target="_blank" th:text="${b.locationName}"></a><button class="btn btn-dropdown" style="right: 2px; top: 2px; position: absolute" th:onclick="$('#body_' + [[${b.pk}]]).toggle()"><i class="fas fa-caret-down"></i></button>
|
<div class="card usercard" th:each="b : ${mybookings}">
|
||||||
</div>
|
<div class="card-header">
|
||||||
<div th:id="${'body_' + b.pk}" class="card-body">
|
<span th:text="${b.forename + ' ' + b.surname + ' an ' + b.campName + ' ' + #numbers.formatInteger(b.year, 4)}" style="font-weight: bolder"></span> in <a th:href="${b.url}"
|
||||||
<div class="container">
|
target="_blank" th:text="${b.locationName}"></a>
|
||||||
<div class="row">
|
<button class="btn btn-dropdown" style="right: 2px; top: 2px; position: absolute" th:onclick="$('#body_' + [[${b.pk}]]).toggle()">
|
||||||
<div class="col-sm-4">Zeit:</div>
|
<i class="fas fa-caret-down"></i>
|
||||||
<div class="col-sm-8">
|
</button>
|
||||||
<span th:text="${#temporals.format(b.arrive, 'dd.MM.') + ' - ' + #temporals.format(b.depart, 'dd.MM.yyyy')}" th:if="${b.arrive != null and b.depart != null}"></span>
|
</div>
|
||||||
|
<div th:id="${'body_' + b.pk}" class="card-body" style="display: none">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">Zeit:</div>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<span th:text="${#temporals.format(b.arrive, 'dd.MM.') + ' - ' + #temporals.format(b.depart, 'dd.MM.yyyy')}" th:if="${b.arrive != null and b.depart != null}"></span>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">Preis:</div>
|
||||||
|
<div class="col-sm-8" th:text="${b.price} + ' €'"></div>
|
||||||
|
<div class="col-sm-4">Ferien:</div>
|
||||||
|
<div class="col-sm-8" th:text="${b.countries}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">Rolle:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.camprole}"></span>
|
||||||
|
<div class="col-sm-4">ID:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.pk}"></span>
|
||||||
|
<div class="col-sm-4">Vorname:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.forename}"></span>
|
||||||
|
<div class="col-sm-4">Nachname:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.surname}"></span>
|
||||||
|
<div class="col-sm-4">Straße:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.street}"></span>
|
||||||
|
<div class="col-sm-4">PLZ:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.zip}"></span>
|
||||||
|
<div class="col-sm-4">Ort:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.city}"></span>
|
||||||
|
<div class="col-sm-4">Telefon:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.phone}"></span>
|
||||||
|
<div class="col-sm-4">Geburtstag:</div>
|
||||||
|
<span class="col-sm-8" th:text="${#temporals.format(b.birthdate, 'dd.MM.yyyy')}"></span>
|
||||||
|
<div class="col-sm-4">E-Mail:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.email}"></span>
|
||||||
|
<div class="col-sm-4">Geschlecht:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.sex}"></span>
|
||||||
|
<div class="col-sm-4">Foto-Einverständnis:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.consentCatalogPhoto}"></span>
|
||||||
|
<div class="col-sm-4">Kommentar:</div>
|
||||||
|
<span class="col-sm-8" th:text="${b.comment}"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<div th:if="${b.created != null}">
|
||||||
|
angemeldet am <span th:text="${#temporals.format(b.created, 'dd.MM.yyyy')}"></span>
|
||||||
|
</div>
|
||||||
|
<div th:if="${!#strings.isEmpty(b.registrator)}">
|
||||||
|
bearbeitet von <span th:text="${b.registrator}"></span>
|
||||||
|
</div>
|
||||||
|
<span th:if="${b.isOver}">Die Freizeit ist bereits vorbei.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">Preis:</div>
|
|
||||||
<div class="col-sm-8" th:text="${b.price}"></div>
|
|
||||||
<div class="col-sm-4">Ferien:</div>
|
|
||||||
<div class="col-sm-8" th:text="${b.countries}"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-4">Rolle:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.camprole}"></span>
|
|
||||||
<div class="col-sm-4">ID:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.pk}"></span>
|
|
||||||
<div class="col-sm-4">Vorname:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.forename}"></span>
|
|
||||||
<div class="col-sm-4">Nachname:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.surname}"></span>
|
|
||||||
<div class="col-sm-4">Straße:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.street}"></span>
|
|
||||||
<div class="col-sm-4">PLZ:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.zip}"></span>
|
|
||||||
<div class="col-sm-4">Ort:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.city}"></span>
|
|
||||||
<div class="col-sm-4">Telefon:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.phone}"></span>
|
|
||||||
<div class="col-sm-4">Geburtstag:</div>
|
|
||||||
<span class="col-sm-8" th:text="${#temporals.format(b.birthdate, 'dd.MM.yyyy')}"></span>
|
|
||||||
<div class="col-sm-4">E-Mail:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.email}"></span>
|
|
||||||
<div class="col-sm-4">Geschlecht:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.sex}"></span>
|
|
||||||
<div class="col-sm-4">Foto-Einverständnis:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.consentCatalogPhoto}"></span>
|
|
||||||
<div class="col-sm-4">Kommentar:</div>
|
|
||||||
<span class="col-sm-8" th:text="${b.comment}"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-footer">
|
|
||||||
<div>
|
|
||||||
angemeldet am <span th:text="${#temporals.format(b.created, 'dd.MM.yyyy')}" th:if="${b.created != null}"></span>
|
|
||||||
</div>
|
|
||||||
<span th:if="${b.isOver}">Die Freizeit ist bereits vorbei.</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user