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

View File

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