[FE][Certs] Generate preview certs with code 0000
This commit is contained in:
parent
e8e5835236
commit
a0bf96a4c1
@ -1,4 +1,4 @@
|
||||
import { For, Match, Show, createEffect, createMemo, createSignal } from "solid-js";
|
||||
import { For, Show, createEffect, createMemo, createSignal } from "solid-js";
|
||||
import { Person } from "../../types/Person";
|
||||
import { Register } from "../../types/Register";
|
||||
import { courseMap } from "../../utils/allCourses";
|
||||
@ -159,12 +159,13 @@ function RegisterEl(props: {register: Register, person: Person, onClick: () => v
|
||||
? ""
|
||||
: customLabelsMap()[register.register_custom_label]?.custom_label_value ?? "";
|
||||
|
||||
const certCode = register.register_is_preview ? "0000" : register.register_code.toString().padStart(4, "0");
|
||||
|
||||
generator(`${courseN} - ${personFullName}.docx`, {
|
||||
matpel: null,
|
||||
personFullName,
|
||||
personDni: person.person_dni.toString(),
|
||||
certCode: register.register_code.toString().padStart(4, "0"),
|
||||
certCode,
|
||||
certYear: year,
|
||||
certMonth: month,
|
||||
certDay: day,
|
||||
|
Loading…
Reference in New Issue
Block a user