feat(sprint-6/etapa-1): logo InQuality en header PDFs (págs 2+) + whitespace-nowrap eficiencia
Some checks failed
/ Deploy to Cloudflare Pages (push) Has been cancelled
Some checks failed
/ Deploy to Cloudflare Pages (push) Has been cancelled
This commit is contained in:
@@ -45,42 +45,21 @@ export function drawRoiPage1(
|
|||||||
// ── 5.1 Header denso de página 1 ─────────────────────────────────────────────
|
// ── 5.1 Header denso de página 1 ─────────────────────────────────────────────
|
||||||
|
|
||||||
function _drawDenseHeader(
|
function _drawDenseHeader(
|
||||||
doc: DocLike, pageW: number, m: number, cW: number, y: number
|
doc: DocLike, _pageW: number, m: number, cW: number, y: number
|
||||||
): number {
|
): number {
|
||||||
const right = pageW - m
|
|
||||||
|
|
||||||
// Izquierda: "InQ ROI" 22pt bold naranja
|
// Izquierda: "InQ ROI" 22pt bold naranja
|
||||||
doc.setFont('helvetica', 'bold')
|
doc.setFont('helvetica', 'bold')
|
||||||
doc.setFontSize(22)
|
doc.setFontSize(22)
|
||||||
doc.setTextColor(...C.heroOrange)
|
doc.setTextColor(...C.heroOrange)
|
||||||
doc.text('InQ ROI', m, y)
|
doc.text('InQ ROI', m, y)
|
||||||
|
|
||||||
// Derecha: "UN PRODUCTO DE" 9pt slate-400
|
|
||||||
doc.setFont('helvetica', 'normal')
|
|
||||||
doc.setFontSize(9)
|
|
||||||
doc.setTextColor(...PDF_COLORS.textDisabled)
|
|
||||||
doc.text('UN PRODUCTO DE', right, y, { align: 'right' } as Record<string, unknown>)
|
|
||||||
y += 9
|
y += 9
|
||||||
|
|
||||||
// Izquierda: subtítulo 9pt slate-400 (margin-top 4mm ya incluido en line-height)
|
// Izquierda: subtítulo 9pt slate-400
|
||||||
doc.setFont('helvetica', 'normal')
|
doc.setFont('helvetica', 'normal')
|
||||||
doc.setFontSize(9)
|
doc.setFontSize(9)
|
||||||
doc.setTextColor(...PDF_COLORS.textDisabled)
|
doc.setTextColor(...PDF_COLORS.textDisabled)
|
||||||
doc.text('ANÁLISIS DE RETORNO DE INVERSIÓN', m, y)
|
doc.text('ANÁLISIS DE RETORNO DE INVERSIÓN', m, y)
|
||||||
|
y += 16
|
||||||
// Derecha: "InQ" 16pt bold slate-600
|
|
||||||
doc.setFont('helvetica', 'bold')
|
|
||||||
doc.setFontSize(16)
|
|
||||||
doc.setTextColor(...PDF_COLORS.textSecondary)
|
|
||||||
doc.text('InQ', right, y, { align: 'right' } as Record<string, unknown>)
|
|
||||||
y += 6
|
|
||||||
|
|
||||||
// Derecha: "InQuality" 9pt slate-500
|
|
||||||
doc.setFont('helvetica', 'normal')
|
|
||||||
doc.setFontSize(9)
|
|
||||||
doc.setTextColor(...PDF_COLORS.textTertiary)
|
|
||||||
doc.text('InQuality', right, y, { align: 'right' } as Record<string, unknown>)
|
|
||||||
y += 10
|
|
||||||
|
|
||||||
// Border-bottom naranja 0.8mm
|
// Border-bottom naranja 0.8mm
|
||||||
doc.setDrawColor(...C.heroOrange)
|
doc.setDrawColor(...C.heroOrange)
|
||||||
|
|||||||
@@ -347,10 +347,9 @@ export function drawScenarioPage1(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _drawScenarioDenseHeader(
|
function _drawScenarioDenseHeader(
|
||||||
doc: DocLike, pageW: number, m: number, cW: number,
|
doc: DocLike, _pageW: number, m: number, cW: number,
|
||||||
tab: 'actual' | 'automatizado', y: number
|
tab: 'actual' | 'automatizado', y: number
|
||||||
): number {
|
): number {
|
||||||
const right = pageW - m
|
|
||||||
const subtitle = tab === 'actual'
|
const subtitle = tab === 'actual'
|
||||||
? 'ANÁLISIS DE COSTOS — ESCENARIO ACTUAL'
|
? 'ANÁLISIS DE COSTOS — ESCENARIO ACTUAL'
|
||||||
: 'ANÁLISIS DE COSTOS — ESCENARIO AUTOMATIZADO'
|
: 'ANÁLISIS DE COSTOS — ESCENARIO AUTOMATIZADO'
|
||||||
@@ -359,29 +358,13 @@ function _drawScenarioDenseHeader(
|
|||||||
doc.setFontSize(22)
|
doc.setFontSize(22)
|
||||||
doc.setTextColor(..._SC.orange)
|
doc.setTextColor(..._SC.orange)
|
||||||
doc.text('InQ ROI', m, y)
|
doc.text('InQ ROI', m, y)
|
||||||
|
|
||||||
doc.setFont('helvetica', 'normal')
|
|
||||||
doc.setFontSize(9)
|
|
||||||
doc.setTextColor(...PDF_COLORS.textDisabled)
|
|
||||||
doc.text('UN PRODUCTO DE', right, y, { align: 'right' } as Record<string, unknown>)
|
|
||||||
y += 9
|
y += 9
|
||||||
|
|
||||||
doc.setFont('helvetica', 'normal')
|
doc.setFont('helvetica', 'normal')
|
||||||
doc.setFontSize(9)
|
doc.setFontSize(9)
|
||||||
doc.setTextColor(...PDF_COLORS.textDisabled)
|
doc.setTextColor(...PDF_COLORS.textDisabled)
|
||||||
doc.text(subtitle, m, y)
|
doc.text(subtitle, m, y)
|
||||||
|
y += 16
|
||||||
doc.setFont('helvetica', 'bold')
|
|
||||||
doc.setFontSize(16)
|
|
||||||
doc.setTextColor(...PDF_COLORS.textSecondary)
|
|
||||||
doc.text('InQ', right, y, { align: 'right' } as Record<string, unknown>)
|
|
||||||
y += 6
|
|
||||||
|
|
||||||
doc.setFont('helvetica', 'normal')
|
|
||||||
doc.setFontSize(9)
|
|
||||||
doc.setTextColor(...PDF_COLORS.textTertiary)
|
|
||||||
doc.text('InQuality', right, y, { align: 'right' } as Record<string, unknown>)
|
|
||||||
y += 10
|
|
||||||
|
|
||||||
doc.setDrawColor(..._SC.orange)
|
doc.setDrawColor(..._SC.orange)
|
||||||
doc.setLineWidth(0.8)
|
doc.setLineWidth(0.8)
|
||||||
|
|||||||
Reference in New Issue
Block a user