Skip to content

Commit

Permalink
Add a sorting to motion supporters in PDF export (#3545)
Browse files Browse the repository at this point in the history
Use naturalSort (firstname, lastname) like in the motion-detail view.
  • Loading branch information
reiterl authored Apr 16, 2024
1 parent 26223d8 commit e0dce0c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ export class MotionPdfService {
if (!infoToExport || infoToExport.includes(`supporter_users`)) {
const minSupporters = this.meetingSettingsService.instant(`motions_supporters_min_amount`);
if (minSupporters && motion.supporter_users.length > 0) {
const supporters = motion.supporter_users.map(supporter => supporter.full_name).join(`, `);
const supporters = motion.supporter_users
.naturalSort(this.translate.currentLang, [`first_name`, `last_name`])
.map(supporter => supporter.full_name)
.join(`, `);

metaTableBody.push([
{
Expand Down

0 comments on commit e0dce0c

Please sign in to comment.