RED-8375: fixed manual redactions actions not available for excluded.

This commit is contained in:
Nicoleta Panaghiu 2024-01-26 15:44:22 +02:00
parent 07df8e8074
commit 5e0c8f6c13

View File

@ -75,12 +75,10 @@ import { SkippedService } from './services/skipped.service';
import { StampService } from './services/stamp.service';
import { TablesService } from './services/tables.service';
import { ViewModeService } from './services/view-mode.service';
import { ALL_HOTKEYS, TextPopups } from './utils/constants';
import { ALL_HOTKEYS } from './utils/constants';
import { RedactTextData } from './utils/dialog-types';
import { AnnotationActionsService } from './services/annotation-actions.service';
const textActions = [TextPopups.REDACT_TEXT, TextPopups.ADD_HINT, TextPopups.ADD_FALSE_POSITIVE];
@Component({
templateUrl: './file-preview-screen.component.html',
styleUrls: ['./file-preview-screen.component.scss'],
@ -767,20 +765,6 @@ export class FilePreviewScreenComponent
),
)
.subscribe();
const selectedTextEffect = this._documentViewer.selectedText$.pipe(
tap(() => {
const canPerformActions = this.pdfProxyService.canPerformActions();
const isCurrentPageExcluded = this.state.file().isPageExcluded(this.pdf.currentPage());
if (canPerformActions && !isCurrentPageExcluded) {
this.pdf.enable(textActions);
} else {
this.pdf.disable(textActions);
}
}),
);
this.addActiveScreenSubscription = selectedTextEffect.subscribe();
}
#handleDeletedDossier(): void {