diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 79cfdfd2d..4716d2b89 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -1,5 +1,5 @@ -import { annotationTypesTranslations, SuggestionAddFalsePositive } from '@translations/annotation-types-translations'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { IListable } from '@iqser/common-ui'; import { annotationDefaultColorConfig, annotationEntityColorConfig, @@ -26,7 +26,7 @@ import { SuperType, SuperTypes, } from '@red/domain'; -import { IListable } from '@iqser/common-ui'; +import { annotationTypesTranslations, SuggestionAddFalsePositive } from '@translations/annotation-types-translations'; import { chronologicallyBy, timestampOf } from '../../modules/file-preview/services/file-data.service'; export class AnnotationWrapper implements IListable { @@ -451,8 +451,8 @@ export class AnnotationWrapper implements IListable { static #getShortContent(annotationWrapper: AnnotationWrapper) { if (annotationWrapper.legalBasis) { - const lb = annotationWrapper.legalBasisList.find(lbm => - lbm.reason?.toLowerCase().includes(annotationWrapper.legalBasis.toLowerCase()), + const lb = annotationWrapper.legalBasisList.find( + lbm => lbm.reason?.toLowerCase().includes(annotationWrapper.legalBasis.toLowerCase()), ); if (lb) { return lb.name; diff --git a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts index 43e6136a1..f466d96b0 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts @@ -225,14 +225,14 @@ export class AnnotationActionsService { ); } - async resize(annotationWrapper: AnnotationWrapper) { + resize(annotationWrapper: AnnotationWrapper) { this._annotationManager.resizingAnnotationId = annotationWrapper.id; if (annotationWrapper.rectangle || annotationWrapper.imported || annotationWrapper.isImage) { this._annotationManager.delete(annotationWrapper); const rectangleAnnotation = this.#generateRectangle(annotationWrapper); - await this._annotationManager.add(rectangleAnnotation); - return; + console.log(rectangleAnnotation); + return this._annotationManager.add(rectangleAnnotation); } const viewerAnnotation = this._annotationManager.get(annotationWrapper); diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts index c7d3f4a51..8db518c70 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts @@ -43,15 +43,15 @@ import Quad = Core.Math.Quad; @Injectable() export class PdfProxyService { - private readonly _convertPath = inject(BASE_HREF_FN); - readonly #visibilityOffIcon = this._convertPath('/assets/icons/general/visibility-off.svg'); - readonly #visibilityIcon = this._convertPath('/assets/icons/general/visibility.svg'); - readonly #falsePositiveIcon = this._convertPath('/assets/icons/general/pdftron-action-false-positive.svg'); + readonly #convertPath = inject(BASE_HREF_FN); + readonly #visibilityOffIcon = this.#convertPath('/assets/icons/general/visibility-off.svg'); + readonly #visibilityIcon = this.#convertPath('/assets/icons/general/visibility.svg'); + readonly #falsePositiveIcon = this.#convertPath('/assets/icons/general/pdftron-action-false-positive.svg'); readonly #addRedactionIcon = this._iqserPermissionsService.has(Roles.getRss) - ? this._convertPath('/assets/icons/general/pdftron-action-add-annotation.svg') - : this._convertPath('/assets/icons/general/pdftron-action-add-redaction.svg'); - readonly #isDocumine; - readonly #addHintIcon = this._convertPath('/assets/icons/general/pdftron-action-add-hint.svg'); + ? this.#convertPath('/assets/icons/general/pdftron-action-add-annotation.svg') + : this.#convertPath('/assets/icons/general/pdftron-action-add-redaction.svg'); + readonly #isDocumine = getConfig().IS_DOCUMINE; + readonly #addHintIcon = this.#convertPath('/assets/icons/general/pdftron-action-add-hint.svg'); readonly annotationSelected$ = this.#annotationSelected$; readonly manualAnnotationRequested$ = new Subject(); readonly redactTextRequested$ = new Subject(); @@ -114,7 +114,6 @@ export class PdfProxyService { this._viewerHeaderService.disable([HeaderElements.TOGGLE_READABLE_REDACTIONS]); } }); - this.#isDocumine = getConfig().IS_DOCUMINE; } get #annotationSelected$() {