Adjust report layout for title, columns, and date format

Remove manual column reversal for RTL rendering and enforce LTR for footer date to fix display issues.
This commit is contained in:
Riyadh
2026-05-04 10:32:22 +00:00
parent f9e78202ed
commit 691b5f9245
@@ -235,13 +235,11 @@ function buildMeetingRow(meeting: PdfMeeting, input: RenderPdfInput): string {
const after = cellsLtr.slice(endIdx + 1);
const merged: TableCell[] = [...before, mergedCell, ...after];
const cells = isRtl ? [...merged].reverse() : merged;
return `<tr style="${bgStyle}">${renderCells(cells)}</tr>`;
return `<tr style="${bgStyle}">${renderCells(merged)}</tr>`;
}
}
const cells = isRtl ? [...cellsLtr].reverse() : cellsLtr;
return `<tr style="${bgStyle}">${renderCells(cells)}</tr>`;
return `<tr style="${bgStyle}">${renderCells(cellsLtr)}</tr>`;
}
export function buildScheduleHtml(input: RenderPdfInput): string {
@@ -254,10 +252,8 @@ export function buildScheduleHtml(input: RenderPdfInput): string {
const fontData = getFontBase64(input.font.fontFamily);
const fontFaceName = "ScheduleFont";
const headerLabelsLtr = [input.labels.no, input.labels.meeting, input.labels.attendees, input.labels.time];
const headerLabels = isRtl ? [...headerLabelsLtr].reverse() : headerLabelsLtr;
const colWidthsLtr = ["8%", "30%", "42%", "20%"];
const colWidths = isRtl ? [...colWidthsLtr].reverse() : colWidthsLtr;
const headerLabels = [input.labels.no, input.labels.meeting, input.labels.attendees, input.labels.time];
const colWidths = ["8%", "30%", "42%", "20%"];
const logoHtml = input.logo && input.logo.length > 0
? `<img src="data:image/png;base64,${input.logo.toString("base64")}" style="height:50px;width:auto;" />`
@@ -449,7 +445,7 @@ tr {
<div class="page-footer">
<div class="recorded-by">${esc(input.labels.recordedBy)}</div>
<div class="date-line">${esc(longDate)}</div>
<div class="date-line" dir="ltr">${esc(longDate)}</div>
</div>
</body>