diff --git a/src/prestamo/prestamo.service.ts b/src/prestamo/prestamo.service.ts index e41fefe..0da3c7c 100644 --- a/src/prestamo/prestamo.service.ts +++ b/src/prestamo/prestamo.service.ts @@ -67,6 +67,9 @@ export class PrestamoService { .then((_) => this.repository.save(prestamo)) .then((_) => { this.appGateway.actualizarUsuario(prestamo.usuario.id_usuario); + this.appGateway.actualizarOperador( + operadorRegreso.institucion.id_institucion, + ); return { message: 'Se canceló correctamente este préstamo.', }; diff --git a/src/upload-file/dto/upload-file-carga-masiva-usuario.dto.ts b/src/upload-file/dto/upload-file-carga-masiva-usuario.dto.ts index 9b969a1..0b3c220 100644 --- a/src/upload-file/dto/upload-file-carga-masiva-usuario.dto.ts +++ b/src/upload-file/dto/upload-file-carga-masiva-usuario.dto.ts @@ -7,7 +7,11 @@ export class UploadFileCargaMasivaUsuarioDto { carrera?: string; + correo?: string; + numero_cuenta?: string; + rfc?: string; + tipo_usuario?: string; } diff --git a/src/upload-file/upload-file.service.ts b/src/upload-file/upload-file.service.ts index e559c6a..93b6132 100644 --- a/src/upload-file/upload-file.service.ts +++ b/src/upload-file/upload-file.service.ts @@ -376,6 +376,8 @@ export class UploadFileService { ].apellido_m.trim()} ${usuarios[i].nombres.trim()}`, tipoUsuario, institucionCarrera, + usuarios[i].correo ? usuarios[i].correo : '', + usuarios[i].rfc ? usuarios[i].rfc : '', ) .then(({ message, institucionUsuario }) => { usuariosNuevos.push(institucionUsuario); diff --git a/src/usuario/entity/usuario.entity.ts b/src/usuario/entity/usuario.entity.ts index 0c6ee18..5262650 100644 --- a/src/usuario/entity/usuario.entity.ts +++ b/src/usuario/entity/usuario.entity.ts @@ -24,7 +24,7 @@ export class Usuario { @Column({ type: String, nullable: true, length: 60, default: null }) password: string; - @Column({ type: String, nullable: true, length: 12 }) + @Column({ type: String, nullable: true, length: 15 }) rfc: string; @Column({ type: String, nullable: true, length: 10, default: null }) diff --git a/src/usuario/usuario.service.ts b/src/usuario/usuario.service.ts index a78f809..1b4d5e3 100644 --- a/src/usuario/usuario.service.ts +++ b/src/usuario/usuario.service.ts @@ -35,6 +35,8 @@ export class UsuarioService { nombre: string, tipoUsuario: TipoUsuario, institucionCarrera: InstitucionCarrera, + correo?: string, + rfc?: string, ) { return this.repository .save( @@ -42,6 +44,8 @@ export class UsuarioService { nombre, tipoUsuario, usuario, + correo: correo ? correo : '', + rfc: rfc ? rfc : '', }), ) .then((usuario) =>