diff --git a/src/frontend/app/actions/create-acknowledgement-receipt-action/create-acknowledgement-receipt-action.component.html b/src/frontend/app/actions/create-acknowledgement-receipt-action/create-acknowledgement-receipt-action.component.html index 350ca241a7a74209ccce2b750fc4e4e695e8c21e..5b746665ac6e1ceda6b1c8786fd76d7117aed4e9 100755 --- a/src/frontend/app/actions/create-acknowledgement-receipt-action/create-acknowledgement-receipt-action.component.html +++ b/src/frontend/app/actions/create-acknowledgement-receipt-action/create-acknowledgement-receipt-action.component.html @@ -43,15 +43,17 @@ </ng-container> </div> </app-maarch-message> - <app-maarch-message *ngIf="acknowledgement.sendEmail" mode="success" + <app-maarch-message *ngIf="acknowledgement.sendEmail && !this.functions.empty(this.senders)" mode="success" [content]="'lang.readyToSendElectronicAr' | translate : {nb : acknowledgement.sendEmail}"> </app-maarch-message> - <app-maarch-message *ngIf="acknowledgement.sendPaper" mode="success" + <app-maarch-message *ngIf="acknowledgement.sendPaper && !this.functions.empty(this.senders)" mode="success" [content]="'lang.readyToGeneratePaperAr' | translate : {nb : acknowledgement.sendPaper}"> </app-maarch-message> - + <app-maarch-message *ngIf="!loading && this.functions.empty(this.senders) && !acknowledgement.noSendAR?.number" mode="danger" style="margin-top: 5%; display: block;" + [content]="'lang.emptySenders' | translate"> + </app-maarch-message> <app-mail-editor #appMailEditor - *ngIf="!manualAR && realResSelected.length > 0" + *ngIf="!manualAR && realResSelected.length > 0 && !this.functions.empty(this.senders)" [availableSenders]="senders" [currentSender]="senders[0]" [recipientDisabled]="true" @@ -66,12 +68,12 @@ [resId]="data.resIds.length === 1 ? data.resIds[0] : null" ></app-mail-editor> - <div *ngIf="arMode == 'both'"> + <div *ngIf="arMode == 'both' && !this.functions.empty(this.senders)"> <mat-slide-toggle [(ngModel)]="manualAR" color="primary" (change)="toggleArManual($event.checked)"> {{'lang.editAcknowledgementReceipt' | translate}}</mat-slide-toggle> </div> <app-mail-editor #appMailEditor - *ngIf="manualAR && realResSelected.length > 0" + *ngIf="manualAR && realResSelected.length > 0 && !this.functions.empty(this.senders)" [availableSenders]="senders" [currentSender]="senders[0]" [recipientDisabled]="true" @@ -84,7 +86,7 @@ [subjectPrefix]="'[AR]'" ></app-mail-editor> </div> - <div class="col-md-12" *ngIf="acknowledgement.sendEmail || acknowledgement.sendPaper"> + <div class="col-md-12" *ngIf="(acknowledgement.sendEmail || acknowledgement.sendPaper) && !this.functions.empty(this.senders)"> <app-note-editor #noteEditor [resIds]="data.resIds"></app-note-editor> </div> </div> @@ -92,7 +94,7 @@ <span class="divider-modal"></span> <div mat-dialog-actions class="actions"> <button mat-raised-button mat-button color="primary" - [disabled]="loading || (!acknowledgement.sendEmail && !acknowledgement.sendPaper)" + [disabled]="loading || (!acknowledgement.sendEmail && !acknowledgement.sendPaper) || this.functions.empty(this.senders)" (click)="onSubmit()">{{'lang.validate' | translate}}</button> <button mat-raised-button mat-button [disabled]="loading" [mat-dialog-close]="">{{'lang.cancel' | translate}}</button> diff --git a/src/lang/lang-en.json b/src/lang/lang-en.json index 60c9a5f95abfeb6546038621db831b4f40759099..1241672a16c7d9dd61a5b37987d176e14fd8f173 100644 --- a/src/lang/lang-en.json +++ b/src/lang/lang-en.json @@ -2581,5 +2581,6 @@ "fileNotConvertible": "Only convertible files are allowed", "warningNote": "Please note that your comment must be neutral, factual, objective and respectful of the people concerned, never excessive or insulting.", "emptyEmails": "The correspondents of the group do not contain email addresses", - "correspondentEmptyEmails": "<b>Warning ! Only correspondents with e-mail addresses are included.</b> <br><br><ul><li>Number of correspondents without an email address : {{nbr}}</li></ul>" + "correspondentEmptyEmails": "<b>Warning ! Only correspondents with e-mail addresses are included.</b> <br><br><ul><li>Number of correspondents without an email address : {{nbr}}</li></ul>", + "emptySenders": "The sender linked to the mail does not have an email address" } diff --git a/src/lang/lang-fr.json b/src/lang/lang-fr.json index 0ef5c72c6a2ae4cf5c4d61a6f2f37a9bdc18efc8..ee89336cb42c464d4225d6e752245e1d5886b92f 100644 --- a/src/lang/lang-fr.json +++ b/src/lang/lang-fr.json @@ -2581,5 +2581,6 @@ "fileNotConvertible": "Seuls les fichiers convertibles sont autorisés", "warningNote": "Attention votre commentaire doit être neutre, factuel, objectif et respectueux des personnes concernées, jamais excessif ou insultant.", "emptyEmails": "Les correspondants du groupe ne contiennent pas d'adresses e-mail", - "correspondentEmptyEmails": "<b>Attention ! Seuls les correspondants avec des adresses e-mail sont repris.</b> <br><br><ul><li>Nombre de correspondants sans adresse e-mail : {{nbr}}</li></ul>" + "correspondentEmptyEmails": "<b>Attention ! Seuls les correspondants avec des adresses e-mail sont repris.</b> <br><br><ul><li>Nombre de correspondants sans adresse e-mail : {{nbr}}</li></ul>", + "emptySenders": "L'expéditeur lié au courrier n'a pas d'adresse e-mail" }