Improved users PDF and CSV export
- PDF: use full_name (with structure_level and number) instead of short_name. - CSV: add gender column
This commit is contained in:
parent
6b25e62cec
commit
2b163af5d7
@ -79,7 +79,7 @@ export class MotionBlockDetailComponent extends ListViewBaseComponent<ViewMotion
|
||||
* Sets the title, observes the block and the motions belonging in this block
|
||||
*/
|
||||
public ngOnInit(): void {
|
||||
super.setTitle('Motion Block');
|
||||
super.setTitle('Motion block');
|
||||
this.initTable();
|
||||
|
||||
this.blockEditForm = new FormGroup({
|
||||
|
@ -253,7 +253,8 @@ export class UserListComponent extends ListViewBaseComponent<ViewUser, User> imp
|
||||
{ property: 'is_present', label: 'Is present' },
|
||||
{ property: 'is_committee', label: 'Is a committee' },
|
||||
{ property: 'default_password', label: 'Initial password' },
|
||||
{ property: 'email' }
|
||||
{ property: 'email' },
|
||||
{ property: 'gender' }
|
||||
],
|
||||
this.translate.instant('Participants') + '.csv'
|
||||
);
|
||||
|
@ -242,10 +242,6 @@ export class UserPdfService {
|
||||
text: this.translate.instant('Name'),
|
||||
style: 'tableHeader'
|
||||
},
|
||||
{
|
||||
text: this.translate.instant('Structure level'),
|
||||
style: 'tableHeader'
|
||||
},
|
||||
{
|
||||
text: this.translate.instant('Groups'),
|
||||
style: 'tableHeader'
|
||||
@ -254,7 +250,7 @@ export class UserPdfService {
|
||||
];
|
||||
return {
|
||||
table: {
|
||||
widths: ['auto', '*', 'auto', 'auto'],
|
||||
widths: ['auto', '*', 'auto'],
|
||||
headerRows: 1,
|
||||
body: userTableBody.concat(this.getListUsers(users))
|
||||
},
|
||||
@ -274,12 +270,7 @@ export class UserPdfService {
|
||||
let counter = 1;
|
||||
users.forEach(user => {
|
||||
const groupList = user.groups.map(grp => this.translate.instant(grp.name));
|
||||
result.push([
|
||||
{ text: '' + counter },
|
||||
{ text: user.short_name },
|
||||
{ text: user.structure_level },
|
||||
{ text: groupList.join(', ') }
|
||||
]);
|
||||
result.push([{ text: '' + counter }, { text: user.full_name }, { text: groupList.join(', ') }]);
|
||||
counter += 1;
|
||||
});
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user