Merge pull request #5529 from tsiegleauq/export-dialog-supporter
Add "supporter" to motion export dialog
This commit is contained in:
commit
38af3d3b8a
@ -21,6 +21,7 @@ export const PERSONAL_NOTE_ID = -1;
|
|||||||
*/
|
*/
|
||||||
export type InfoToExport =
|
export type InfoToExport =
|
||||||
| 'submitters'
|
| 'submitters'
|
||||||
|
| 'supporters'
|
||||||
| 'state'
|
| 'state'
|
||||||
| 'recommendation'
|
| 'recommendation'
|
||||||
| 'category'
|
| 'category'
|
||||||
@ -99,6 +100,7 @@ export enum MotionEditNotificationType {
|
|||||||
export const motionImportExportHeaderOrder: string[] = [
|
export const motionImportExportHeaderOrder: string[] = [
|
||||||
'identifier',
|
'identifier',
|
||||||
'submitters',
|
'submitters',
|
||||||
|
'supporters',
|
||||||
'title',
|
'title',
|
||||||
'text',
|
'text',
|
||||||
'reason',
|
'reason',
|
||||||
|
@ -247,23 +247,25 @@ export class MotionPdfService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// supporters
|
// supporters
|
||||||
const minSupporters = this.configService.instant<number>('motions_min_supporters');
|
if (!infoToExport || infoToExport.includes('supporters')) {
|
||||||
if (minSupporters && motion.supporters.length > 0) {
|
const minSupporters = this.configService.instant<number>('motions_min_supporters');
|
||||||
const supporters = motion.supporters
|
if (!!minSupporters && motion.supporters.length > 0) {
|
||||||
.map(supporter => {
|
const supporters = motion.supporters
|
||||||
return supporter.full_name;
|
.map(supporter => {
|
||||||
})
|
return supporter.full_name;
|
||||||
.join(', ');
|
})
|
||||||
|
.join(', ');
|
||||||
|
|
||||||
metaTableBody.push([
|
metaTableBody.push([
|
||||||
{
|
{
|
||||||
text: `${this.translate.instant('Supporters')}:`,
|
text: `${this.translate.instant('Supporters')}:`,
|
||||||
style: 'boldText'
|
style: 'boldText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: supporters
|
text: supporters
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// state
|
// state
|
||||||
|
Loading…
Reference in New Issue
Block a user