RED-9937: made preview tab available & trigger reanalysis when required.
This commit is contained in:
parent
01b8948b6a
commit
24e793582d
@ -27,7 +27,7 @@ export class ViewSwitchComponent {
|
||||
});
|
||||
protected readonly canSwitchToRedactedView = computed(() => {
|
||||
const file = this._state.file();
|
||||
return !file.analysisRequired && !file.excluded && !file.isError;
|
||||
return !file.excluded && !file.isError;
|
||||
});
|
||||
protected readonly canSwitchToEarmarksView = computed(() => {
|
||||
const file = this._state.file();
|
||||
|
||||
@ -152,6 +152,13 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
this._fileDataService.loadAnnotations(file).then();
|
||||
});
|
||||
|
||||
effect(() => {
|
||||
const file = this.state.file();
|
||||
if (file.analysisRequired && !file.excludedFromAutomaticAnalysis) {
|
||||
this._reanalysisService.reanalyzeFilesForDossier([file], file.dossierId, { force: true }).then();
|
||||
}
|
||||
});
|
||||
|
||||
effect(
|
||||
() => {
|
||||
if (this._documentViewer.loaded()) {
|
||||
@ -350,10 +357,6 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
this.userPreferenceService.saveLastOpenedFileForDossier(this.dossierId, this.fileId).then();
|
||||
this.#subscribeToFileUpdates();
|
||||
|
||||
if (file?.analysisRequired && !file.excludedFromAutomaticAnalysis) {
|
||||
await this._reanalysisService.reanalyzeFilesForDossier([file], this.dossierId, { force: true });
|
||||
}
|
||||
|
||||
this.pdfProxyService.configureElements();
|
||||
this.#restoreOldFilters();
|
||||
this.pdf.instance.UI.hotkeys.on('esc', this.handleEscInsideViewer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user