From f5a655213638c6fb6d5c110fdc4cf34e8672b1c3 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Tue, 23 Jul 2024 13:39:43 +0200 Subject: [PATCH 1/2] Add new dialog options to motion forward dialog (#3635) --- .../motion-repository.service.ts | 11 +- .../motion-forward-dialog.component.html | 156 +++++++++++++----- .../motion-forward-dialog.component.scss | 10 ++ .../motion-forward-dialog.component.ts | 26 ++- .../motion-forward-dialog.module.ts | 6 + .../services/motion-forward-dialog.service.ts | 26 ++- 6 files changed, 184 insertions(+), 51 deletions(-) diff --git a/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts b/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts index 7e9b5af1c7..2a8132cf6b 100644 --- a/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts +++ b/client/src/app/gateways/repositories/motions/motion-repository.service/motion-repository.service.ts @@ -56,13 +56,22 @@ export class MotionRepositoryService extends BaseAgendaItemAndListOfSpeakersCont return this.sendBulkActionToBackend(MotionAction.CREATE, payload); } - public async createForwarded(meetingIds: Id[], ...motions: any[]): Promise<{ success: number; partial: number }> { + public async createForwarded( + meetingIds: Id[], + useOriginalSubmitter: boolean, + useOriginalNumber: boolean, + useOriginalVersion: boolean, + ...motions: any[] + ): Promise<{ success: number; partial: number }> { const payloads: any[][] = []; motions.forEach(motion => { payloads.push( meetingIds.map(id => { return { meeting_id: id, + use_original_submitter: useOriginalSubmitter, + use_original_number: useOriginalNumber, + with_amendments: useOriginalVersion, ...motion }; }) diff --git a/client/src/app/site/pages/meetings/pages/motions/components/motion-forward-dialog/components/motion-forward-dialog/motion-forward-dialog.component.html b/client/src/app/site/pages/meetings/pages/motions/components/motion-forward-dialog/components/motion-forward-dialog/motion-forward-dialog.component.html index 70df28e0b1..3224342d6a 100644 --- a/client/src/app/site/pages/meetings/pages/motions/components/motion-forward-dialog/components/motion-forward-dialog/motion-forward-dialog.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/components/motion-forward-dialog/components/motion-forward-dialog/motion-forward-dialog.component.html @@ -1,55 +1,127 @@
{{ data.motion.length > 1 ? 'Forward motions' : ('Forwarding of motion' | translate) }} - @if (data.motion.length === 1) { - {{ data.motion[0].number }} - }
@if (data.motion.length === 1) { - +
{{ 'State' | translate }}: - {{ data.motion[0].state.name }} {{ data.motion[0].state_extension }} - - } - @if (data.motion.length === 1 && activeMeetingCommitteeName) { -
+ {{ data.motion[0].state.name }} +
} - @if (activeMeetingCommitteeName) { - - {{ 'Submitter (in target meeting)' | translate }}: - {{ activeMeetingCommitteeName }} - - } -
- @for (committee of committeesObservable | async; track committee) { - @if (committee.meetings?.length) { -
-

{{ committee.name }}

- @for (meeting of committee.meetings; track meeting) { -
- - {{ meeting.name }} - @if (meeting.start_time || meeting.end_time) { + + + + + + + + + + + + +
+ @if (rowName === 'motion_version') { + {{ 'Motion version' | translate }} + } @else if (rowName === 'submitter') { + {{ 'Submitter' | translate }} + } @else if (rowName === 'identifier') { + {{ 'Identifier' | translate }} + } @else if (rowName === 'meeting') { + {{ 'Meetings' | translate }} + } + + @if (rowName === 'motion_version') { + + + + {{ 'Original motion text with amendments/change recommendations' | translate }} + + + {{ 'Final version' | translate }} + + + + } @else if (rowName === 'submitter') { + + + + {{ 'original submitter name' | translate }} + @if (data.motion.length === 1 && data.motion[0].submitterNames.length > 0) { + + + + {{ submitter }} + + + + } @else if (data.motion.length === 1 && data.motion[0].submitterNames.length === 0) { + + {{ showActiveMeetingName() }} + + } + + + {{ 'committee name' | translate }} + @if (activeMeetingCommitteeName) { + + ({{ activeMeetingCommitteeName }}) + + } + + + + } @else if (rowName === 'identifier') { + + + + {{ 'original identifier' | translate }} + @if (data.motion.length === 1) { -  ·  - + {{ data.motion[0].number }} } - - - } - - } - } - + + + {{ 'without identifier' | translate }} + + + + } @else if (rowName === 'meeting') { + + @for (committee of committeesObservable | async; track committee) { + @if (committee.meetings?.length) { +
+

{{ committee.name }}

+ @for (meeting of committee.meetings; track meeting) { +
+ + {{ meeting.name }} + @if (meeting.start_time || meeting.end_time) { + +  ·  + + + } + +
+ } +
+ } + } +
+ } +