se agregó cupo máximo

This commit is contained in:
evenegas
2025-10-03 12:01:18 -06:00
parent 00e758f0ef
commit e4c2a16c8e
+10 -1
View File
@@ -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); console.log("Valor de la plantilla: ", plantilla);
if (plantilla !== null && plantilla !== undefined) { if (plantilla !== null && plantilla !== undefined) {
console.log("Tipo de la plantilla: ", PLANTILLA_MAP[plantilla]); console.log("Tipo de la plantilla: ", PLANTILLA_MAP[plantilla]);
@@ -145,6 +145,7 @@ export class CuestionarioService {
console.log("fecha fin desde ecxel: ",qRow.getCell(5).value as string); console.log("fecha fin desde ecxel: ",qRow.getCell(5).value as string);
const fecha_inicio = new Date(qRow.getCell(5).value as string); const fecha_inicio = new Date(qRow.getCell(5).value as string);
console.log("Fecha de inicio: ", fecha_inicio); console.log("Fecha de inicio: ", fecha_inicio);
const fecha_fin = new Date(qRow.getCell(6).value as string); const fecha_fin = new Date(qRow.getCell(6).value as string);
console.log("Fecha de fin: ", fecha_fin); console.log("Fecha de fin: ", fecha_fin);
@@ -154,6 +155,9 @@ export class CuestionarioService {
if (!base) throw new Error(`Plantilla ${plantillaId} no encontrada`); if (!base) throw new Error(`Plantilla ${plantillaId} no encontrada`);
console.log("ID de la plantilla: ", plantillaId); console.log("ID de la plantilla: ", plantillaId);
console.log("Base de la plantilla: ", base); 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 = { const createDto: CreateEventoWithCuestionarioDto = {
evento: eventoDto, evento: eventoDto,
@@ -162,6 +166,10 @@ export class CuestionarioService {
fecha_inicio, fecha_inicio,
fecha_fin, fecha_fin,
id_tipo_evento, 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), fecha_fin: new Date(qRow.getCell(6).value as string),
id_tipo_cuestionario: Number(qRow.getCell(7).value), id_tipo_cuestionario: Number(qRow.getCell(7).value),
id_tipo_evento: Number(qRow.getCell(8).value), // obligatorio id_tipo_evento: Number(qRow.getCell(8).value), // obligatorio
cupo_maximo: Number(qRow.getCell(9).value) || undefined,
secciones, secciones,
}, },
}; };