fixed bug on entering themes without teachers
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'org.springframework.boot' version '3.5.0'
|
id 'org.springframework.boot' version '4.0.0'
|
||||||
id "io.spring.dependency-management" version "1.1.6"
|
id "io.spring.dependency-management" version "1.1.7"
|
||||||
id 'war'
|
id 'war'
|
||||||
id 'eclipse'
|
id 'eclipse'
|
||||||
id 'application'
|
id 'application'
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'de.jottyfan.bico'
|
group = 'de.jottyfan.bico'
|
||||||
version = '0.2.8'
|
version = '0.2.9'
|
||||||
|
|
||||||
description = """BibleClassOrganizer"""
|
description = """BibleClassOrganizer"""
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.jboss.logging.Logger;
|
|||||||
import org.jooq.DSLContext;
|
import org.jooq.DSLContext;
|
||||||
import org.jooq.DeleteConditionStep;
|
import org.jooq.DeleteConditionStep;
|
||||||
import org.jooq.InsertOnDuplicateStep;
|
import org.jooq.InsertOnDuplicateStep;
|
||||||
|
import org.jooq.InsertResultStep;
|
||||||
import org.jooq.Record1;
|
import org.jooq.Record1;
|
||||||
import org.jooq.Record10;
|
import org.jooq.Record10;
|
||||||
import org.jooq.Record4;
|
import org.jooq.Record4;
|
||||||
@@ -127,7 +128,19 @@ public class ThemeRepository {
|
|||||||
.where(T_LESSON.FK_SLOT.eq(slotId));
|
.where(T_LESSON.FK_SLOT.eq(slotId));
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
LOGGER.trace(sql);
|
LOGGER.trace(sql);
|
||||||
return sql.fetchOne();
|
TLessonRecord found = sql.fetchOne();
|
||||||
|
if (found == null) {
|
||||||
|
InsertResultStep<TLessonRecord> sqlI = jooq
|
||||||
|
// @formatter:off
|
||||||
|
.insertInto(T_LESSON,
|
||||||
|
T_LESSON.FK_SLOT)
|
||||||
|
.values(slotId)
|
||||||
|
.returning();
|
||||||
|
// @formatter:on
|
||||||
|
LOGGER.trace(sqlI);
|
||||||
|
found = sqlI.fetchOne();
|
||||||
|
}
|
||||||
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateLesson(TLessonRecord bean) {
|
public void updateLesson(TLessonRecord bean) {
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ body {
|
|||||||
|
|
||||||
.tagju {
|
.tagju {
|
||||||
background: linear-gradient(to bottom, lime, white);
|
background: linear-gradient(to bottom, lime, white);
|
||||||
|
left: -18px;
|
||||||
|
top: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-bs-theme=dark] .tagju {
|
[data-bs-theme=dark] .tagju {
|
||||||
|
|||||||
@@ -4,16 +4,21 @@
|
|||||||
<th:block layout:fragment="content">
|
<th:block layout:fragment="content">
|
||||||
<div class="borderdist">
|
<div class="borderdist">
|
||||||
<div class="container" th:if="${hasDateRole || hasBUrole}">
|
<div class="container" th:if="${hasDateRole || hasBUrole}">
|
||||||
<div class="row">
|
<div class="row d-flex justify-content-between">
|
||||||
<div class="col-md-6 col-sm-12"><a th:href="@{/next(groupname='bibleclass')}" class="btn btn-outline-secondary">nur Bibelunterricht</a></div>
|
<div class="col-auto">
|
||||||
<div class="col-md-6 col-sm-12"><a th:href="@{/next(groupname='youthgroup')}" class="btn btn-outline-secondary">nur Jungschar</a></div>
|
<a th:href="@{/next(groupname='bibleclass')}" class="btn btn-outline-secondary">nur Bibelunterricht</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<a th:href="@{/next(groupname='youthgroup')}" class="btn btn-outline-secondary">nur Jungschar</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row g-2">
|
||||||
<div class="col-sm-6 col-md-4 col-lg-2 card p-2 m-1" th:each="s : ${list}">
|
<div class="col-sm-6 col-md-4 col-lg-2 card p-2" th:each="s : ${list}">
|
||||||
<div class="tag tagbu" th:if="${s.isBibleclass}">Bibelunt.</div>
|
<div class="tag tagbu" th:if="${s.isBibleclass}">Bibelunt.</div>
|
||||||
<div class="tag tagju" th:if="${s.isYouthgroup}">Jungsch.</div>
|
<div class="tag tagju" th:if="${s.isYouthgroup}">Jungschar</div>
|
||||||
<div class="tagfollow" th:text="${#temporals.format(s.day, 'dd.MM.yyyy')}"></div>
|
<div class="tagfollow" th:text="${#temporals.format(s.day, 'dd.MM.yyyy')}"></div>
|
||||||
<div th:class="'tagfollow' + ${currentUserName == #strings.toLowerCase(s.fullname) ? ' tagemphasize' : ''}" th:text="${s.fullname}"></div>
|
<div th:class="'tagfollow' + ${currentUserName == #strings.toLowerCase(s.fullname) ? ' tagemphasize' : ''}" th:text="${s.fullname}" th:if="${s.fullname}"></div>
|
||||||
|
<div class="tagfollow" th:unless="${s.fullname}" style="min-height: 1.5em"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-info" th:if="${list.size() < 1}">Es gibt noch keine neuen Termine oder Zusagen für Termine.</div>
|
<div class="alert alert-info" th:if="${list.size() < 1}">Es gibt noch keine neuen Termine oder Zusagen für Termine.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
<form th:action="@{/theme/update?slotId={id}(id=${slotId})}" method="post" th:object="${lesson}">
|
<form th:action="@{/theme/update?slotId={id}(id=${slotId})}" method="post" th:object="${lesson}" th:if="${lesson}">
|
||||||
<input type="hidden" th:field="*{pkLesson}" />
|
<input type="hidden" th:field="*{pkLesson}" />
|
||||||
<div class="row g-2 blockframe">
|
<div class="row g-2 blockframe">
|
||||||
<div class="col-sm-3">Anmerkungen zur Stunde</div>
|
<div class="col-sm-3">Anmerkungen zur Stunde</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user