Skip to content
Snippets Groups Projects
Commit 97475767 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #15049 TIME 0:10 add data for executeAction

parent 3fcef41e
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ export class SendToRecordManagementComponent implements OnInit {
onSubmit() {
this.loading = true;
this.formatData();
if (this.data.resIds.length > 0) {
this.executeAction();
}
......@@ -139,7 +139,7 @@ export class SendToRecordManagementComponent implements OnInit {
executeAction() {
const realResSelected: number[] = this.data.resIds;
this.http.put(this.data.processActionRoute, { resources: realResSelected, data: {} }).pipe(
this.http.put(this.data.processActionRoute, { resources: realResSelected, data: this.formatData() }).pipe(
tap((data: any) => {
if (!data) {
this.dialogRef.close('success');
......@@ -156,6 +156,14 @@ export class SendToRecordManagementComponent implements OnInit {
).subscribe();
}
formatData() {
const dataToSend = {};
Object.keys(this.actionFormGroup.controls).forEach(element => {
dataToSend[element] = this.actionFormGroup.controls[element].value;
});
return dataToSend;
}
archivalAgreementSelected(ev: any) {
const archivalAgreement = this.archivalAgreements.filter((element: any) => element.id === ev.value);
this.actionFormGroup.patchValue({entityArchiveRecipient: archivalAgreement[0].archiveEntityRegNumber});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment