Fix: Nombre del archivo PDF modelo en el fetch
This commit is contained in:
@@ -311,7 +311,7 @@ export function HistoriaClinica({
|
|||||||
<Button variant="outline" className="bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100" onClick={async (e) => {
|
<Button variant="outline" className="bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100" onClick={async (e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
try {
|
try {
|
||||||
const existingPdfBytes = await fetch('/MODELO%20INGRESO.pdf').then(res => res.arrayBuffer());
|
const existingPdfBytes = await fetch('/MODELO_INGRESO.pdf').then(res => res.arrayBuffer());
|
||||||
const pdfDoc = await PDFDocument.load(existingPdfBytes);
|
const pdfDoc = await PDFDocument.load(existingPdfBytes);
|
||||||
const form = pdfDoc.getForm();
|
const form = pdfDoc.getForm();
|
||||||
const edad = paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) : '';
|
const edad = paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user