forked from CIDWA/cedetec_api_nest
Compare commits
9 Commits
ActualiandoA11
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 31fcd93b86 | |||
| fed7366649 | |||
| 95044f6426 | |||
| dd0bc1550a | |||
| c34fb58b30 | |||
| ff23484331 | |||
| 0cb847d057 | |||
| 8834d654d3 | |||
| 90dad8f641 |
Generated
+1
-141
@@ -39,8 +39,7 @@
|
||||
"swagger-ui-express": "^4.6.1",
|
||||
"sybase": "^1.2.3",
|
||||
"typeorm": "^0.3.12",
|
||||
"uuid": "^9.0.1",
|
||||
"xlsx": "^0.18.5"
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14",
|
||||
@@ -2878,14 +2877,6 @@
|
||||
"node": ">=0.4.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==",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
@@ -3849,18 +3840,6 @@
|
||||
],
|
||||
"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==",
|
||||
"dependencies": {
|
||||
"adler-32": "~1.3.0",
|
||||
"crc-32": "~1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/chainsaw": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
|
||||
@@ -4068,14 +4047,6 @@
|
||||
"node": ">= 0.12.0"
|
||||
}
|
||||
},
|
||||
"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==",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/collect-v8-coverage": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz",
|
||||
@@ -5966,14 +5937,6 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/frac": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
|
||||
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/fresh": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
|
||||
@@ -10284,17 +10247,6 @@
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"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==",
|
||||
"dependencies": {
|
||||
"frac": "~1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/stack-utils": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
|
||||
@@ -12092,22 +12044,6 @@
|
||||
"node": ">=8.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wmf": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
|
||||
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
|
||||
"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==",
|
||||
"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",
|
||||
@@ -12176,26 +12112,6 @@
|
||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.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==",
|
||||
"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/xmlchars": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
|
||||
@@ -14403,11 +14319,6 @@
|
||||
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
|
||||
"devOptional": true
|
||||
},
|
||||
"adler-32": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
|
||||
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A=="
|
||||
},
|
||||
"agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
@@ -15072,15 +14983,6 @@
|
||||
"integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==",
|
||||
"dev": true
|
||||
},
|
||||
"cfb": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
|
||||
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
|
||||
"requires": {
|
||||
"adler-32": "~1.3.0",
|
||||
"crc-32": "~1.2.0"
|
||||
}
|
||||
},
|
||||
"chainsaw": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
|
||||
@@ -15218,11 +15120,6 @@
|
||||
"integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==",
|
||||
"dev": true
|
||||
},
|
||||
"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=="
|
||||
},
|
||||
"collect-v8-coverage": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz",
|
||||
@@ -16616,11 +16513,6 @@
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
||||
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
|
||||
},
|
||||
"frac": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
|
||||
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
|
||||
},
|
||||
"fresh": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
|
||||
@@ -19677,14 +19569,6 @@
|
||||
"resolved": "https://registry.npmjs.org/sql-highlight/-/sql-highlight-6.1.0.tgz",
|
||||
"integrity": "sha512-ed7OK4e9ywpE7pgRMkMQmZDPKSVdm0oX5IEtZiKnFucSF0zu6c80GZBe38UqHuVhTWJ9xsKgSMjCG2bml86KvA=="
|
||||
},
|
||||
"ssf": {
|
||||
"version": "0.11.2",
|
||||
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
|
||||
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
|
||||
"requires": {
|
||||
"frac": "~1.1.2"
|
||||
}
|
||||
},
|
||||
"stack-utils": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
|
||||
@@ -20864,16 +20748,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"wmf": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
|
||||
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
|
||||
},
|
||||
"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=="
|
||||
},
|
||||
"word-wrap": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
|
||||
@@ -20921,20 +20795,6 @@
|
||||
"signal-exit": "^3.0.7"
|
||||
}
|
||||
},
|
||||
"xlsx": {
|
||||
"version": "0.18.5",
|
||||
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
|
||||
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
|
||||
"requires": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"xmlchars": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
|
||||
|
||||
+1
-2
@@ -50,8 +50,7 @@
|
||||
"swagger-ui-express": "^4.6.1",
|
||||
"sybase": "^1.2.3",
|
||||
"typeorm": "^0.3.12",
|
||||
"uuid": "^9.0.1",
|
||||
"xlsx": "^0.18.5"
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -9,4 +9,5 @@ export class AppController {
|
||||
getHello(): string {
|
||||
return this.appService.getHello();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import { AuthController } from './auth.controller';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
import { jwtConstants } from './jwt.constants';
|
||||
import { MiembroModule } from 'src/miembro/miembro.module';
|
||||
import { MiembroService } from 'src/miembro/miembro.service';
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { MiembroModule } from '../miembro/miembro.module';
|
||||
import { MiembroService } from '../miembro/miembro.service';
|
||||
import { Miembro } from '../miembro/entity/miembro.entity';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Repository } from 'typeorm';
|
||||
import { compare } from 'bcrypt';
|
||||
import { jwtConstants } from './jwt.constants';
|
||||
import { LoginMiembroDto } from './dto/loginMiembro.dto';
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { Miembro } from '../miembro/entity/miembro.entity';
|
||||
import { RegistrarMiembroDto } from './dto/registrarMiembro.dto';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Module } from '@nestjs/common';
|
||||
import { CarruselController } from './carrusel.controller';
|
||||
import { CarruselService } from './carrusel.service';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { Carrusel } from 'src/carrusel/entity/carrusel.entity';
|
||||
import { Carrusel } from '../carrusel/entity/carrusel.entity';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([Carrusel])],
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
InternalServerErrorException,
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Carrusel } from 'src/carrusel/entity/carrusel.entity';
|
||||
import { Carrusel } from '../carrusel/entity/carrusel.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { carruselDto } from './dto/carruselDto.dto';
|
||||
import * as fs from 'fs';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { InscripcionArea } from 'src/inscripcion-area/entity/inscripcion_area.entity';
|
||||
import { InscripcionArea } from '../inscripcion-area/entity/inscripcion_area.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { Miembro } from '../miembro/entity/miembro.entity';
|
||||
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { Miembro } from '../miembro/entity/miembro.entity';
|
||||
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiembroContacto } from 'src/miembro-contacto/entity/miembro_contacto.entity';
|
||||
import { MiembroContacto } from '../../miembro-contacto/entity/miembro_contacto.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { EmailController } from './email.controller';
|
||||
import { EmailService } from './email.service';
|
||||
|
||||
describe('EmailController', () => {
|
||||
let controller: EmailController;
|
||||
|
||||
const mockEmailService = {
|
||||
sendEmail: jest.fn(),
|
||||
sendConstancias: jest.fn(),
|
||||
getParticipantesExcel: jest.fn(),
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [EmailController],
|
||||
providers: [
|
||||
{
|
||||
provide: EmailService,
|
||||
useValue: mockEmailService,
|
||||
},
|
||||
],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<EmailController>(EmailController);
|
||||
|
||||
@@ -16,7 +16,6 @@ import { FileInterceptor } from '@nestjs/platform-express';
|
||||
import { EmailDto } from './dto/emailDto.dto';
|
||||
import { EmailService } from './email.service';
|
||||
import { Response } from 'express';
|
||||
import * as xlsx from 'xlsx';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
|
||||
@Controller('email')
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { EventosModule } from 'src/eventos/eventos.module';
|
||||
import { Participante } from 'src/participante/participante.entity';
|
||||
import { EventosModule } from '../eventos/eventos.module';
|
||||
import { Participante } from '../participante/participante.entity';
|
||||
import { EmailController } from './email.controller';
|
||||
import { EmailService } from './email.service';
|
||||
import { EventosService } from 'src/eventos/eventos.service';
|
||||
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { Evento } from 'src/eventos/evento.entity';
|
||||
import { EventosService } from '../eventos/eventos.service';
|
||||
import { EventoParticipante } from '../evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { Evento } from '../eventos/evento.entity';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
||||
@@ -9,16 +9,14 @@ import {
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import * as nodemailer from 'nodemailer';
|
||||
import { EventosService } from 'src/eventos/eventos.service';
|
||||
import { Participante } from 'src/participante/participante.entity';
|
||||
import { EventosService } from '../eventos/eventos.service';
|
||||
import { Participante } from '../participante/participante.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { EmailDto } from './dto/emailDto.dto';
|
||||
import * as xlsx from 'xlsx';
|
||||
import * as pdfMake from 'pdfmake/build/pdfmake';
|
||||
import * as pdfFonts from 'pdfmake/build/vfs_fonts';
|
||||
/* import * as PDFDocument from 'pdfkit'; */
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { PDFDocument, StandardFonts, rgb } from 'pdf-lib';
|
||||
import { Response } from 'express';
|
||||
import { format } from 'date-fns';
|
||||
@@ -127,12 +125,28 @@ export class EmailService {
|
||||
//traemos la info del evento
|
||||
const evento = await this.eventoService.getEventosPorId(id_evento);
|
||||
|
||||
const workbook = xlsx.read(file.buffer);
|
||||
const worksheet = workbook.Sheets[workbook.SheetNames[0]];
|
||||
const data = xlsx.utils.sheet_to_json(worksheet);
|
||||
const workbook = new ExcelJS.Workbook();
|
||||
await workbook.xlsx.load(file.buffer);
|
||||
const worksheet = workbook.worksheets[0];
|
||||
|
||||
const data: any[] = [];
|
||||
const headers: string[] = [];
|
||||
worksheet.eachRow((row, rowNumber) => {
|
||||
const rowData: any = {};
|
||||
row.eachCell({ includeEmpty: true }, (cell, colNumber) => {
|
||||
if (rowNumber === 1) {
|
||||
headers[colNumber] = String(cell.value).trim();
|
||||
} else {
|
||||
rowData[headers[colNumber]] = cell.value;
|
||||
}
|
||||
});
|
||||
if (rowNumber > 1) {
|
||||
data.push(rowData);
|
||||
}
|
||||
});
|
||||
|
||||
// Carga el PDF pre-diseñado
|
||||
const existingPdfBytes = fs.readFileSync('src/email/DisenoConstancia.pdf');
|
||||
const existingPdfBytes = fs.readFileSync('../email/DisenoConstancia.pdf');
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const row = data[i] as Row;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Equipo } from 'src/equipo/entity/equipo.entity';
|
||||
import { Evento } from 'src/eventos/evento.entity';
|
||||
import { Equipo } from '../../equipo/entity/equipo.entity';
|
||||
import { Evento } from '../../eventos/evento.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Equipo } from 'src/equipo/entity/equipo.entity';
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { Equipo } from '../../equipo/entity/equipo.entity';
|
||||
import { Miembro } from '../../miembro/entity/miembro.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EquipoEvento } from 'src/equipo-evento/entity/equipo_evento.entity';
|
||||
import { EquipoMiembro } from 'src/equipo-miembro/entity/equipo_miembro.entity';
|
||||
import { EquipoEvento } from '../../equipo-evento/entity/equipo_evento.entity';
|
||||
import { EquipoMiembro } from '../../equipo-miembro/entity/equipo_miembro.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { Participante } from 'src/participante/participante.entity';
|
||||
import { Participante } from '../../participante/participante.entity';
|
||||
import { EventoParticipanteController } from './evento-participante.controller';
|
||||
import { EventoParticipanteService } from './evento-participante.service';
|
||||
import { EventoParticipante } from './eventoParticipante.entity';
|
||||
|
||||
@@ -4,9 +4,9 @@ import { Repository } from 'typeorm';
|
||||
|
||||
import { RegistrarParticipanteDto } from './dto/registrarParticipanteDto.dto';
|
||||
|
||||
import { Evento } from 'src/eventos/evento.entity';
|
||||
import { Evento } from '../../eventos/evento.entity';
|
||||
import { EventoParticipante } from './eventoParticipante.entity';
|
||||
import { Participante } from 'src/participante/participante.entity';
|
||||
import { Participante } from '../../participante/participante.entity';
|
||||
import { info } from 'console';
|
||||
import { registrarEnEvento } from './dto/registrarEnEvento.dto';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Evento } from 'src/eventos/evento.entity';
|
||||
import { Evento } from '../../eventos/evento.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EquipoEvento } from 'src/equipo-evento/entity/equipo_evento.entity';
|
||||
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { EquipoEvento } from '../equipo-evento/entity/equipo_evento.entity';
|
||||
import { EventoParticipante } from '../evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from '@nestjs/common';
|
||||
import { Response } from 'express';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { EventoParticipante } from '../evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { actualizarEventoDto } from './dto/actualizarEvento.dto';
|
||||
import { crearEventoDto } from './dto/crearEvento.dto';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { Participante } from 'src/participante/participante.entity';
|
||||
import { EventoParticipante } from '../evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { Participante } from '../participante/participante.entity';
|
||||
import { Between, MoreThanOrEqual, Repository } from 'typeorm';
|
||||
import { actualizarEventoDto } from './dto/actualizarEvento.dto';
|
||||
import { crearEventoDto } from './dto/crearEvento.dto';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Area } from 'src/catalogos/area.entity';
|
||||
import { InscripcionDSC } from 'src/inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import { Area } from '../../catalogos/area.entity';
|
||||
import { InscripcionDSC } from '../../inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { InscripcionArea } from 'src/inscripcion-area/entity/inscripcion_area.entity';
|
||||
import { InscripcionStatus } from 'src/inscripcion-status/entity/inscripcion_status.entity';
|
||||
import { InscripcionUsuario } from 'src/inscripcion-usuario/entity/inscripcion_usuario.entity';
|
||||
import { Periodo } from 'src/periodo/entity/periodo.entity';
|
||||
import { InscripcionArea } from '../../inscripcion-area/entity/inscripcion_area.entity';
|
||||
import { InscripcionStatus } from '../../inscripcion-status/entity/inscripcion_status.entity';
|
||||
import { InscripcionUsuario } from '../../inscripcion-usuario/entity/inscripcion_usuario.entity';
|
||||
import { Periodo } from '../../periodo/entity/periodo.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { InscripcionDSC } from 'src/inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import { InscripcionDSC } from '../../inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { InscripcionDSC } from 'src/inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { InscripcionDSC } from '../../inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import { Miembro } from '../../miembro/entity/miembro.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Contacto } from 'src/contacto/entity/contacto.entity';
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { Contacto } from '../../contacto/entity/contacto.entity';
|
||||
import { Miembro } from '../../miembro/entity/miembro.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Miembro } from 'src/miembro/entity/miembro.entity';
|
||||
import { Proyecto } from 'src/proyecto/entity/proyecto.entity';
|
||||
import { Miembro } from '../../miembro/entity/miembro.entity';
|
||||
import { Proyecto } from '../../proyecto/entity/proyecto.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { IsEmail } from 'class-validator';
|
||||
import { Carrera } from 'src/catalogos/carrera.entity';
|
||||
import { TipoMiembro } from 'src/catalogos/tipo-miembro.entity';
|
||||
import { EquipoMiembro } from 'src/equipo-miembro/entity/equipo_miembro.entity';
|
||||
import { InscripcionUsuario } from 'src/inscripcion-usuario/entity/inscripcion_usuario.entity';
|
||||
import { MiembroContacto } from 'src/miembro-contacto/entity/miembro_contacto.entity';
|
||||
import { MiembroProyecto } from 'src/miembro-proyecto/entity/miembro_proyecto.entity';
|
||||
import { Carrera } from '../../catalogos/carrera.entity';
|
||||
import { TipoMiembro } from '../../catalogos/tipo-miembro.entity';
|
||||
import { EquipoMiembro } from '../../equipo-miembro/entity/equipo_miembro.entity';
|
||||
import { InscripcionUsuario } from '../../inscripcion-usuario/entity/inscripcion_usuario.entity';
|
||||
import { MiembroContacto } from '../../miembro-contacto/entity/miembro_contacto.entity';
|
||||
import { MiembroProyecto } from '../../miembro-proyecto/entity/miembro_proyecto.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import { EventoParticipante } from '../evento-participante/evento-participante/eventoParticipante.entity';
|
||||
|
||||
@Entity()
|
||||
export class Participante {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { InscripcionDSC } from 'src/inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import { InscripcionDSC } from '../../inscripcion-dsc/entity/inscripcion_dsc.entity';
|
||||
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MiembroProyecto } from 'src/miembro-proyecto/entity/miembro_proyecto.entity';
|
||||
import { MiembroProyecto } from '../../miembro-proyecto/entity/miembro_proyecto.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
|
||||
Reference in New Issue
Block a user