UI: Entity details page, before saves data prepare form values
This commit is contained in:
parent
0c85479eaf
commit
7e05f96421
@ -137,10 +137,10 @@ export class EntityDetailsPageComponent extends EntityDetailsPanelComponent impl
|
|||||||
|
|
||||||
onApplyDetails() {
|
onApplyDetails() {
|
||||||
if (this.detailsForm && this.detailsForm.valid) {
|
if (this.detailsForm && this.detailsForm.valid) {
|
||||||
const editingEntity = {...this.editingEntity, ...this.detailsForm.getRawValue()};
|
const editingEntity = {...this.editingEntity, ...this.entityComponent.entityFormValue()};
|
||||||
if (this.detailsForm.hasOwnProperty('additionalInfo')) {
|
if (this.editingEntity.hasOwnProperty('additionalInfo')) {
|
||||||
editingEntity.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(
|
this.entitiesTableConfig.saveEntity(editingEntity, this.editingEntity).subscribe(
|
||||||
(entity) => {
|
(entity) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user