From 603a9c8a9043916db7f58ff72cbe8cebdab014e6 Mon Sep 17 00:00:00 2001 From: Pratima Sakinala Date: Wed, 14 Apr 2021 13:23:03 -0700 Subject: [PATCH 1/2] fix(agent-detail): fixes the language-code that is set to the dynamicContent property by setting it to the languageCode variable in the component --- .../agents/agent-detail/agent-detail-smart.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts b/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts index 3a33ad86..44fb96c5 100644 --- a/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts +++ b/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts @@ -59,7 +59,6 @@ export class AgentDetailSmartComponent implements OnInit { private agentService: AgentService, private formService: FormService, private router: Router, - private translocoService: TranslocoService, ) { this.agent = this.activatedRoute.snapshot.data.agent; this.languageCode = @@ -221,8 +220,9 @@ export class AgentDetailSmartComponent implements OnInit { this.form, dynamicContentDTO, ); + console.log(this.languageCode); payload.dynamicContent = { - [this.translocoService.getActiveLang()]: dynamicContentPayload, + [this.languageCode]: dynamicContentPayload, }; return payload; From 35ea2304e9f1a92579f830a50d576ed92e0d5f8b Mon Sep 17 00:00:00 2001 From: Pratima Sakinala Date: Wed, 14 Apr 2021 13:24:17 -0700 Subject: [PATCH 2/2] chore(agent-detail): removes console.log --- .../content/agents/agent-detail/agent-detail-smart.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts b/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts index 44fb96c5..a51b9c27 100644 --- a/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts +++ b/src/app/features/content/agents/agent-detail/agent-detail-smart.component.ts @@ -220,7 +220,6 @@ export class AgentDetailSmartComponent implements OnInit { this.form, dynamicContentDTO, ); - console.log(this.languageCode); payload.dynamicContent = { [this.languageCode]: dynamicContentPayload, };