From e4c2a16c8e01776ab4cf520e5783e33fdfefc8a4 Mon Sep 17 00:00:00 2001 From: evenegas Date: Fri, 3 Oct 2025 12:01:18 -0600 Subject: [PATCH] =?UTF-8?q?se=20agreg=C3=B3=20cupo=20m=C3=A1ximo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cuestionario/cuestionario.service.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/cuestionario/cuestionario.service.ts b/src/cuestionario/cuestionario.service.ts index ee27255..295743d 100644 --- a/src/cuestionario/cuestionario.service.ts +++ b/src/cuestionario/cuestionario.service.ts @@ -136,7 +136,7 @@ export class CuestionarioService { - const plantilla = qRow.getCell(9).value ? Number(qRow.getCell(9).value) : null; + const plantilla = qRow.getCell(10).value ? Number(qRow.getCell(10).value) : null; console.log("Valor de la plantilla: ", plantilla); if (plantilla !== null && plantilla !== undefined) { console.log("Tipo de la plantilla: ", PLANTILLA_MAP[plantilla]); @@ -144,6 +144,7 @@ export class CuestionarioService { if (plantilla && PLANTILLA_MAP[plantilla]) { console.log("fecha fin desde ecxel: ",qRow.getCell(5).value as string); const fecha_inicio = new Date(qRow.getCell(5).value as string); + console.log("Fecha de inicio: ", fecha_inicio); const fecha_fin = new Date(qRow.getCell(6).value as string); @@ -154,7 +155,10 @@ export class CuestionarioService { if (!base) throw new Error(`Plantilla ${plantillaId} no encontrada`); console.log("ID de la plantilla: ", plantillaId); console.log("Base de la plantilla: ", base); - + const nombre_form= qRow.getCell(3).value as string; + const descripcion= qRow.getCell(4).value as string; + const cupo_maximo= Number(qRow.getCell(9).value) || undefined; + const createDto: CreateEventoWithCuestionarioDto = { evento: eventoDto, cuestionario: { @@ -162,6 +166,10 @@ export class CuestionarioService { fecha_inicio, fecha_fin, id_tipo_evento, + nombre_form, + descripcion, + cupo_maximo, // Aquí puedes agregar más campos si es necesario + }, }; @@ -212,6 +220,7 @@ export class CuestionarioService { fecha_fin: new Date(qRow.getCell(6).value as string), id_tipo_cuestionario: Number(qRow.getCell(7).value), id_tipo_evento: Number(qRow.getCell(8).value), // obligatorio + cupo_maximo: Number(qRow.getCell(9).value) || undefined, secciones, }, };