From 7e05f964216dce5319532a9a88fd94e3a45e75e6 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Thu, 13 Jan 2022 18:07:30 +0200 Subject: [PATCH] UI: Entity details page, before saves data prepare form values --- .../home/components/entity/entity-details-page.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.ts b/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.ts index c2878680e5..4b44a61ede 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.ts @@ -137,10 +137,10 @@ export class EntityDetailsPageComponent extends EntityDetailsPanelComponent impl onApplyDetails() { if (this.detailsForm && this.detailsForm.valid) { - const editingEntity = {...this.editingEntity, ...this.detailsForm.getRawValue()}; - if (this.detailsForm.hasOwnProperty('additionalInfo')) { + const editingEntity = {...this.editingEntity, ...this.entityComponent.entityFormValue()}; + if (this.editingEntity.hasOwnProperty('additionalInfo')) { editingEntity.additionalInfo = - mergeDeep((this.editingEntity as any).additionalInfo, this.detailsForm.getRawValue()?.additionalInfo); + mergeDeep((this.editingEntity as any).additionalInfo, this.entityComponent.entityFormValue()?.additionalInfo); } this.entitiesTableConfig.saveEntity(editingEntity, this.editingEntity).subscribe( (entity) => {