RED-8375: fixed watermark and border not appearing all the time.

This commit is contained in:
Nicoleta Panaghiu 2024-01-26 15:47:28 +02:00
parent 5e0c8f6c13
commit c0bd129b5c
2 changed files with 7 additions and 4 deletions

View File

@ -165,17 +165,20 @@ export class FilePreviewScreenComponent
);
effect(() => {
this.state.shouldUpdate();
this.state.updateExcludedPagesStyle();
if (this._documentViewer.pageComplete()) {
this.#setExcludedPageStyles();
}
});
effect(() => {
this.state.updateExcludedPagesStyle();
if (this._viewModeService.viewMode()) {
this.updateViewMode().then();
this._logger.info('[PDF] Stamp pdf');
this._stampService.stampPDF().then();
if (_documentViewer.loaded()) {
this._logger.info('[PDF] Stamp pdf');
this._stampService.stampPDF().then();
}
}
});
}

View File

@ -44,7 +44,7 @@ export class FilePreviewStateService {
readonly dossierId = getParam(DOSSIER_ID);
readonly dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
readonly fileId = getParam(FILE_ID);
readonly shouldUpdate = computed(() => this.file().excludedPages);
readonly updateExcludedPagesStyle = computed(() => this.file().excludedPages);
constructor(
private readonly _permissionsService: PermissionsService,