develop #10
Generated
+105
-1
@@ -16,7 +16,8 @@
|
||||
"next": "15.2.4",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-hot-toast": "^2.5.2"
|
||||
"react-hot-toast": "^2.5.2",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
@@ -1444,6 +1445,15 @@
|
||||
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adler-32": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
|
||||
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
@@ -1914,6 +1924,19 @@
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/cfb": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
|
||||
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"adler-32": "~1.3.0",
|
||||
"crc-32": "~1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
@@ -1975,6 +1998,15 @@
|
||||
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/codepage": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
|
||||
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/color": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||
@@ -2039,6 +2071,18 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/crc-32": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
|
||||
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"crc32": "bin/crc32.njs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
@@ -3020,6 +3064,15 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/frac": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
|
||||
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
@@ -4957,6 +5010,18 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ssf": {
|
||||
"version": "0.11.2",
|
||||
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
|
||||
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"frac": "~1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/stable-hash": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
|
||||
@@ -5545,6 +5610,24 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/wmf": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
|
||||
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/word": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
|
||||
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/word-wrap": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
|
||||
@@ -5555,6 +5638,27 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xlsx": {
|
||||
"version": "0.18.5",
|
||||
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
|
||||
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"adler-32": "~1.3.0",
|
||||
"cfb": "~1.2.1",
|
||||
"codepage": "~1.15.0",
|
||||
"crc-32": "~1.2.1",
|
||||
"ssf": "~0.11.2",
|
||||
"wmf": "~1.0.1",
|
||||
"word": "~0.3.0"
|
||||
},
|
||||
"bin": {
|
||||
"xlsx": "bin/xlsx.njs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
|
||||
+2
-1
@@ -19,7 +19,8 @@
|
||||
"next": "15.2.4",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-hot-toast": "^2.5.2"
|
||||
"react-hot-toast": "^2.5.2",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
%PDF-1.3
|
||||
%ÿÿÿÿ
|
||||
8 0 obj
|
||||
<<
|
||||
/Type /ExtGState
|
||||
/ca 1
|
||||
>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<<
|
||||
/Type /ExtGState
|
||||
/ca 1
|
||||
/CA 1
|
||||
>>
|
||||
endobj
|
||||
12 0 obj
|
||||
<<
|
||||
/Type /ExtGState
|
||||
/CA 1
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<<
|
||||
/Type /Page
|
||||
/Parent 1 0 R
|
||||
/MediaBox [0 0 595.28 841.89]
|
||||
/Contents 5 0 R
|
||||
/Resources 6 0 R
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<<
|
||||
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
|
||||
/ExtGState <<
|
||||
/Gs1 8 0 R
|
||||
/Gs2 9 0 R
|
||||
/Gs3 12 0 R
|
||||
>>
|
||||
/Font <<
|
||||
/F1 10 0 R
|
||||
/F2 11 0 R
|
||||
/F3 13 0 R
|
||||
>>
|
||||
/ColorSpace <<
|
||||
>>
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<<
|
||||
/Length 1506
|
||||
/Filter /FlateDecode
|
||||
>>
|
||||
stream
|
||||
xœÍZ]k\7}¿¿B cÍ·f’¶�<Úø-äÁìî--u¡5´¿è~î:«Ôñ]¥Á{Œsæh4sf5†bx…!†$)‡ýC‡áŸîÃÇá‹á·.†w�DÐ@dàÁ- †¿ŽÝÍwÇ¿Ý~û:ì»)Ìÿ÷t7o1üòØõ—@1�]–I Ò›ò5 y…|!Ó›·�T~zò÷Ô¿ì»?;¼´¯ï¦ßc@r`ž§p÷ÐÝü€%Üõ݇[U9JVUR–,²Ã Å]ˆÃÝ»îû»î§«�!rÀ˜jlä(8ù/\úbË¾ŽŒu¸ÃªNñ8°¥—ƒ`6)'ª²Ñ^ ¼îô°Ïš$KuרªÁS&Y\ÓäÚv!
|
||||
98炪ìw!—‘ñ{«üĩʬÍN¯VõªÊ*ª"¥&”›Ô¥*eU�E#T5©þLVmÀ9d¿G9^?A
|
||||
�Ý‚‹+-Lì)“5[äEL€ŸaÑ*’¤ªWUVÚšRré!Ò·Èv°:Í-|*�[}ý|`9h\{C�”<f�¹èDlojll¹g;òýت"#Uy°õv°ìrl± ÈejÎM¬Eæ£d©9õèd½ù.`·NãwC;X›âgH©ÊFÐØÅÕ°0y…n�Ùh™W9^¨Xöh-ÊÞÌæ¸Ñî'ÖºÓ¯WwÈ"RcÒºò\ÀSÕ{«Ò+bcU¯ú™Úk’òî@BoýPn¤áÖŽ†&Mj?äLUS*ºŒl¦P웦d#ù¿ã‚ÉÀо40M>$(V·ˆ‰#«–JE'¿ß…"ÑÖ䣂^‡í—ÙJ†
|
||||
óÃ3D«ñ`äH=GêçÀ4 %Ðôéˆc8®\>B6:N!;$L5F�>¸—C–VñºorHÁÄàX
|
||||
¾�9W>#ËYð×9O™œÑº8Lœ&i¦a–6š¿Ÿró~âþþÍ�em\Ööþòñã¡cbPÚy†ñЕéÊVÈ3Œ‡NU€Ò@^¥eKÁ¢@ôªÄô¼ÊÿajÒEŒ¯ßœ‰¼ôÆ
|
||||
!6´£‰åÒ‚J#hp>d0†D§é•õCâë+�FP±çúo19L<Ì«*(¹˜Ž‰áåçžò×÷tY@¥vCøåõ½\Ð £¹ò䊀ÉÍ-�'Wò'sdÑOälnb A:‘ÞÁÜ(½ä,›[ Ï0VéÝy†±Jï³!¯QfšÀ<hrÈ„moå$ȦN-úz$ˆ(5ÿthâ3‹U×<¬u^
|
||||
Êb»0ô´cÑ›J;÷š:�æ½Æ0U7�h»GH9}~ž¬´ªçBÀ‹žkÙªçàln�\|„œÍ-�‹€OËžÌ-�‹€��³¹‰e¤ ò‰žæF=Ÿ g-Þy†±êùÈ3ŒUÏŸ
|
||||
y•©¦@ÌÔÒ…ÊR/ÝulÑh„˜Q�EYG…\_¹Ò0ÐüTW®ªá•¨E
|
||||
¿Ì ¥†W×ü® dÑpWÐ>ÎæÈE´GÈÙܹˆö´ìÉܹˆö9››XÆòÿOÜ7lË‚°ª÷ËáNVå~9Ü ÂªÚÏ„»ÒXQÙÁç*:y!'çì6CfGˆ"5®Ápª:õy¦Ünº€ÄÀV_¶Ž—_ƒb÷Îeª-�n=<ƒZ�Ç&ÓÔâ2Õ|RšÏ@4l“ÁÊ•2^’]xfÃkÁåeÞô¨I(UY4ž»sªzeÁá}侌ћ]¼ró©ÎCºëxÔmyÑ„©Ê¦¿ÆW“ð!
|
||||
7”O óp!XB('O%,[ß4Š2[•Ô7ENzébÕÙx‰žÁ´é–u˜Æ4
|
||||
¦€1Õ¸}³Áž¸²"$9s9Ù�ñôRÊ£�/§½iÊ]�WH”-
|
||||
·MŒA¥âûÒ•pŠluÊ÷Œ,|ÏÂ~æý_eϸ
|
||||
endstream
|
||||
endobj
|
||||
15 0 obj
|
||||
(pdfmake)
|
||||
endobj
|
||||
16 0 obj
|
||||
(pdfmake)
|
||||
endobj
|
||||
17 0 obj
|
||||
(D:20250410211447Z)
|
||||
endobj
|
||||
14 0 obj
|
||||
<<
|
||||
/Producer 15 0 R
|
||||
/Creator 16 0 R
|
||||
/CreationDate 17 0 R
|
||||
>>
|
||||
endobj
|
||||
10 0 obj
|
||||
<<
|
||||
/Type /Font
|
||||
/BaseFont /Helvetica-Bold
|
||||
/Subtype /Type1
|
||||
/Encoding /WinAnsiEncoding
|
||||
>>
|
||||
endobj
|
||||
11 0 obj
|
||||
<<
|
||||
/Type /Font
|
||||
/BaseFont /Helvetica
|
||||
/Subtype /Type1
|
||||
/Encoding /WinAnsiEncoding
|
||||
>>
|
||||
endobj
|
||||
13 0 obj
|
||||
<<
|
||||
/Type /Font
|
||||
/BaseFont /Helvetica-Oblique
|
||||
/Subtype /Type1
|
||||
/Encoding /WinAnsiEncoding
|
||||
>>
|
||||
endobj
|
||||
4 0 obj
|
||||
<<
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<<
|
||||
/Type /Catalog
|
||||
/Pages 1 0 R
|
||||
/Names 2 0 R
|
||||
>>
|
||||
endobj
|
||||
1 0 obj
|
||||
<<
|
||||
/Type /Pages
|
||||
/Count 1
|
||||
/Kids [7 0 R]
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/Dests <<
|
||||
/Names [
|
||||
]
|
||||
>>
|
||||
>>
|
||||
endobj
|
||||
xref
|
||||
0 18
|
||||
0000000000 65535 f
|
||||
0000002578 00000 n
|
||||
0000002635 00000 n
|
||||
0000002516 00000 n
|
||||
0000002495 00000 n
|
||||
0000000445 00000 n
|
||||
0000000264 00000 n
|
||||
0000000154 00000 n
|
||||
0000000015 00000 n
|
||||
0000000059 00000 n
|
||||
0000002188 00000 n
|
||||
0000002291 00000 n
|
||||
0000000109 00000 n
|
||||
0000002389 00000 n
|
||||
0000002112 00000 n
|
||||
0000002024 00000 n
|
||||
0000002050 00000 n
|
||||
0000002076 00000 n
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -217,7 +217,7 @@ export default function AdminFormPage() {
|
||||
<div className="col-md-4 mb-3" key={plantilla.id}>
|
||||
<h3>Plantillas</h3>
|
||||
<div
|
||||
className="box w-100 cursor-pointer"
|
||||
className="cursor-pointer"
|
||||
onClick={() => {
|
||||
const {
|
||||
nombre_form,
|
||||
@@ -249,8 +249,8 @@ export default function AdminFormPage() {
|
||||
>
|
||||
<Image
|
||||
src={plantilla.imagen}
|
||||
width={1000}
|
||||
height={300}
|
||||
width={250}
|
||||
height={250}
|
||||
alt={`Plantilla de formulario ${index + 1}`}
|
||||
className="img-fluid rounded shadow-sm"
|
||||
/>
|
||||
@@ -313,7 +313,8 @@ export default function AdminFormPage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="row">
|
||||
<div className="row alert alert-info">
|
||||
<p className="mb-0 h2">Fechas de inicio y fin del formulario</p>
|
||||
<div className="col-md-6">
|
||||
<Input
|
||||
label="Fecha de inicio"
|
||||
|
||||
@@ -8,6 +8,7 @@ import { downloadFile } from '@/utils/downloas-utils';
|
||||
import { useParams } from 'next/navigation';
|
||||
import React, { useEffect } from 'react';
|
||||
import toast from 'react-hot-toast';
|
||||
import * as XLSX from 'xlsx';
|
||||
|
||||
export default function Page() {
|
||||
const params = useParams<{ id_formulario: string }>();
|
||||
@@ -118,20 +119,37 @@ export default function Page() {
|
||||
p.participante.correo.toLowerCase().includes(busquedaCorreo.toLowerCase())
|
||||
);
|
||||
|
||||
const handleDownload = async () => {
|
||||
try {
|
||||
const res = await axiosInstance.get(
|
||||
`/cuestionario-respondido/reporte-respuestas/${id_formulario}`,
|
||||
{
|
||||
responseType: 'blob',
|
||||
}
|
||||
);
|
||||
|
||||
downloadFile(res.data, 'lista_participantes', 'xlsx');
|
||||
} catch (error) {
|
||||
toast.error('Error al descargar la lista de participantes');
|
||||
console.error('Error al descargar la lista de participantes:', error);
|
||||
const handleDownload = () => {
|
||||
if (participantesFiltrados.length === 0) {
|
||||
toast.error('No hay participantes para exportar');
|
||||
return;
|
||||
}
|
||||
|
||||
const rows = participantesFiltrados.map((item) => ({
|
||||
ID_Participante: item.id_participante,
|
||||
ID_Evento: item.id_evento,
|
||||
Correo: item.participante.correo,
|
||||
Fecha_Inscripcion: new Date(item.fecha_inscripcion).toLocaleString(),
|
||||
Estatus: item.fecha_asistencia ? 'Asistio' : 'No asistio',
|
||||
Fecha_Asistencia: item.fecha_asistencia
|
||||
? new Date(item.fecha_asistencia).toLocaleString()
|
||||
: '',
|
||||
}));
|
||||
|
||||
const worksheet = XLSX.utils.json_to_sheet(rows);
|
||||
const workbook = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, 'Participantes');
|
||||
|
||||
const excelBuffer = XLSX.write(workbook, {
|
||||
bookType: 'xlsx',
|
||||
type: 'array',
|
||||
});
|
||||
|
||||
const blob = new Blob([excelBuffer], {
|
||||
type: 'application/octet-stream',
|
||||
});
|
||||
|
||||
downloadFile(blob, `participantes_formulario_${id_formulario}`, 'xlsx');
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -70,7 +70,7 @@ export default function Page() {
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`col-md-4 my-4 fade-in-up-bounce ${fadeClass}`}
|
||||
className={`col-md-6 col-lg-4 my-4 fade-in-up-bounce ${fadeClass}`}
|
||||
key={cuestionario.id_cuestionario}
|
||||
>
|
||||
<FormularioCard
|
||||
|
||||
Vendored
+13
-14
@@ -1,15 +1,14 @@
|
||||
export interface ParticipacionEvento {
|
||||
id_participante: number;
|
||||
id_evento: number;
|
||||
fecha_inscripcion: string; // formato ISO
|
||||
estatus: boolean;
|
||||
fecha_asistencia: string | null;
|
||||
participante: Participante;
|
||||
}
|
||||
|
||||
export interface Participante {
|
||||
id_participante: number;
|
||||
correo: string;
|
||||
id_tipo_user: number;
|
||||
}
|
||||
|
||||
id_participante: number;
|
||||
id_evento: number;
|
||||
fecha_inscripcion: string; // formato ISO
|
||||
estatus: boolean;
|
||||
fecha_asistencia: string | null;
|
||||
participante: Participante;
|
||||
}
|
||||
|
||||
export interface Participante {
|
||||
id_participante: number;
|
||||
correo: string;
|
||||
id_tipo_user: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user