From d1c143333a557bbdf89bccb7452e1ee40af44103 Mon Sep 17 00:00:00 2001 From: Nikita Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com> Date: Thu, 1 Dec 2022 15:22:45 +0100 Subject: [PATCH] [ACS-4091] Folder rules: "Add simple workflow" action clears out parameters when trying to set destination folder (#2826) * ACS-4091 fixed a bug * ACS-4091 - fixed typo --- .../lib/rule-details/actions/rule-action.ui-component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/aca-folder-rules/src/lib/rule-details/actions/rule-action.ui-component.ts b/projects/aca-folder-rules/src/lib/rule-details/actions/rule-action.ui-component.ts index 4200776ff..e001c1337 100644 --- a/projects/aca-folder-rules/src/lib/rule-details/actions/rule-action.ui-component.ts +++ b/projects/aca-folder-rules/src/lib/rule-details/actions/rule-action.ui-component.ts @@ -196,7 +196,7 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnDe icon: 'folder', default: this.translate.instant('ACA_FOLDER_RULES.RULE_DETAILS.PLACEHOLDER.CHOOSE_FOLDER'), clickable: true, - clickCallBack: this.openSelectorDialog.bind(this), + clickCallBack: this.openSelectorDialog.bind(this, paramDef.name), value: this.parameters[paramDef.name] }); } @@ -218,7 +218,7 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnDe }); } - private openSelectorDialog() { + private openSelectorDialog(paramDefName) { const data: ContentNodeSelectorComponentData = { title: this.translate.instant('ACA_FOLDER_RULES.RULE_DETAILS.PLACEHOLDER.CHOOSE_FOLDER'), actionName: NodeAction.CHOOSE, @@ -238,7 +238,8 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnDe this.writeValue({ actionDefinitionId: this.selectedActionDefinitionId, params: { - 'destination-folder': selections[0].id + ...this.parameters, + [paramDefName]: selections[0].id } }); this.onChange({