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