Compare commits
3 Commits
b087de84c4
...
96d9ff5db1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96d9ff5db1 | ||
|
|
0113367d05 | ||
|
|
fb6bffd7ee |
@@ -241,6 +241,35 @@ class TranscriptionServiceTest {
|
|||||||
.containsExactly(mention);
|
.containsExactly(mention);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void updateBlock_clearsPriorMentions_beforeApplyingDto() {
|
||||||
|
UUID docId = UUID.randomUUID();
|
||||||
|
UUID blockId = UUID.randomUUID();
|
||||||
|
|
||||||
|
PersonMention prior = new PersonMention(UUID.randomUUID(), "Heinrich");
|
||||||
|
PersonMention incoming = new PersonMention(UUID.randomUUID(), "Auguste");
|
||||||
|
|
||||||
|
TranscriptionBlock block = TranscriptionBlock.builder()
|
||||||
|
.id(blockId).documentId(docId).text("old").build();
|
||||||
|
block.getMentionedPersons().add(prior);
|
||||||
|
|
||||||
|
when(blockRepository.findByIdAndDocumentId(blockId, docId)).thenReturn(Optional.of(block));
|
||||||
|
when(blockRepository.save(any())).thenAnswer(inv -> inv.getArgument(0));
|
||||||
|
when(documentService.getDocumentById(any())).thenReturn(
|
||||||
|
Document.builder().scriptType(ScriptType.TYPEWRITER).build());
|
||||||
|
|
||||||
|
UpdateTranscriptionBlockDTO dto = UpdateTranscriptionBlockDTO.builder()
|
||||||
|
.text("@Auguste text")
|
||||||
|
.mentionedPersons(List.of(incoming))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
TranscriptionBlock result = transcriptionService.updateBlock(docId, blockId, dto, UUID.randomUUID());
|
||||||
|
|
||||||
|
assertThat(result.getMentionedPersons())
|
||||||
|
.containsExactly(incoming)
|
||||||
|
.doesNotContain(prior);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void updateBlock_triggersTraining_whenKurrentSenderPresent() {
|
void updateBlock_triggersTraining_whenKurrentSenderPresent() {
|
||||||
UUID docId = UUID.randomUUID();
|
UUID docId = UUID.randomUUID();
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ const showMaidenName = $derived(
|
|||||||
<div class="chips" data-testid="person-hover-card-chips">
|
<div class="chips" data-testid="person-hover-card-chips">
|
||||||
{#each familyChips as chip (chip.id)}
|
{#each familyChips as chip (chip.id)}
|
||||||
<span class="chip">
|
<span class="chip">
|
||||||
<span class="chip-type">{chipLabel(chip, personId)}</span>
|
<span class="chip-type">{chipLabel(chip, personId)}:</span>
|
||||||
{otherName(chip, personId)}
|
{otherName(chip, personId)}
|
||||||
</span>
|
</span>
|
||||||
{/each}
|
{/each}
|
||||||
@@ -261,10 +261,6 @@ const showMaidenName = $derived(
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chip-type::after {
|
|
||||||
content: ':';
|
|
||||||
}
|
|
||||||
|
|
||||||
.notes {
|
.notes {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: var(--c-ink-2);
|
color: var(--c-ink-2);
|
||||||
|
|||||||
@@ -155,11 +155,7 @@ async function handleMentionEnter(event: Event) {
|
|||||||
function handleMentionLeave(event: Event) {
|
function handleMentionLeave(event: Event) {
|
||||||
const link = event.target as HTMLAnchorElement;
|
const link = event.target as HTMLAnchorElement;
|
||||||
link.removeAttribute('aria-describedby');
|
link.removeAttribute('aria-describedby');
|
||||||
if (event.type === 'mouseleave') {
|
scheduleCardClose();
|
||||||
scheduleCardClose();
|
|
||||||
} else {
|
|
||||||
activeCard = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user