diff --git a/src/frontend/app/document/document.component.ts b/src/frontend/app/document/document.component.ts index 6b0fdb9e0d3ebb71eca392576787e5bde9b3cc48..b588ea41c89299676594246fc99a3982b9f1fe3f 100755 --- a/src/frontend/app/document/document.component.ts +++ b/src/frontend/app/document/document.component.ts @@ -380,7 +380,9 @@ export class DocumentComponent implements OnInit { this.signaturesService.signaturesListSubstituted = []; } if (realUserWorkflow[0].datePositions.length > 0 && this.functionsService.empty(this.signaturesService.datesContent)) { - realUserWorkflow[0].datePositions.forEach((date: any) => { + const currentUser = this.mainDocument.workflow.indexOf(realUserWorkflow[0]); + const datePosUser = realUserWorkflow[0].datePositions.filter((item: any) => item.sequence === currentUser); + datePosUser.forEach((date: any) => { if (!this.signaturesService.datesContent[date.page]) { this.signaturesService.datesContent[date.page] = []; } diff --git a/src/frontend/app/signatures/signatures.component.ts b/src/frontend/app/signatures/signatures.component.ts index cd7fa6841e51dd0c0d9810ea71c85caaddcc375c..eb0793e55e89ffe33cf9ad9a7ef7d1e7b2e09db9 100755 --- a/src/frontend/app/signatures/signatures.component.ts +++ b/src/frontend/app/signatures/signatures.component.ts @@ -110,13 +110,10 @@ export class SignaturesComponent implements OnInit { } selectSignature(signature: any) { - const percentWidth = 25; signature.width = percentWidth; - const signPosCurrentPage = this.currentWorflow.signaturePositions.filter((item: any) => item.page === this.signaturesService.currentPage); const signPosOtherPage = this.currentWorflow.signaturePositions.filter((item: any) => item.page !== this.signaturesService.currentPage); - if (!this.signPosMode || (signPosCurrentPage.length === 0 && signPosOtherPage.length === 0)) { signature.positionX = 60; signature.positionY = 80; @@ -143,7 +140,6 @@ export class SignaturesComponent implements OnInit { this.storeSignature(signature, element.page); }); } - if (this.currentWorflow.signaturePositions.length === 1) { this.notificationService.success('lang.signatureInDocAddedAlt'); } else { @@ -157,7 +153,6 @@ export class SignaturesComponent implements OnInit { }); } } - if (signPosCurrentPage.length === 0 && signPosOtherPage.length > 0) { if (signaturePos.length > 0) { this.modalController.dismiss({ redirectPage: signaturePos[0].page }); @@ -205,7 +200,6 @@ export class SignaturesComponent implements OnInit { }; this.storeDate(dateBlock, this.signaturesService.currentPage); } - datePosOtherPage.forEach((position: any) => { const dateBlock: any = { width: position.width,