feat(dashboard): redesign home as action-led family archive hub (#271) #278
@@ -142,7 +142,8 @@ public class TranscriptionService {
|
|||||||
if (!text.equals(previousText)) {
|
if (!text.equals(previousText)) {
|
||||||
Optional<DocumentAnnotation> annotation = annotationRepository.findById(block.getAnnotationId());
|
Optional<DocumentAnnotation> annotation = annotationRepository.findById(block.getAnnotationId());
|
||||||
int pageNumber = annotation.map(DocumentAnnotation::getPageNumber).orElse(0);
|
int pageNumber = annotation.map(DocumentAnnotation::getPageNumber).orElse(0);
|
||||||
auditService.logAfterCommit(AuditKind.TEXT_SAVED, userId, documentId, Map.of("pageNumber", pageNumber));
|
auditService.logAfterCommit(AuditKind.TEXT_SAVED, userId, documentId,
|
||||||
|
Map.of("pageNumber", pageNumber, "blockId", saved.getId().toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Document doc = documentService.getDocumentById(documentId);
|
Document doc = documentService.getDocumentById(documentId);
|
||||||
|
|||||||
@@ -487,6 +487,7 @@ class TranscriptionServiceTest {
|
|||||||
org.mockito.ArgumentMatchers.eq(docId),
|
org.mockito.ArgumentMatchers.eq(docId),
|
||||||
payloadCaptor.capture());
|
payloadCaptor.capture());
|
||||||
assertThat(payloadCaptor.getValue()).containsEntry("pageNumber", 3);
|
assertThat(payloadCaptor.getValue()).containsEntry("pageNumber", 3);
|
||||||
|
assertThat(payloadCaptor.getValue()).containsEntry("blockId", blockId.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user