From a2b75194a1a224ca3c6ea51845e7b884671e86a5 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 11 Apr 2019 16:06:05 +0200 Subject: [PATCH] don't autoupdate detail forms during editing --- .../agenda/components/topic-detail/topic-detail.component.ts | 2 +- .../assignment-detail/assignment-detail.component.ts | 4 +++- .../components/motion-detail/motion-detail.component.ts | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts index 17e886f64..2d91640f9 100644 --- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts +++ b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts @@ -188,7 +188,7 @@ export class TopicDetailComponent extends BaseViewComponent { if (newViewTopic && !this.editTopic) { this.topic = newViewTopic; // personalInfoForm is undefined during 'new' and directly after reloading - if (this.topicForm) { + if (this.topicForm && !this.editTopic) { this.patchForm(); } } diff --git a/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts b/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts index e0c84a4e6..e67b11464 100644 --- a/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts +++ b/client/src/app/site/assignments/components/assignment-detail/assignment-detail.component.ts @@ -333,7 +333,9 @@ export class AssignmentDetailComponent extends BaseViewComponent implements OnIn this.repo.getViewModelObservable(assignmentId).subscribe(assignment => { if (assignment) { this.assignment = assignment; - this.patchForm(this.assignment); + if (!this.editAssignment) { + this.patchForm(this.assignment); + } } }) ); diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts index e40be1133..80b4a5473 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts @@ -580,7 +580,9 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, if (motion) { this.motion = motion; this.newStateExtension = this.motion.stateExtension; - this.patchForm(this.motion); + if (!this.editMotion) { + this.patchForm(this.motion); + } } }), this.repo.amendmentsTo(motionId).subscribe(