diff --git a/client/src/app/site/motions/services/motion-pdf-catalog.service.ts b/client/src/app/site/motions/services/motion-pdf-catalog.service.ts index 6e0b5fbf2..ad773197b 100644 --- a/client/src/app/site/motions/services/motion-pdf-catalog.service.ts +++ b/client/src/app/site/motions/services/motion-pdf-catalog.service.ts @@ -128,7 +128,7 @@ export class MotionPdfCatalogService { if (categories && categories.length) { const catTocBody = []; - for (const category of categories) { + for (const category of categories.sort((a, b) => a.weight - b.weight)) { // push the name of the category // make a table for correct alignment catTocBody.push({ @@ -136,7 +136,7 @@ export class MotionPdfCatalogService { body: [ [ { - text: category.prefix ? category.prefix + ' - ' + category.name : category.name, + text: category.prefixedNameWithParents, style: 'tocCategoryTitle' } ] diff --git a/client/src/app/site/motions/services/motion-pdf.service.ts b/client/src/app/site/motions/services/motion-pdf.service.ts index 2f6ccc30d..90f32efa3 100644 --- a/client/src/app/site/motions/services/motion-pdf.service.ts +++ b/client/src/app/site/motions/services/motion-pdf.service.ts @@ -271,9 +271,7 @@ export class MotionPdfService { style: 'boldText' }, { - text: motion.category.prefix - ? `${motion.category.prefix} - ${motion.category.name}` - : `${motion.category.name}` + text: motion.category.prefixedNameWithParents } ]); }