summaryrefslogtreecommitdiff
path: root/src/main/resources/templates
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2026-01-06 16:34:12 +0100
committerGitHub2026-01-06 15:34:12 +0000
commit7be91444a867774362eb5b57bdd246fb50189e7d (patch)
tree6a325575bf19e4016ead259a92803b110071eb4f /src/main/resources/templates
parent2a106a49d91699d0699af1134c41a43b942b85e8 (diff)
feat: block further initial submissions (#232)
Diffstat (limited to 'src/main/resources/templates')
-rw-r--r--src/main/resources/templates/fragments.html14
-rw-r--r--src/main/resources/templates/index.html11
2 files changed, 24 insertions, 1 deletions
diff --git a/src/main/resources/templates/fragments.html b/src/main/resources/templates/fragments.html
index f3d95c9..8ecd507 100644
--- a/src/main/resources/templates/fragments.html
+++ b/src/main/resources/templates/fragments.html
@@ -35,6 +35,20 @@
</ul>
</nav>
</div>
+ <th:block th:fragment="accept-initial" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
+ <button class="btn" hx-swap="outerHTML" th:hx-delete="@{/submission/{requestId}/accepted(requestId=${request.uuid})}" th:if="${
+ request.submissionType.value == 'initial'
+ and (request.status.value == 'success' or request.status.value == 'warning')
+ and request.submissionAccepted == true}" title="Keine Meldebestätigung - blockieren">
+ đź”’
+ </button>
+ <button class="btn" hx-swap="outerHTML" th:hx-put="@{/submission/{requestId}/accepted(requestId=${request.uuid})}" th:if="${
+ request.submissionType.value == 'initial'
+ and (request.status.value == 'success' or request.status.value == 'warning')
+ and request.submissionAccepted == false}" title="Meldebestätigung vorhanden - nicht weiter blockieren">
+ 🔓
+ </button>
+ </th:block>
<footer th:fragment="footer">
<div class="container">
<div>
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index 5021bc4..a732fa2 100644
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -42,6 +42,7 @@
<tr>
<th>Status</th>
<th>Typ</th>
+ <th sec:authorize="hasRole('USER') or hasRole('ADMIN')" th:if="${postInitialSubmissionBlock}">Aktion</th>
<th>ID</th>
<th>Datum</th>
<th>Patienten-ID</th>
@@ -56,7 +57,14 @@
<td th:if="${request.status.value == 'unknown' and request.isPendingUnknown()}" class="bg-yellow"><small>⏰ [[ ${request.status} ]] ⏰</small></td>
<td th:if="${request.status.value == 'duplication'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
<td th:if="${request.status.value == 'no-consent'}" class="bg-blue"><small>[[ ${request.status} ]]</small></td>
- <td th:style="${request.type.value == 'delete'} ? 'color: red;'"><small>[[ ${request.type} ]]</small></td>
+ <td th:if="${request.status.value == 'blocked-initial'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
+ <td th:style="${request.type.value == 'delete'} ? 'color: red;'">
+ <small>
+ [[ ${request.type} ]]
+ <th:block th:if="${request.submissionType.value != 'unknown'}">([[ ${request.submissionType} ]])</th:block>
+ </small>
+ </td>
+ <td th:insert="~{fragments :: accept-initial}" sec:authorize="hasRole('USER') or hasRole('ADMIN')" th:if="${postInitialSubmissionBlock}"></td>
<td th:if="not ${request.report}">[[ ${request.uuid} ]]</td>
<td th:if="${request.report}">
<a th:href="@{/report/{id}(id=${request.uuid})}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">[[ ${request.uuid} ]]</a>
@@ -78,6 +86,7 @@
</main>
<footer th:replace="~{fragments.html :: footer}"></footer>
<script th:src="@{/scripts.js}"></script>
+ <script th:src="@{/webjars/htmx.org/dist/htmx.min.js}"></script>
<script>
window.addEventListener('load', () => {
let keyBindings = {