diff --git a/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts b/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts index c7dd9e11b630511bcd271cdb2db0129567d8b0f3..494b0ea6e71e497983f5a0a614b83b9f05cf56e6 100644 --- a/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts +++ b/src/frontend/app/actions/close-mail-action/close-mail-action.component.ts @@ -45,7 +45,7 @@ export class CloseMailActionComponent implements OnInit { checkIndexingClose() { this.http.get(`../../rest/actions/${this.data.action.id}`).pipe( tap((data: any) => { - this.requiredFields = data.action.requiredFields; + this.requiredFields = data.action.parameters; }), exhaustMap(() => this.http.get(`../../rest/customFields`)), tap((data: any) => this.customFields = data.customFields), diff --git a/src/frontend/app/administration/action/action-administration.component.html b/src/frontend/app/administration/action/action-administration.component.html index e87530bf0fdc1e6356eda721df31ab43e7a47727..e67e469b7aa7d854b7b125467c91b503cea014a3 100755 --- a/src/frontend/app/administration/action/action-administration.component.html +++ b/src/frontend/app/administration/action/action-administration.component.html @@ -58,6 +58,17 @@ </mat-chip-list> </div> </div> + <div class="form-group" *ngIf="action.actionPageId=='create_acknowledgement_receipt'"> + <div class="col-sm-12"> + <mat-form-field> + <mat-select [required]="action.actionPageId=='create_acknowledgement_receipt'" id="generateARmode" name="generateARmode" title="{{lang.generateARMode}}" placeholder="{{lang.generateARMode}}" [(ngModel)]="arMode"> + <mat-option value="auto">{{lang.autoAR}}</mat-option> + <mat-option value="manual">{{lang.manualAR}}</mat-option> + <mat-option value="both">{{lang.bothAR}}</mat-option> + </mat-select> + </mat-form-field> + </div> + </div> <div class="form-group"> <div class="col-sm-12"> <mat-form-field> diff --git a/src/frontend/app/administration/action/action-administration.component.ts b/src/frontend/app/administration/action/action-administration.component.ts index f84a6ddbf33a80dbad5dbf48e0454e8022b30e59..18a896f5ac89c3c374ee52d57d619ec42eb2c8aa 100755 --- a/src/frontend/app/administration/action/action-administration.component.ts +++ b/src/frontend/app/administration/action/action-administration.component.ts @@ -37,6 +37,7 @@ export class ActionAdministrationComponent implements OnInit { selectedFieldsValue: Array<any> = []; selectedFieldsId: Array<any> = []; selectedValue: any; + arMode: any; constructor( public http: HttpClient, @@ -87,15 +88,19 @@ export class ActionAdministrationComponent implements OnInit { this.headerService.setHeader(this.lang.actionCreation, data.action.label_action); await this.getCustomFields(); this.loading = false; - this.customFieldsFormControl = new FormControl({ value: this.action.requiredFields, disabled: false }); - this.selectedFieldsId = this.action.requiredFields; - this.selectedFieldsId.forEach((element: any) => { - this.availableCustomFields.forEach((availableElement: any) => { - if (availableElement.id == element) { - this.selectedFieldsValue.push(availableElement.label); - } + this.customFieldsFormControl = new FormControl({ value: this.action.parameters, disabled: false }); + if (this.action.actionPageId=='close_mail') { + this.selectedFieldsId = this.action.parameters; + this.selectedFieldsId.forEach((element: any) => { + this.availableCustomFields.forEach((availableElement: any) => { + if (availableElement.id == element) { + this.selectedFieldsValue.push(availableElement.label); + } + }); }); - }); + } else if (this.action.actionPageId=='create_acknowledgement_receipt') { + this.arMode = this.action.parameters; + } }); } }); @@ -142,7 +147,11 @@ export class ActionAdministrationComponent implements OnInit { } onSubmit() { - this.action.requiredFields = this.selectedFieldsId; + if (this.action.actionPageId=='close_mail') { + this.action.parameters = this.selectedFieldsId; + } else if (this.action.actionPageId=='create_acknowledgement_receipt') { + this.action.parameters = this.arMode; + } if (this.creationMode) { this.http.post('../../rest/actions', this.action) .subscribe(() => { diff --git a/src/frontend/lang/lang-en.ts b/src/frontend/lang/lang-en.ts index 15f939bb5b56dbbfa4b8449bd54016950ec481c9..f37dc992192460cd0a41ea4140817cc415b98978 100755 --- a/src/frontend/lang/lang-en.ts +++ b/src/frontend/lang/lang-en.ts @@ -1540,6 +1540,10 @@ export const LANG_EN = { "mailingActionInformations" : "Following mails contain mailing attachments, if next person in visa circuit is signatory then mailing will be activate :", "mailingActionInformations2" : "Following mails contain mailing attachments, mailing will be activate :", "properties" : "Properties", + "generateARMode" : "Acknowledgement receipt mode allowed", + "autoAR" : "Automatic", + "manualAR" : "Manual", + "bothAR" : "Automatic et manual", "tagCreation" : "Tag creation", "tagModification" : "Tag modification", "usage" : "Used for", diff --git a/src/frontend/lang/lang-fr.ts b/src/frontend/lang/lang-fr.ts index 39c0e697cb1a42e75887eff45f757c3ece437284..91f1a472fa59fafd131a3dcba71992c425043eb9 100755 --- a/src/frontend/lang/lang-fr.ts +++ b/src/frontend/lang/lang-fr.ts @@ -1579,6 +1579,10 @@ export const LANG_FR = { "mailingActionInformations" : "Les courriers suivants contiennent des pièces-jointes pour publipostage, si la prochaine personne du circuit de visa est signataire alors le publipostage s'effectuera dès la validation de cette action :", "mailingActionInformations2" : "Les courriers suivants contiennent des pièces-jointes pour publipostage, celui-ci s'effectuera dès la validation de cette action :", "properties" : "Propriétés", + "generateARMode" : "Mode d'accusé de réception autorisé", + "autoAR" : "Automatique", + "manualAR" : "Manuel", + "bothAR" : "Automatique et manuel", "tagCreation" : "Création d'un mot-clé", "tagModification" : "Modification du mot-clé", "usage" : "Utilisé pour", diff --git a/src/frontend/lang/lang-nl.ts b/src/frontend/lang/lang-nl.ts index c04a5b9fa9a17606706d5521addfe24ceb1700e8..15d83ef073d3b3c94bdbc0b4c4120a6f2deb0304 100755 --- a/src/frontend/lang/lang-nl.ts +++ b/src/frontend/lang/lang-nl.ts @@ -1565,6 +1565,10 @@ export const LANG_NL = { "mailingActionInformations" : "Following mails contain mailing attachments, if next person in visa circuit is signatory then mailing will be activate :", //_TO_TRANSLATE "mailingActionInformations2" : "Following mails contain mailing attachments, mailing will be activate :", //TRANSLATE "properties" : "Properties", //_TO_TRANSLATE + "generateARMode" : "Acknowledgement receipt mode allowed", //_TO_TRANSLATE + "autoAR" : "Automatic", //_TO_TRANSLATE + "manualAR" : "Manual", //_TO_TRANSLATE + "bothAR" : "Automatic et manual", //_TO_TRANSLATE "tagCreation" : "Tag creation", //_TO_TRANSLATE "tagModification" : "Tag modification", //_TO_TRANSLATE "usage" : "Used for", //_TO_TRANSLATE