Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions client/src/app/domain/models/motions/motion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class Motion extends BaseModel<Motion> implements MotionFormattingReprese
public category_id!: Id; // category/motion_ids;
public block_id!: Id; // block/motion_ids;
public submitter_ids!: Id[]; // (motion_submitter/motion_id)[];
public submitter_meeting_user_ids!: Id[]; // (motion_submitter/motion_id)[];
public supporter_ids!: Id[]; // (motion_supporter/motion_id)[];
public editor_ids: Id[]; // motion_editor/motion_id;
public working_group_speaker_ids: Id[]; // motion_working_group_speaker/motion_id;
Expand Down Expand Up @@ -139,6 +140,7 @@ export class Motion extends BaseModel<Motion> implements MotionFormattingReprese
`category_id`,
`block_id`,
`submitter_ids`,
`submitter_meeting_user_ids`,
`supporter_ids`,
`editor_ids`,
`working_group_speaker_ids`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,12 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont

public createTextBased(
partialMotion: Partial<
Motion & { workflow_id: Id; attachment_mediafile_ids?: Id[]; supporter_meeting_user_ids?: Id[] }
Motion & {
workflow_id: Id;
attachment_mediafile_ids?: Id[];
supporter_meeting_user_ids?: Id[];
submitter_meeting_user_ids: Id[];
}
>
): Action<CreateResponse> {
const payload = {
Expand All @@ -196,7 +201,7 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont
title: partialMotion.title,
text: partialMotion.text,
origin_id: partialMotion.origin_id,
submitter_ids: partialMotion.submitter_ids,
submitter_meeting_user_ids: partialMotion.submitter_meeting_user_ids,
workflow_id: partialMotion.workflow_id,
category_id: partialMotion.category_id,
attachment_mediafile_ids: partialMotion.attachment_mediafile_ids,
Expand All @@ -220,7 +225,7 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont
lead_motion_id: partialMotion.lead_motion_id,
title: partialMotion.title,
origin_id: partialMotion.origin_id,
submitter_meeting_user_ids: partialMotion.submitter_ids,
submitter_meeting_user_ids: partialMotion.submitter_meeting_user_ids,
workflow_id: partialMotion.workflow_id,
category_id: partialMotion.category_id,
attachment_mediafile_ids:
Expand Down Expand Up @@ -320,7 +325,7 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont
title: partialMotion.title,
text: partialMotion.text,
origin_id: partialMotion.origin_id,
submitter_meeting_user_ids: partialMotion.submitter_ids,
submitter_meeting_user_ids: partialMotion.submitter_meeting_user_ids,
additional_submitter: partialMotion.additional_submitter,
workflow_id: partialMotion.workflow_id,
category_id: partialMotion.category_id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<mat-form-field
appearance="outline"
class="chat-form-field full-width"
[color]="isPartOfMetting() ? 'accent' : 'warn'"
[color]="isPartOfMeeting() ? 'accent' : 'warn'"
(keydown)="onKeyDown($event)"
>
@if (currentMessage) {
Expand Down Expand Up @@ -34,13 +34,13 @@
matSuffix
matTooltip=" {{ 'Send' | translate }}"
type="button"
[color]="isPartOfMetting() ? 'accent' : 'warn'"
[color]="isPartOfMeeting() ? 'accent' : 'warn'"
[disabled]="!isMessageFormValid"
(click)="sendChatMessage()"
>
<mat-icon>send</mat-icon>
</button>
@if (!isPartOfMetting()) {
@if (!isPartOfMeeting()) {
<mat-hint>
<span class="warn">
{{ 'You have to be part of the meeting to write messages.' | translate }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class ChatGroupDetailMessageFormComponent {
}

public sendChatMessage(): void {
if (!this.isPartOfMetting()) {
if (!this.isPartOfMeeting()) {
const infoMessage = this.translate.instant(`Action not possible. You have to be part of the meeting.`);
this.snackBar.open(infoMessage, this.translate.instant(`Ok`));
} else {
Expand All @@ -79,7 +79,7 @@ export class ChatGroupDetailMessageFormComponent {
this.messageForm.markAsPristine();
}

public isPartOfMetting(): boolean {
public isPartOfMeeting(): boolean {
return this.operator.isInMeeting(this.activeMeetingIdService.meetingId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class AmendmentCreateWizardComponent extends BaseMeetingComponent impleme
amendmentParagraphs[paraNo] = this.contentForm.value[`text_` + paraNo];
}
});
const submitterId = this.operator.isInMeeting(this.activeMeetingId)
const submitterMeetingUserId = this.operator.isInMeeting(this.activeMeetingId)
? [this.operator.user.getMeetingUser(this.activeMeetingId)?.id]
: [];
const motionCreate = {
Expand All @@ -189,7 +189,7 @@ export class AmendmentCreateWizardComponent extends BaseMeetingComponent impleme
category_id: this.operator.hasPerms(Permission.motionCanManage) ? this.motion.category_id : undefined,
lead_motion_id: this.motion.id,
amendment_paragraphs: amendmentParagraphs,
submitter_ids: submitterId,
submitter_meeting_user_ids: submitterMeetingUserId,
workflow_id: this.meetingSettingsService.instant(`motions_default_amendment_workflow_id`)
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ export class MotionFormComponent extends BaseMeetingComponent implements OnInit

if (this.newMotion) {
if (update.submitter_ids.length === 0 && this.operator.isInMeeting(this.activeMeetingId)) {
update.submitter_ids = [this.operator.user.getMeetingUser(this.activeMeetingId).id];
update.submitter_meeting_user_ids = [this.operator.user.getMeetingUser(this.activeMeetingId).id];
} else {
update.submitter_meeting_user_ids = update.submitter_ids;
}
for (const key in update) {
if (update[key] === null || update[key].length === 0) {
Expand Down
Loading