diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts index 937093b20..b3914d265 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts @@ -46,7 +46,7 @@ export class DocumentInfoDialogComponent extends BaseDialogComponent implements ...this.form.getRawValue(), }; await firstValueFrom(this._fileAttributesService.setFileAttributes({ attributeIdToValue }, this.data.dossierId, this.data.fileId)); - this._filesService.reload(this.data.dossierId, this.data.fileId); + await firstValueFrom(this._filesService.reload(this.data.dossierId, this.data.fileId)); this._dialogRef.close(true); } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts index 2490f78cd..04742c1b4 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts @@ -108,7 +108,7 @@ export class AnnotationActionsComponent implements OnChanges { } acceptResize($event: MouseEvent) { - this.annotationActionsService.acceptResize($event, this.viewer, this.annotations[0], this.annotationsChanged); + return this.annotationActionsService.acceptResize($event, this.viewer, this.annotations[0], this.annotationsChanged); } cancelResize($event: MouseEvent) { diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts index 6fdff7a0d..8ed61a283 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts @@ -410,9 +410,12 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this._changeDetectorRef.markForCheck(); } - async annotationsChangedByReviewAction(annotation: AnnotationWrapper) { + async annotationsChangedByReviewAction(annotation?: AnnotationWrapper) { this.multiSelectService.deactivate(); - await firstValueFrom(this._filesService.reload(this.dossierId, this.fileId)); + const fileReloaded = await firstValueFrom(this._filesService.reload(this.dossierId, this.fileId)); + if (!fileReloaded) { + await this._reloadAnnotationsForPage(annotation?.pageNumber ?? this.activeViewerPage); + } } closeFullScreen() { diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-actions.service.ts index 9f0682b63..29b31a0e8 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-actions.service.ts @@ -428,14 +428,14 @@ export class AnnotationActionsService { const viewerAnnotation = annotationManager.getAnnotationById(annotationWrapper.id); viewerAnnotation.ReadOnly = false; viewerAnnotation.Hidden = false; - viewerAnnotation.setRotationControlEnabled(false); + viewerAnnotation.disableRotationControl(); annotationManager.redrawAnnotation(viewerAnnotation); annotationManager.selectAnnotation(viewerAnnotation); this._annotationDrawService.annotationToQuads(viewerAnnotation, viewer); } - async acceptResize( + acceptResize( $event: MouseEvent, viewer: WebViewerInstance, annotationWrapper: AnnotationWrapper, @@ -443,7 +443,6 @@ export class AnnotationActionsService { ) { const data = { dossier: this._dossier }; const fileId = this._screenStateService.fileId; - const textAndPositions = await this._extractTextAndPositions(viewer, annotationWrapper.id); this._dialogService.openDialog('resizeAnnotation', $event, data, async (result: { comment: string }) => { const textAndPositions = await this._extractTextAndPositions(viewer, annotationWrapper.id); const text = diff --git a/apps/red-ui/src/app/services/entity-services/files.service.ts b/apps/red-ui/src/app/services/entity-services/files.service.ts index f28eeb296..8a8109f46 100644 --- a/apps/red-ui/src/app/services/entity-services/files.service.ts +++ b/apps/red-ui/src/app/services/entity-services/files.service.ts @@ -27,11 +27,11 @@ export class FilesService extends EntitiesService { return loadStats$.pipe(tap(files => this._filesMapService.set(dossierId, files))); } - reload(dossierId: string, fileId: string): Observable { + reload(dossierId: string, fileId: string): Observable { return super._getOne([dossierId, fileId]).pipe( map(file => new File(file, this._userService.getNameForId(file.assignee))), switchMap(file => this._dossierStatsService.getFor([dossierId]).pipe(mapTo(file))), - tap(file => this._filesMapService.replace([file])), + map(file => this._filesMapService.replace([file])), ); } diff --git a/libs/common-ui b/libs/common-ui index 39c089ec8..cec7a0336 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 39c089ec87d11c48e3ef2186aaafe59d17085b98 +Subproject commit cec7a033629be8110ddb838c279fb3a6a15a9e18