summaryrefslogtreecommitdiff
path: root/src/main/resources/templates/report.html
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2026-03-11 09:12:54 +0100
committerGitHub2026-03-11 09:12:54 +0100
commit22d21b1bccc75f0df1629b972d03ffbdf05e9192 (patch)
tree77d00a92d161330c6cad0249bdb6ae17cd0754d7 /src/main/resources/templates/report.html
parent0e66f249c2654619da615b85776f3e8e49f9f7d2 (diff)
refactor: use html fragment for request card (#261)
This also allows for fragment reload on pressing accept button.
Diffstat (limited to 'src/main/resources/templates/report.html')
-rw-r--r--src/main/resources/templates/report.html50
1 files changed, 2 insertions, 48 deletions
diff --git a/src/main/resources/templates/report.html b/src/main/resources/templates/report.html
index cd26672..a9d6893 100644
--- a/src/main/resources/templates/report.html
+++ b/src/main/resources/templates/report.html
@@ -11,54 +11,8 @@
<h1>Anfrage <span class="monospace">[[ ${request.uuid} ]]</span></h1>
- <div class="card">
- <div th:if="${request.status.value.contains('success')}" class="card-header bg-green">Erfolgreiche Übertragung</div>
- <div th:if="${request.status.value.contains('warning')}" class="card-header bg-yellow">Übertragung mit Warnungen</div>
- <div th:if="${request.status.value.contains('error')}" class="card-header bg-red">Übertragung mit Fehlern</div>
- <div th:if="${request.status.value == 'unknown' and not request.isPendingUnknown()}" class="card-header bg-gray">Unbekannter Status</div>
- <div th:if="${request.status.value == 'unknown' and request.isPendingUnknown()}" class="card-header bg-gray">⏰ Unbekannter Status ⏰</div>
- <div th:if="${request.status.value == 'duplication'}" class="card-header bg-gray">Gestoppt: Duplikation</div>
- <div th:if="${request.status.value == 'no-consent'}" class="card-header bg-blue">Gestoppt: Kein Consent</div>
- <div th:if="${request.status.value == 'blocked-initial'}" class="card-header bg-blue">Gestoppt: Noch keine Meldebestätigung für vorhergehende Meldung</div>
- <div class="card-sub-header" th:classappend="${request.type.value == 'delete' ? 'delete' : ''}">
- <div th:if="${request.type.value != 'delete'}">
- <span th:if="${request.submissionType.value == 'initial'}"><span>📨 Übertragung vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></span>
- <span th:if="${request.submissionType.value == 'addition'}"><span>🔄 Übertragung vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></span>
- <span th:if="${request.submissionType.value == 'unknown'}"><span>❓ Übertragung vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time></span>
- </div>
- <div th:if="${request.type.value == 'delete'}">
- <span>🗑 Löschanfrage vom </span><time th:datetime="${request.processedAt}">[[ ${request.processedAt} ]]</time>
- </div>
- <div th:insert="~{fragments :: accept-initial}" sec:authorize="hasRole('USER') or hasRole('ADMIN')" th:if="${postInitialSubmissionBlock}"></div>
- </div>
- <div class="card-content">
- <div>Request-ID</div>
- <div><span>[[ ${request.uuid} ]]</span></div>
- <div>Typ</div>
- <div th:style="${request.type.value == 'delete'} ? 'color: red;'">
- <span>
- [[ ${request.type} ]]
- <th:block th:if="${request.submissionType.value != 'unknown'}">([[ ${request.submissionType} ]])</th:block>
- </span>
- </div>
- <div sec:authorize="hasRole('USER') or hasRole('ADMIN')">Letzte Aktualisierung</div>
- <div sec:authorize="hasRole('USER') or hasRole('ADMIN')">
- <time th:if="${request.updatedAt}" th:datetime="${request.updatedAt}">[[ ${request.updatedAt} ]]</time>
- <span th:if="${request.updatedBy}"> durch [[ ${request.updatedBy} ]]</span>
- </div>
- <div sec:authorize="hasRole('USER') or hasRole('ADMIN')">Patienten-Pseudonym</div>
- <div class="patient-id" th:if="${patientPseudonym != null}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
- [[ ${request.patientPseudonym} ]]
- </div>
- <div class="patient-id" th:if="${patientPseudonym == null}" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
- <a th:href="@{/patient/{pid}(pid=${request.patientPseudonym})}">[[ ${request.patientPseudonym} ]]</a>
- </div>
- <div sec:authorize="hasRole('USER') or hasRole('ADMIN')">TAN</div>
- <div class="patient-id" sec:authorize="hasRole('USER') or hasRole('ADMIN')">
- [[ ${request.tan} ]]
- </div>
- </div>
- </div>
+ <th:block th:insert="~{fragments :: request}">
+ </th:block>
<h2 th:text="${request.report.description}"></h2>