From 7197806daa20a3ce801f0e396606ffc74fef5c01 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Wed, 29 Jul 2026 12:49:22 +0200 Subject: [PATCH 1/2] Remove category from amenment create form --- .../components/motion-form/motion-form.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html index 2a45bca9aed..9ab96da48df 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html @@ -173,7 +173,7 @@

- @if (newMotion && hasCategories) { + @if (newMotion && !amendmentEdit && hasCategories) {
{{ 'Category' | translate }} From 711298044e91c1c3f9c03e5bd7fd9a2260b215c5 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Wed, 29 Jul 2026 13:05:34 +0200 Subject: [PATCH 2/2] Remove from payload --- .../motion-form/motion-form.component.ts | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts index b6fc9959d8f..5cedfda789e 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts @@ -3,6 +3,7 @@ import { ChangeDetectorRef, Component, HostListener, + inject, OnInit, ViewEncapsulation } from '@angular/core'; @@ -23,7 +24,6 @@ import { ParticipantControllerService } from '@app/site/pages/meetings/pages/par import { OperatorService } from '@app/site/services/operator.service'; import { ViewPortService } from '@app/site/services/view-port.service'; import { PromptService } from '@app/ui/modules/prompt-dialog'; -import { TranslateService } from '@ngx-translate/core'; import { auditTime, BehaviorSubject, @@ -185,24 +185,23 @@ export class MotionFormComponent extends BaseMeetingComponent implements OnInit private _motionId: Id | null = null; private _parentId: Id | null = null; - public constructor( - protected override translate: TranslateService, - public vp: ViewPortService, - public participantRepo: ParticipantControllerService, - public participantSortService: ParticipantListSortService, - public userRepo: UserRepositoryService, - public categoryRepo: MotionCategoryControllerService, - public workflowRepo: MotionWorkflowControllerService, - private fb: UntypedFormBuilder, - private route: ActivatedRoute, - private motionController: MotionControllerService, - private amendmentRepo: AmendmentControllerService, - private perms: MotionPermissionService, - private prompt: PromptService, - private cd: ChangeDetectorRef, - private operator: OperatorService, - private presenter: GetForwardingCommitteesPresenterService - ) { + public categoryRepo = inject(MotionCategoryControllerService); + public participantRepo = inject(ParticipantControllerService); + public participantSortService = inject(ParticipantListSortService); + public userRepo = inject(UserRepositoryService); + public vp = inject(ViewPortService); + public workflowRepo = inject(MotionWorkflowControllerService); + private amendmentRepo = inject(AmendmentControllerService); + private cd = inject(ChangeDetectorRef); + private fb = inject(UntypedFormBuilder); + private motionController = inject(MotionControllerService); + private operator = inject(OperatorService); + private perms = inject(MotionPermissionService); + private presenter = inject(GetForwardingCommitteesPresenterService); + private prompt = inject(PromptService); + private route = inject(ActivatedRoute); + + public constructor() { super(); this.subscriptions.push( @@ -250,12 +249,16 @@ export class MotionFormComponent extends BaseMeetingComponent implements OnInit delete update.supporter_ids; } + if (this.amendmentEdit && update.category_id) { + delete update.category_id; + } + if (this.newMotion) { update.submitter_meeting_user_ids = []; if (update.submitter_ids.length === 0 && this.operator.isInMeeting(this.activeMeetingId)) { update.submitter_meeting_user_ids = [this.operator.user.getMeetingUser(this.activeMeetingId).id]; } else { - update.submitter_ids.forEach(id => { + update.submitter_ids.forEach((id: number) => { update.submitter_meeting_user_ids.push( this.userRepo.getViewModel(id).getMeetingUser(this.activeMeetingId).id );