summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2025-09-03 22:03:52 +0200
committerPaul-Christian Volkmer2025-09-03 22:03:52 +0200
commit10b5bedac33b3d0f8b970e818c444e86e132da21 (patch)
tree884f08e100643db036125947426061b662cfd5aa /src
parent96f22a67447506c14304d33b8c16bfba4c3abed2 (diff)
parent6dfec5c341862cdb5bbe8246937c9bfc8bd5a2f1 (diff)
Merge branch '0.11.x'
# Conflicts: # build.gradle.kts
Diffstat (limited to 'src')
-rw-r--r--src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt24
-rw-r--r--src/main/resources/templates/index.html1
2 files changed, 25 insertions, 0 deletions
diff --git a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt
index 829f9a1..628112c 100644
--- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt
+++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt
@@ -282,6 +282,30 @@ class HomeControllerTest {
assertThat(page.querySelectorAll("tbody tr")).isEmpty()
assertThat(page.querySelectorAll("div.notification.info")).hasSize(1)
}
+
+ @Test
+ @WithMockUser(username = "admin", roles = ["ADMIN"])
+ fun testShouldShowNoConsentStatusBadge() {
+ whenever(requestService.findRequestByPatientId(anyValueClass(), any<Pageable>())).thenReturn(
+ PageImpl(
+ listOf(
+ Request(
+ 1L,
+ randomRequestId(),
+ PatientPseudonym("PSEUDO1"),
+ PatientId("PATIENT1"),
+ Fingerprint("ashdkasdh"),
+ RequestType.MTB_FILE,
+ RequestStatus.NO_CONSENT
+ )
+ )
+ )
+ )
+
+ val page = webClient.getPage<HtmlPage>("http://localhost/patient/PSEUDO1")
+ assertThat(page.querySelectorAll("tbody tr")).hasSize(1)
+ assertThat(page.querySelectorAll("tbody tr > td > small").first().textContent).isEqualTo("NO_CONSENT")
+ }
}
}
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index 4db6518..a419dda 100644
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -55,6 +55,7 @@
<td th:if="${request.status.value == 'unknown' and not request.isPendingUnknown()}" class="bg-gray"><small>[[ ${request.status} ]]</small></td>
<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="not ${request.report}">[[ ${request.uuid} ]]</td>
<td th:if="${request.report}">