diff --git a/src/accounts/accountEditModal.component.ts b/src/accounts/accountEditModal.component.ts index 5def8c2..ae859bd 100644 --- a/src/accounts/accountEditModal.component.ts +++ b/src/accounts/accountEditModal.component.ts @@ -44,7 +44,7 @@ export class AccountEditModalComponent { submit(): void { let formModel = this.accountForm.form.value; - let account = new Account(); + let account = Object.assign({}, this.account); account.id = this.account.id; account.name = formModel.name; diff --git a/src/scheduler/scheduleEditModal.component.ts b/src/scheduler/scheduleEditModal.component.ts index 02ef752..d099c6c 100644 --- a/src/scheduler/scheduleEditModal.component.ts +++ b/src/scheduler/scheduleEditModal.component.ts @@ -46,7 +46,7 @@ export class ScheduleEditModalComponent { submit(): void { let formModel = this.scheduleForm.form.value; - let schedule = new Schedule(); + let schedule = Object.assign({}, this.schedule); schedule.id = this.schedule.id; schedule.start_date = formModel.startDate;