diff --git a/src/frontend/app/indexation/indexation.component.ts b/src/frontend/app/indexation/indexation.component.ts index 19c6175c02a3828939506b5aca58ac96fb0ef65a..b9623e4795f80cae59591b3cb05dcab0e1683f5b 100644 --- a/src/frontend/app/indexation/indexation.component.ts +++ b/src/frontend/app/indexation/indexation.component.ts @@ -363,12 +363,11 @@ export class IndexationComponent implements OnInit { this.appVisaWorkflow.visaWorkflow[indexUser].signaturePositions = []; } }); - const currentWorkflow: any[] = this.appVisaWorkflow.getCurrentWorkflow().filter((user: any) => user.role !== 'note'); const modal = await this.modalController.create({ component: SignaturePositionComponent, cssClass: 'custom-alert-fullscreen', componentProps: { - 'workflow': currentWorkflow, + 'workflow': this.appVisaWorkflow.getCurrentWorkflow(), 'resource': this.filesToUpload[index], 'pdfContent': 'data:application/pdf;base64,' + this.filesToUpload[index].content, } diff --git a/src/frontend/app/indexation/signature-position/signature-position.component.html b/src/frontend/app/indexation/signature-position/signature-position.component.html index 181ff2e1caf7fce858b174301faa0a8baee01d82..decd4d0304d35d35e5659fac6e52522722df7a48 100644 --- a/src/frontend/app/indexation/signature-position/signature-position.component.html +++ b/src/frontend/app/indexation/signature-position/signature-position.component.html @@ -5,7 +5,8 @@ <ion-toolbar color="primary"> <ion-segment color="warning" scrollable [value]="currentUser" (ionChange)="selectUser($event.detail.value)" style="justify-content: center;"> - <ion-segment-button *ngFor="let user of workflow;let i=index" [value]="i" layout="icon-start"> + <ion-segment-button *ngFor="let user of workflow;let i=index" [value]="i" layout="icon-start" + [disabled]="user.role === 'note'"> <ion-label> <h2>{{user.userDisplay}}</h2> <p class="chip-item-content"> diff --git a/src/frontend/app/indexation/signature-position/signature-position.component.scss b/src/frontend/app/indexation/signature-position/signature-position.component.scss index fd2879167add1e04af78e0888eb04ae80601d8a0..359f54efc393c93adca522ce0497d65c91829dc5 100644 --- a/src/frontend/app/indexation/signature-position/signature-position.component.scss +++ b/src/frontend/app/indexation/signature-position/signature-position.component.scss @@ -155,3 +155,7 @@ img { .hide { display: none; } + +::ng-deep.segment-button-disabled { + cursor: not-allowed; +} diff --git a/src/frontend/app/indexation/signature-position/signature-position.component.ts b/src/frontend/app/indexation/signature-position/signature-position.component.ts index 99ae68c80407033cd47d549a78255531c7abf7ed..8e3bf242a28cf19c48f8840c24764c0326fefbeb 100644 --- a/src/frontend/app/indexation/signature-position/signature-position.component.ts +++ b/src/frontend/app/indexation/signature-position/signature-position.component.ts @@ -11,7 +11,7 @@ import { SignaturesContentService } from '../../service/signatures.service'; }) export class SignaturePositionComponent implements OnInit { - @Input() workflow: any = []; + @Input() workflow: any[] = []; @Input() resource: any = []; @Input() pdfContent: any = null; @@ -76,6 +76,8 @@ export class SignaturePositionComponent implements OnInit { async onPagesLoaded(ev: any) { this.pages = Array.from({ length: ev.pagesCount }).map((_, i) => i + 1); this.changePage(1); + const isSign: any = ((user: any) => user.role !== 'note'); + this.goToSignUserPage(this.workflow.findIndex(isSign), this.currentPage); } public async exportAsImage(): Promise<void> {