feat: dedicated /documents search & browse page #282
@@ -142,7 +142,8 @@ public class TranscriptionService {
|
||||
if (!text.equals(previousText)) {
|
||||
Optional<DocumentAnnotation> annotation = annotationRepository.findById(block.getAnnotationId());
|
||||
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);
|
||||
|
||||
@@ -487,6 +487,7 @@ class TranscriptionServiceTest {
|
||||
org.mockito.ArgumentMatchers.eq(docId),
|
||||
payloadCaptor.capture());
|
||||
assertThat(payloadCaptor.getValue()).containsEntry("pageNumber", 3);
|
||||
assertThat(payloadCaptor.getValue()).containsEntry("blockId", blockId.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user