Adds extended label to pdf-export

This commit is contained in:
GabrielMeyer 2019-06-17 13:55:42 +02:00
parent 295c69e3fb
commit f63838ff83
2 changed files with 3 additions and 5 deletions

View File

@ -128,7 +128,7 @@ export class MotionPdfCatalogService {
if (categories && categories.length) { if (categories && categories.length) {
const catTocBody = []; 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 // push the name of the category
// make a table for correct alignment // make a table for correct alignment
catTocBody.push({ catTocBody.push({
@ -136,7 +136,7 @@ export class MotionPdfCatalogService {
body: [ body: [
[ [
{ {
text: category.prefix ? category.prefix + ' - ' + category.name : category.name, text: category.prefixedNameWithParents,
style: 'tocCategoryTitle' style: 'tocCategoryTitle'
} }
] ]

View File

@ -271,9 +271,7 @@ export class MotionPdfService {
style: 'boldText' style: 'boldText'
}, },
{ {
text: motion.category.prefix text: motion.category.prefixedNameWithParents
? `${motion.category.prefix} - ${motion.category.name}`
: `${motion.category.name}`
} }
]); ]);
} }