Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h3>

<div class="extra-data">
<!-- Category form -->
@if (newMotion && hasCategories) {
@if (newMotion && !amendmentEdit && hasCategories) {
<div class="content-field">
<mat-form-field>
<mat-label>{{ 'Category' | translate }}</mat-label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
ChangeDetectorRef,
Component,
HostListener,
inject,
OnInit,
ViewEncapsulation
} from '@angular/core';
Expand All @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
);
Expand Down
Loading