1
0
mirror of https://github.com/pcvolkmer/mv64e-etl-processor synced 2025-09-13 09:02:50 +00:00

2 Commits

Author SHA1 Message Date
328bf019af chore: bump version 2025-09-03 22:17:48 +02:00
6dfec5c341 fix: add status badge for 'NO_CONSENT' (#149) 2025-09-03 21:18:28 +02:00
3 changed files with 27 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ plugins {
} }
group = "dev.dnpm" group = "dev.dnpm"
version = "0.11.0" version = "0.11.1"
var versions = mapOf( var versions = mapOf(
"mtb-dto" to "0.1.0-SNAPSHOT", "mtb-dto" to "0.1.0-SNAPSHOT",

View File

@@ -282,6 +282,30 @@ class HomeControllerTest {
assertThat(page.querySelectorAll("tbody tr")).isEmpty() assertThat(page.querySelectorAll("tbody tr")).isEmpty()
assertThat(page.querySelectorAll("div.notification.info")).hasSize(1) 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")
}
} }
} }

View File

@@ -54,6 +54,7 @@
<td th:if="${request.status.value.contains('error')}" class="bg-red"><small>[[ ${request.status} ]]</small></td> <td th:if="${request.status.value.contains('error')}" class="bg-red"><small>[[ ${request.status} ]]</small></td>
<td th:if="${request.status.value == 'unknown'}" class="bg-gray"><small>[[ ${request.status} ]]</small></td> <td th:if="${request.status.value == 'unknown'}" class="bg-gray"><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 == '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:style="${request.type.value == 'delete'} ? 'color: red;'"><small>[[ ${request.type} ]]</small></td>
<td th:if="not ${request.report}">[[ ${request.uuid} ]]</td> <td th:if="not ${request.report}">[[ ${request.uuid} ]]</td>
<td th:if="${request.report}"> <td th:if="${request.report}">
@@ -100,4 +101,4 @@
}); });
</script> </script>
</body> </body>
</html> </html>