feat(ui): Korrespondenz redesign — compact strip, log cards, single-person mode #164

Merged
marcel merged 32 commits from feat/issue-162-korrespondenz-redesign into main 2026-03-30 21:38:23 +02:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 252881b8d1 - Show all commits

View File

@@ -24,10 +24,13 @@ public class PersonService {
private final PersonRepository personRepository;
public List<PersonSummaryDTO> findAll(String q) {
if (q != null && !q.isBlank()) {
return personRepository.searchWithDocumentCount(q);
if (q == null) {
return personRepository.findAllWithDocumentCount();
}
return personRepository.findAllWithDocumentCount();
if (q.isBlank()) {
return List.of();
}
return personRepository.searchWithDocumentCount(q.trim());
}
public Person getById(UUID id) {

View File

@@ -62,12 +62,9 @@ class PersonServiceTest {
}
@Test
void findAll_returnsAll_whenQueryIsBlank() {
List<PersonSummaryDTO> expected = List.of();
when(personRepository.findAllWithDocumentCount()).thenReturn(expected);
assertThat(personService.findAll(" ")).isEqualTo(expected);
verify(personRepository).findAllWithDocumentCount();
void findAll_returnsEmpty_whenQueryIsWhitespaceOnly() {
assertThat(personService.findAll(" ")).isEmpty();
verify(personRepository, never()).findAllWithDocumentCount();
verify(personRepository, never()).searchWithDocumentCount(any());
}