|
|
@@ -59,6 +59,12 @@ export class OperationsLearningReportsComponent implements OnInit, OnDestroy {
|
|
|
readonly reportVariant = signal<ReportVariant>('full');
|
|
|
private readonly worksheetWords = signal<LearningReportWord[]>([]);
|
|
|
readonly displayWords = computed(() => this.reportVariant() === 'full' ? (this.detail()?.words || []) : this.worksheetWords());
|
|
|
+ readonly worksheetRows = computed(() => {
|
|
|
+ const words = this.displayWords();
|
|
|
+ const rows: Array<[LearningReportWord, LearningReportWord?]> = [];
|
|
|
+ for (let index = 0; index < words.length; index += 2) rows.push([words[index], words[index + 1]]);
|
|
|
+ return rows;
|
|
|
+ });
|
|
|
readonly reportTitle = computed(() => reportTitles[this.reportVariant()]);
|
|
|
readonly reviewSchedule = computed(() => this.detail() ? printableReviewSchedule(this.detail()!) : []);
|
|
|
readonly hasInferredReviewDates = computed(() => this.reviewSchedule().some((item) => item.inferred));
|
|
|
@@ -247,7 +253,7 @@ export class OperationsLearningReportsComponent implements OnInit, OnDestroy {
|
|
|
image: { type: 'jpeg', quality: 1 },
|
|
|
html2canvas: { scale: 1.5, logging: false, useCORS: true, backgroundColor: '#ffffff' },
|
|
|
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
|
|
|
- pagebreak: { mode: ['css', 'legacy'], avoid: ['.report-summary article', '.word-row', '.review-table', '.worksheet-hint', '.pdf-footer', '.comment-card'] },
|
|
|
+ pagebreak: { mode: ['css', 'legacy'], avoid: ['.report-summary article', '.word-row', '.review-section', '.worksheet-hint', '.pdf-footer', '.comment-card'] },
|
|
|
}).from(element).toCanvas().get('canvas', (canvas) => {
|
|
|
const pageHeight = Math.floor(canvas.width * (279 / 192));
|
|
|
const trailingSlice = canvas.height % pageHeight;
|