utn-cli 2.0.13 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ Router.get("/ConsentimientoInformado", async (solicitud, respuesta, next) => {
|
|
|
33
33
|
return respuesta.json({ body: await ConsentimientoInformado.ConsentimientoInformado(Datos), error: undefined });
|
|
34
34
|
} catch (error) {
|
|
35
35
|
const MensajeDeError = "No fue posible determiniar el consentimiento informado";
|
|
36
|
-
console.error(new ManejadorDeErrores(
|
|
36
|
+
console.error(new ManejadorDeErrores(MensajeDeError, ManejadorDeErrores.obtenerNumeroDeLinea(), true, `Dirección IP: ${solicitud.ip}`));
|
|
37
37
|
return respuesta.status(500).json({ body: undefined, error: MensajeDeError });
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -40,6 +40,31 @@ class Miscelaneo {
|
|
|
40
40
|
this.EnlaceDeAcceso = undefined;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
async RegistrarPermisoExtra(Permiso, Descripcion) {
|
|
44
|
+
await ejecutarConsultaSIGU("SELECT IFNULL(MAX(`PermisoExtraId`), 0) + 1 INTO @`SiguientePermisoId` FROM `SIGU`.`SIGU_PermisosExtraV2`;\
|
|
45
|
+
INSERT INTO `SIGU`.`SIGU_PermisosExtraV2` VALUES\
|
|
46
|
+
(@`SiguientePermisoId`, ?, ?, ?, NOW(4), USER()) ON DUPLICATE KEY UPDATE `LastUser` = USER(), `Nombre` = ?, `Descripcion` = ?;"
|
|
47
|
+
, [Permiso, this.NombreCanonicoDelModulo, Descripcion, Permiso, Descripcion]);
|
|
48
|
+
|
|
49
|
+
// Asginación inicial de permisos
|
|
50
|
+
if (this.UsuariosConAccesoInicial.length > 0) {
|
|
51
|
+
const PermisoExtraIdValor = await this.PermisoExtraId(Permiso);
|
|
52
|
+
this.UsuariosConAccesoInicial.forEach(async (dato) => {
|
|
53
|
+
await ejecutarConsultaSIGU("INSERT INTO `SIGU`.`SIGU_PermisosExtraPersonasV2` VALUES (?,\
|
|
54
|
+
(SELECT `Identificador` FROM `SIGU`.`SIGU_Personas` WHERE `Identificacion` = ?), NOW(4), USER())\
|
|
55
|
+
ON DUPLICATE KEY UPDATE `LastUpdate` = NOW(4)"
|
|
56
|
+
, [PermisoExtraIdValor, dato]);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async PermisoExtraId(Permiso) {
|
|
62
|
+
const PermisoExtraId = await ejecutarConsultaSIGU("SELECT `PermisoExtraId` FROM `SIGU`.`SIGU_PermisosExtraV2` \
|
|
63
|
+
WHERE `Nombre` = ? AND `Modulo` = ?"
|
|
64
|
+
, [Permiso, this.NombreCanonicoDelModulo]);
|
|
65
|
+
return PermisoExtraId[0]['PermisoExtraId'];
|
|
66
|
+
}
|
|
67
|
+
|
|
43
68
|
obtenerNombreCanonicoDelModulo() {
|
|
44
69
|
return this.NombreCanonicoDelModulo;
|
|
45
70
|
}
|
|
@@ -572,12 +597,10 @@ class Miscelaneo {
|
|
|
572
597
|
async registroDelModuloEnSIGUV2() {
|
|
573
598
|
await ejecutarConsultaSIGU("INSERT INTO `SIGU`.`SIGU_ModulosV2` VALUES\
|
|
574
599
|
(?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(4), ?, 'DiccionarioDeDatos'\
|
|
575
|
-
, ?, '-', '-', 'Activo', NOW(4), USER()) ON DUPLICATE KEY UPDATE `
|
|
576
|
-
, `Color` = ?, `Correo` = ?, `Version` = ?, `Repositorios` = ?, `AcuerdoDeNivelDeServicio` = ?"
|
|
600
|
+
, ?, '-', '-', 'Activo', NOW(4), USER()) ON DUPLICATE KEY UPDATE `Version` = ?"
|
|
577
601
|
, [this.NombreCanonicoDelModulo, this.MenuPadre, this.DescripcionDelModulo, this.DetalleDelModulo
|
|
578
602
|
, this.TipoDeCard, this.IconoDelModulo, this.ColorDelModulo, this.CorreoParaReportes, this.Version, this.versionDelNucleo().split(' ')[0], this.Repositorios
|
|
579
|
-
, this.
|
|
580
|
-
, this.Version, this.Repositorios, this.versionDelNucleo().split(' ')[0]]);
|
|
603
|
+
, this.Version]);
|
|
581
604
|
await ejecutarConsultaSIGU("SELECT IFNULL(MAX(`PermisoId`), 0) + 1 INTO @`SiguientePermisoId` FROM `SIGU`.`SIGU_PermisosV2`;\
|
|
582
605
|
INSERT INTO `SIGU`.`SIGU_PermisosV2` VALUES\
|
|
583
606
|
(@`SiguientePermisoId`, ?, ?, ?, NOW(4), USER()) ON DUPLICATE KEY UPDATE `LastUser` = USER(), `Nombre` = ?, `Descripcion` = ?;"
|
|
@@ -1065,8 +1088,8 @@ class Miscelaneo {
|
|
|
1065
1088
|
WHERE `PermisoId` = ? AND `Identificador` = ?", [rolPermisoId, Resultado.uid]);
|
|
1066
1089
|
if (permisos[0]['Total'] === 1) {
|
|
1067
1090
|
if (permisoExtraId) {
|
|
1068
|
-
const ValidacionPermisoExtra = await ejecutarConsultaSIGU("SELECT COUNT(*) AS `Total` FROM `SIGU`.`
|
|
1069
|
-
WHERE `
|
|
1091
|
+
const ValidacionPermisoExtra = await ejecutarConsultaSIGU("SELECT COUNT(*) AS `Total` FROM `SIGU`.`SIGU_PermisosExtraPersonasV2`\
|
|
1092
|
+
WHERE `PermisoExtraId` = ? AND `Identificador` = ?", [permisoExtraId, Resultado.uid]);
|
|
1070
1093
|
if (ValidacionPermisoExtra[0]['Total'] === 1) {
|
|
1071
1094
|
return true;
|
|
1072
1095
|
}
|
|
@@ -1087,7 +1110,7 @@ class Miscelaneo {
|
|
|
1087
1110
|
return false;
|
|
1088
1111
|
}
|
|
1089
1112
|
|
|
1090
|
-
async
|
|
1113
|
+
async validarToken(encabezadoDeAutorizacion) {
|
|
1091
1114
|
return await this.validarTokenV2(encabezadoDeAutorizacion);
|
|
1092
1115
|
// const Resultado = undefined;
|
|
1093
1116
|
// try {
|
package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from "@angular/core";
|
|
2
2
|
import { TarjetaComponent } from "../../Componentes/Nucleo/tarjeta/tarjeta.component";
|
|
3
|
-
// import { HttpClient
|
|
3
|
+
// import { HttpClient } from "@angular/common/http";
|
|
4
4
|
// import { DatosGlobalesService } from '../../datos-globales.service'
|
|
5
5
|
|
|
6
6
|
@Component({
|