From bff95b85f8530d3bb83fe384c8ee7b451bf765af Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:00:15 +0200 Subject: [PATCH] Add extension submitter to export (#4127) --- .../motion-csv-export.service/motion-csv-export.service.ts | 7 ++++++- .../motion-xlsx-export.service.ts | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts index 8a767df277..230735851b 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-csv-export.service/motion-csv-export.service.ts @@ -102,7 +102,12 @@ export class MotionCsvExportService { const properties = sortMotionPropertyList([`number`, `title`].concat(contentToExport)); const exportProperties: (CsvColumnDefinitionProperty | CsvColumnDefinitionMap)[] = properties.map(option => { - if (option === `recommendation`) { + if (option === `submitters`) { + return { + label: `submitters`, + map: motion => motion.mapSubmittersWithAdditional(s => s.short_name).join(`, `) + }; + } else if (option === `recommendation`) { return { label: `recommendation`, map: motion => this.motionService.getExtendedRecommendationLabel(motion) diff --git a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts index 465c3d0279..62f38f3ee3 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts @@ -158,6 +158,9 @@ export class MotionXlsxExportService { data.push( ...properties.map(property => { const motionProp = motion[property as keyof ViewMotion]; + if (property === `submitters`) { + return motion.mapSubmittersWithAdditional(s => s.short_name).join(`, `); + } if (property === `speakers`) { return motion.list_of_speakers && motion.list_of_speakers.waitingSpeakerAmount > 0 ? motion.list_of_speakers.waitingSpeakerAmount