Browse Source

Merge pull request #5880 from vvlladd28/bug/entity-detail-page

[3.3.3] UI: Entity details page, before saves data prepare form values
pull/5904/head
Igor Kulikov 5 years ago
committed by GitHub
parent
commit
a81724a3a1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.ts

6
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) => {

Loading…
Cancel
Save