diff --git a/src/frontend/app/modal/warn-modal.component.html b/src/frontend/app/modal/warn-modal.component.html index 3765eee4b96d93bc623c4cc1e2796f251df4e958..56ac8743bcb6ca01338ae5bcac4bbf6ccc710dc5 100755 --- a/src/frontend/app/modal/warn-modal.component.html +++ b/src/frontend/app/modal/warn-modal.component.html @@ -4,7 +4,7 @@ <!--<p *ngIf="signaturesService.notesContent.length == 0 && signaturesService.signaturesContent.length == 0">{{'lang.refuseDocumentWithoutSignature' | translate}}</p>--> <p>{{'lang.wouldLikeConfirm' | translate}}</p> <p> - <textarea class="note" matInput placeholder="Ajouter un commentaire"></textarea> + <textarea [(ngModel)]="note" class="note" matInput placeholder="Ajouter un commentaire"></textarea> </p> </div> <div mat-dialog-actions> diff --git a/src/frontend/app/modal/warn-modal.component.ts b/src/frontend/app/modal/warn-modal.component.ts index c8b62a59bcb85571d9f83884c46e0849dd75e4e7..97330cc717ab9f49efd336bcbc009ec6f8ae335c 100644 --- a/src/frontend/app/modal/warn-modal.component.ts +++ b/src/frontend/app/modal/warn-modal.component.ts @@ -12,7 +12,8 @@ import { TranslateService } from '@ngx-translate/core'; }) export class WarnModalComponent { disableState = false; - msgButton = 'lang.rejectDocument'; + msgButton: string = 'lang.rejectDocument'; + note: string = ''; constructor(private translate: TranslateService, @Inject(MAT_DIALOG_DATA) public data: any, public http: HttpClient, public dialogRef: MatDialogRef<WarnModalComponent>, public signaturesService: SignaturesContentService, public notificationService: NotificationService) { } @@ -51,7 +52,7 @@ export class WarnModalComponent { } this.disableState = true; this.msgButton = 'lang.sending'; - this.http.put('../rest/documents/' + this.signaturesService.mainDocumentId + '/actions/' + this.signaturesService.currentAction, {'signatures': signatures}) + this.http.put('../rest/documents/' + this.signaturesService.mainDocumentId + '/actions/' + this.signaturesService.currentAction, {'signatures': signatures, 'note' : this.note}) .subscribe(() => { if (this.signaturesService.documentsList[this.signaturesService.indexDocumentsList] !== undefined) { this.signaturesService.documentsList.splice(this.signaturesService.indexDocumentsList, 1);