From 778b0b9b95d529d5ae080a06ece63a76a209d568 Mon Sep 17 00:00:00 2001 From: Araozu Date: Tue, 2 Jan 2024 15:58:31 -0500 Subject: [PATCH] [FE][Certs] Fix RETROEXCAVADORA cert invalid position of custom label --- frontend/src/certGenerator/certs/RETROEXCAVADORA.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/src/certGenerator/certs/RETROEXCAVADORA.ts b/frontend/src/certGenerator/certs/RETROEXCAVADORA.ts index def54c5..82467c9 100644 --- a/frontend/src/certGenerator/certs/RETROEXCAVADORA.ts +++ b/frontend/src/certGenerator/certs/RETROEXCAVADORA.ts @@ -111,10 +111,20 @@ export async function retroexcavadora(props: CertData): Promise yPosition: 8.4, width: 20, height: 1.5, - text: `OPERADOR PROFESIONAL DE RETROEXCAVADORA ${props.certCustomLabel}`, + text: "OPERADOR PROFESIONAL DE RETROEXCAVADORA", size: 40, bold: true, }); + // This is split because if there's a custom label, the text must be split. + const tCourseCustomLabel = hasCustomLabel ? createSimpleText({ + xPosition: 2.2, + yPosition: 8.4 + customLabelYOffset, + width: 20, + height: 1.5, + text: props.certCustomLabel ?? "", + size: 40, + bold: true, + }) : undefined; const imgQR = await getQR({ iid: props.certIId, @@ -252,6 +262,7 @@ export async function retroexcavadora(props: CertData): Promise tName, tContentPart1, tCourse, + tCourseCustomLabel, tTopics, tFinishLabel, certificateDate,