refactor(tournament): clean up placeholder handling in PDF generation
- Removed placeholder variables for missing participant data in the TournamentPlacementsTab component. - Updated the PDF generation logic to use empty strings instead of placeholders for missing data fields, improving the clarity of the generated reports. - Adjusted cell styles to ensure consistent formatting in the PDF output.
This commit is contained in:
@@ -718,9 +718,6 @@ export default {
|
||||
} catch (e) { return d; }
|
||||
};
|
||||
|
||||
const missing = t('tournaments.dataNotRecorded');
|
||||
const linePlaceholder = '____________________';
|
||||
|
||||
// Tabelle
|
||||
const head = [[
|
||||
t('members.firstName') + ' / ' + t('members.lastName'),
|
||||
@@ -733,11 +730,11 @@ export default {
|
||||
|
||||
const body = playersWithMissing.map(p => [
|
||||
p.name,
|
||||
p.birthDate ? formatDate(p.birthDate) : linePlaceholder,
|
||||
p.gender ? formatGender(p.gender) : linePlaceholder,
|
||||
p.address || linePlaceholder,
|
||||
p.phone || linePlaceholder,
|
||||
p.email || linePlaceholder
|
||||
p.birthDate ? formatDate(p.birthDate) : '',
|
||||
p.gender ? formatGender(p.gender) : '',
|
||||
p.address || '',
|
||||
p.phone || '',
|
||||
p.email || ''
|
||||
]);
|
||||
|
||||
autoTable(pdf, {
|
||||
@@ -750,7 +747,8 @@ export default {
|
||||
cellPadding: 3,
|
||||
lineColor: [200, 200, 200],
|
||||
lineWidth: 0.25,
|
||||
valign: 'middle'
|
||||
valign: 'middle',
|
||||
minCellHeight: 10
|
||||
},
|
||||
headStyles: {
|
||||
fillColor: [76, 175, 80],
|
||||
@@ -765,13 +763,6 @@ export default {
|
||||
3: { cellWidth: 50 },
|
||||
4: { cellWidth: 40 },
|
||||
5: { cellWidth: 50 }
|
||||
},
|
||||
didParseCell: (data) => {
|
||||
// Platzhalter-Zeilen grau und kursiv markieren
|
||||
if (data.section === 'body' && data.cell.raw === linePlaceholder) {
|
||||
data.cell.styles.textColor = [180, 180, 180];
|
||||
data.cell.styles.fontStyle = 'italic';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user