Merge pull request #4716 from emanuelschuetze/userExport

Improved users PDF and CSV export
This commit is contained in:
Emanuel Schütze 2019-05-14 20:37:08 +02:00 committed by GitHub
commit 0b22688a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 13 deletions

View File

@ -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({

View File

@ -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'
);

View File

@ -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;