utn-cli 1.0.0
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/commands/backend.js +282 -0
- package/commands/db.js +49 -0
- package/commands/frontend.js +225 -0
- package/index.js +98 -0
- package/package.json +27 -0
- package/templates/backend/InformacionDelModulo.json +21 -0
- package/templates/backend/NOMBRE_DEL_CANONICO_DEL_PROYECTO.rest +74 -0
- package/templates/backend/README.md +0 -0
- package/templates/backend/gitignore +3 -0
- package/templates/backend/index.rest +288 -0
- package/templates/backend/package.json +30 -0
- package/templates/backend/reporte.pdf +0 -0
- package/templates/backend/rutas/API.js +49 -0
- package/templates/backend/rutas/Servicio1.js +184 -0
- package/templates/backend/rutas/misc.js +671 -0
- package/templates/backend/rutas/rutas.js +11 -0
- package/templates/backend/server.js +79 -0
- package/templates/backend/servicios/API.js +101 -0
- package/templates/backend/servicios/InformacionDelModulo.js +70 -0
- package/templates/backend/servicios/Nucleo/EnvioDeCorreos.js +45 -0
- package/templates/backend/servicios/Nucleo/ManejadorDeErrores.js +54 -0
- package/templates/backend/servicios/Nucleo/Miscelaneas.js +1901 -0
- package/templates/backend/servicios/Nucleo/Monitoreo.js +65 -0
- package/templates/backend/servicios/Nucleo/db.js +78 -0
- package/templates/backend/servicios/Servicio1.js +118 -0
- package/templates/backend/variables-calidad.env +6 -0
- package/templates/backend/variables-desarrollo.env +6 -0
- package/templates/backend/variables-pruebas.env +6 -0
- package/templates/bd/README.md +78 -0
- package/templates/bd/cumulodb-scripts/gitignore +1 -0
- package/templates/bd/docker-compose.yml +28 -0
- package/templates/bd/docker-scripts/1-crear estructura.sql +29 -0
- package/templates/bd/docker-scripts/2-cambios estructura original.sql +1 -0
- package/templates/bd/docker-scripts/3-insertar datos de prueba.sql +1 -0
- package/templates/bd/docker-scripts/4-crear eventos y rutinas.sql +1 -0
- package/templates/bd/docker-scripts/5-crear vistas.sql +1 -0
- package/templates/bd/docker-scripts/6-calidad.sql +1 -0
- package/templates/bd/docker-scripts/7-pruebas.sql +1 -0
- package/templates/bd/docker-scripts/8-local.sql +1 -0
- package/templates/bd/servidores-scripts/calidad.sql +1 -0
- package/templates/bd/servidores-scripts/datos_iniciales_produccion.sql +1 -0
- package/templates/bd/servidores-scripts/produccion.sql +1 -0
- package/templates/bd/servidores-scripts/pruebas.sql +1 -0
- package/templates/frontend/.vscode/extensions.json +4 -0
- package/templates/frontend/.vscode/launch.json +20 -0
- package/templates/frontend/.vscode/tasks.json +42 -0
- package/templates/frontend/Dockerfile +5 -0
- package/templates/frontend/README.md +59 -0
- package/templates/frontend/angular.json +101 -0
- package/templates/frontend/dist/frontend/3rdpartylicenses.txt +459 -0
- package/templates/frontend/dist/frontend/prerendered-routes.json +3 -0
- package/templates/frontend/docker-compose.yml +5 -0
- package/templates/frontend/editorconfig +17 -0
- package/templates/frontend/gitignore +45 -0
- package/templates/frontend/nginx.conf +12 -0
- package/templates/frontend/package.json +46 -0
- package/templates/frontend/public/favicon.ico +0 -0
- package/templates/frontend/src/app/Componentes/Nucleo/graficos/graficos.component.css +15 -0
- package/templates/frontend/src/app/Componentes/Nucleo/graficos/graficos.component.html +25 -0
- package/templates/frontend/src/app/Componentes/Nucleo/graficos/graficos.component.ts +80 -0
- package/templates/frontend/src/app/Componentes/Nucleo/iframe/iframe.ts +37 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-confirmacion/mensaje-confirmacion.component.css +5 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-confirmacion/mensaje-confirmacion.component.html +22 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-confirmacion/mensaje-confirmacion.ts +64 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-confirmacion-html/mensaje-confirmacion-html.component.css +5 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-confirmacion-html/mensaje-confirmacion-html.component.html +22 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-confirmacion-html/mensaje-confirmacion-html.ts +64 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-informacion/mensaje-informacion.component.css +5 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-informacion/mensaje-informacion.component.html +11 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensaje-informacion/mensaje-informacion.ts +46 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensajes/mensajes.component.css +11 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensajes/mensajes.component.html +17 -0
- package/templates/frontend/src/app/Componentes/Nucleo/mensajes/mensajes.component.ts +43 -0
- package/templates/frontend/src/app/Componentes/Nucleo/reporte-de-incidencias/reporte-de-incidencias.component.css +37 -0
- package/templates/frontend/src/app/Componentes/Nucleo/reporte-de-incidencias/reporte-de-incidencias.component.html +35 -0
- package/templates/frontend/src/app/Componentes/Nucleo/reporte-de-incidencias/reporte-de-incidencias.component.ts +103 -0
- package/templates/frontend/src/app/Componentes/Nucleo/subir-archivo/subir-archivo.component.css +90 -0
- package/templates/frontend/src/app/Componentes/Nucleo/subir-archivo/subir-archivo.component.html +39 -0
- package/templates/frontend/src/app/Componentes/Nucleo/subir-archivo/subir-archivo.component.ts +132 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tabla/paginador-personalizado.ts +17 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tabla/tabla.component.css +332 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tabla/tabla.component.html +166 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tabla/tabla.component.ts +228 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta/tarjeta.component.css +129 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta/tarjeta.component.html +35 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta/tarjeta.component.ts +46 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-modulo/tarjeta-modulo.component.css +92 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-modulo/tarjeta-modulo.component.html +17 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-modulo/tarjeta-modulo.component.ts +42 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-multiple/tarjeta-multiple.component.css +90 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-multiple/tarjeta-multiple.component.html +22 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-multiple/tarjeta-multiple.component.ts +46 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-reporte/tarjeta-reporte.component.css +129 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-reporte/tarjeta-reporte.component.html +20 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tarjeta-reporte/tarjeta-reporte.component.ts +25 -0
- package/templates/frontend/src/app/Componentes/guardar-incapacidad/guardar-incapacidad.component.css +20 -0
- package/templates/frontend/src/app/Componentes/guardar-incapacidad/guardar-incapacidad.component.html +46 -0
- package/templates/frontend/src/app/Componentes/guardar-incapacidad/guardar-incapacidad.component.ts +64 -0
- package/templates/frontend/src/app/Paginas/Nucleo/contenedor-componentes/contenedor-componentes.component.css +142 -0
- package/templates/frontend/src/app/Paginas/Nucleo/contenedor-componentes/contenedor-componentes.component.html +90 -0
- package/templates/frontend/src/app/Paginas/Nucleo/contenedor-componentes/contenedor-componentes.component.ts +139 -0
- package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.css +4 -0
- package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.html +17 -0
- package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.ts +36 -0
- package/templates/frontend/src/app/Paginas/gestion-de-reportes/gestion-de-reportes.component.css +4 -0
- package/templates/frontend/src/app/Paginas/gestion-de-reportes/gestion-de-reportes.component.html +6 -0
- package/templates/frontend/src/app/Paginas/gestion-de-reportes/gestion-de-reportes.component.ts +36 -0
- package/templates/frontend/src/app/Paginas/gestion-graficos/gestion-graficos.component.css +13 -0
- package/templates/frontend/src/app/Paginas/gestion-graficos/gestion-graficos.component.html +13 -0
- package/templates/frontend/src/app/Paginas/gestion-graficos/gestion-graficos.component.ts +75 -0
- package/templates/frontend/src/app/Paginas/gestion-iframe1/gestion-iframe1.component.css +13 -0
- package/templates/frontend/src/app/Paginas/gestion-iframe1/gestion-iframe1.component.html +3 -0
- package/templates/frontend/src/app/Paginas/gestion-iframe1/gestion-iframe1.component.ts +14 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla/gestion-tabla.component.css +13 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla/gestion-tabla.component.html +24 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla/gestion-tabla.component.ts +300 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla-XYZ/gestion-tabla-XYZ.component.css +13 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla-XYZ/gestion-tabla-XYZ.component.html +43 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla-XYZ/gestion-tabla-XYZ.component.ts +305 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla-jefe/gestion-tabla-jefe.component.css +13 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla-jefe/gestion-tabla-jefe.component.html +25 -0
- package/templates/frontend/src/app/Paginas/gestion-tabla-jefe/gestion-tabla-jefe.component.ts +245 -0
- package/templates/frontend/src/app/analytics.module.ts +45 -0
- package/templates/frontend/src/app/app.component.css +0 -0
- package/templates/frontend/src/app/app.component.html +1 -0
- package/templates/frontend/src/app/app.component.ts +10 -0
- package/templates/frontend/src/app/app.config.server.ts +14 -0
- package/templates/frontend/src/app/app.config.ts +27 -0
- package/templates/frontend/src/app/app.routes.ts +16 -0
- package/templates/frontend/src/app/auth.interceptor.ts +26 -0
- package/templates/frontend/src/app/datos-globales.service.ts +45 -0
- package/templates/frontend/src/assets/Puntos.svg +94 -0
- package/templates/frontend/src/index.html +36 -0
- package/templates/frontend/src/main.server.ts +7 -0
- package/templates/frontend/src/main.ts +6 -0
- package/templates/frontend/src/styles.css +14 -0
- package/templates/frontend/tsconfig.app.json +15 -0
- package/templates/frontend/tsconfig.json +27 -0
- package/templates/frontend/tsconfig.spec.json +15 -0
- package/utils/index.js +105 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/* Cabecera */
|
|
2
|
+
.cabecera2 {
|
|
3
|
+
width: 100%;
|
|
4
|
+
border-bottom: 1px solid #707070;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.cabecera2 p {
|
|
8
|
+
text-align: left;
|
|
9
|
+
font-family: "Roboto";
|
|
10
|
+
letter-spacing: 0;
|
|
11
|
+
color: #000;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.cabecera2 .titulo2 {
|
|
15
|
+
font-size: large;
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cabecera2 .descripcion2 {
|
|
20
|
+
font-size: small;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Botones */
|
|
24
|
+
.botonesDeNavegacion {
|
|
25
|
+
padding: 10px;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: flex-end;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.botonDeNavegacion {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
color: #1976d2;
|
|
38
|
+
border: none;
|
|
39
|
+
background: none;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Contenedor */
|
|
44
|
+
.contenedor {
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
padding: 0 15px;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
background-color: aliceblue;
|
|
50
|
+
background-image: url('../../../../assets/Puntos.svg');
|
|
51
|
+
background-repeat: no-repeat;
|
|
52
|
+
background-position: left center;
|
|
53
|
+
background-size: contain;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.contenedor.calidad {
|
|
57
|
+
background-color: #FAFF6B;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.contenedor.pruebas {
|
|
61
|
+
background-color: #95D03A;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Contenido */
|
|
65
|
+
.contenido {
|
|
66
|
+
border: 3px solid #0b4fce;
|
|
67
|
+
border-radius: 15px;
|
|
68
|
+
padding: 20px;
|
|
69
|
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
|
70
|
+
background-color: white;
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Titulos */
|
|
75
|
+
.titulo,
|
|
76
|
+
.encabezado {
|
|
77
|
+
font-weight: bold;
|
|
78
|
+
text-align: center;
|
|
79
|
+
padding: 0.5rem;
|
|
80
|
+
position: relative;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.titulo {
|
|
84
|
+
font-size: 18px;
|
|
85
|
+
background-color: #002f6b;
|
|
86
|
+
color: white;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.encabezado {
|
|
90
|
+
font-size: 25px;
|
|
91
|
+
background-color: #adbccf;
|
|
92
|
+
color: #002f6b;
|
|
93
|
+
display: flex;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Pie */
|
|
97
|
+
.pie {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
align-items: center;
|
|
101
|
+
padding: 0.5rem;
|
|
102
|
+
background-color: #adbccf;
|
|
103
|
+
color: #000;
|
|
104
|
+
font-size: 15px;
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.pie-col {
|
|
109
|
+
display: flex;
|
|
110
|
+
gap: 10px;
|
|
111
|
+
align-items: center;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.pie-col.izquierda {
|
|
115
|
+
justify-content: flex-start;
|
|
116
|
+
direction: ltr;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.pie-col.centro {
|
|
120
|
+
flex: 1;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.pie-col.derecha {
|
|
125
|
+
justify-content: flex-end;
|
|
126
|
+
flex-direction: row-reverse;
|
|
127
|
+
direction: rtl;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Página */
|
|
131
|
+
.pagina {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
height: 100vh;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.zona-scrollable {
|
|
138
|
+
flex-grow: 1;
|
|
139
|
+
overflow-y: auto;
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<div class="pagina">
|
|
2
|
+
<div class="encabezado">
|
|
3
|
+
<div class="pie-col izquierda">
|
|
4
|
+
</div>
|
|
5
|
+
<div class="pie-col centro">
|
|
6
|
+
Universidad Técnica Nacional
|
|
7
|
+
</div>
|
|
8
|
+
<div class="pie-col derecha">
|
|
9
|
+
@if(TienePermiso) {
|
|
10
|
+
<button class="botonDeNavegacion" matTooltip="Salir" mat-button (click)="Salir()">
|
|
11
|
+
<mat-icon>logout</mat-icon>
|
|
12
|
+
</button>
|
|
13
|
+
<button class="botonDeNavegacion" matTooltip="Perfil" mat-button (click)="irAPerfil()">
|
|
14
|
+
<mat-icon>person</mat-icon>
|
|
15
|
+
</button>
|
|
16
|
+
} @else {
|
|
17
|
+
<button class="botonDeNavegacion" matTooltip="Entrar" mat-button (click)="Entrar()">
|
|
18
|
+
<mat-icon>login</mat-icon>
|
|
19
|
+
</button>
|
|
20
|
+
}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="zona-scrollable">
|
|
25
|
+
@if(TienePermiso){
|
|
26
|
+
<div class="titulo">{{ Titulo }}</div>
|
|
27
|
+
}
|
|
28
|
+
<div [ngClass]="claseDelContenedor">
|
|
29
|
+
@if(TienePermiso) {
|
|
30
|
+
<div class="botonesDeNavegacion">
|
|
31
|
+
<button class="botonDeNavegacion" matTooltip="Ir atrás" mat-button (click)="irAtras()">
|
|
32
|
+
<mat-icon>arrow_back</mat-icon>
|
|
33
|
+
</button>
|
|
34
|
+
<button class="botonDeNavegacion" matTooltip="Ir al menú del módulo" mat-button (click)="irAlMenuDeModulo()">
|
|
35
|
+
<mat-icon>menu</mat-icon>
|
|
36
|
+
</button>
|
|
37
|
+
<!-- <button class="botonDeNavegacion" matTooltip="Ir al móudulo padre" mat-button (click)="irAlModuloPadre()">
|
|
38
|
+
<mat-icon>apps</mat-icon>
|
|
39
|
+
</button> -->
|
|
40
|
+
<button class="botonDeNavegacion" matTooltip="Ir al inicio" mat-button (click)="irAlInicio()">
|
|
41
|
+
<mat-icon>home</mat-icon>
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
}
|
|
45
|
+
<div class="contenido">
|
|
46
|
+
@if(TienePermiso){
|
|
47
|
+
<div class="cabecera2">
|
|
48
|
+
<p class="titulo2">{{ Descripcion }}</p>
|
|
49
|
+
<p class="descripcion2">{{ Detalle }}</p>
|
|
50
|
+
</div>
|
|
51
|
+
<ng-content><router-outlet /></ng-content>
|
|
52
|
+
}@else{
|
|
53
|
+
<h3>No tiene permisos para consultar este módulo</h3>
|
|
54
|
+
}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="pie">
|
|
60
|
+
<div class="pie-col izquierda">
|
|
61
|
+
Módulo: {{ Modulo }}. Versión {{ Version }}.
|
|
62
|
+
</div>
|
|
63
|
+
<div class="pie-col centro">
|
|
64
|
+
</div>
|
|
65
|
+
<div class="pie-col derecha">
|
|
66
|
+
@if(TienePermiso) {
|
|
67
|
+
<button class="botonDeNavegacion" matTooltip="Mensajes" mat-button (click)="irAMensajes()">
|
|
68
|
+
@if (Mensajes.length > 0) {
|
|
69
|
+
<mat-icon>mark_email_unread</mat-icon>
|
|
70
|
+
} @else {
|
|
71
|
+
<mat-icon>email_unread</mat-icon>
|
|
72
|
+
}
|
|
73
|
+
</button>
|
|
74
|
+
}
|
|
75
|
+
@if(EnlaceDelVideo !== '-') {
|
|
76
|
+
<button class="botonDeNavegacion" matTooltip="Vídeo" mat-button (click)="irAVideo()">
|
|
77
|
+
<mat-icon>live_tv</mat-icon>
|
|
78
|
+
</button>
|
|
79
|
+
}
|
|
80
|
+
@if(EnlaceDelManual !== '-') {
|
|
81
|
+
<button class="botonDeNavegacion" matTooltip="Ayuda" mat-button (click)="irAAyuda()">
|
|
82
|
+
<mat-icon>help</mat-icon>
|
|
83
|
+
</button>
|
|
84
|
+
}
|
|
85
|
+
<button class="botonDeNavegacion" matTooltip="Reporte" mat-button (click)="irASoporte()">
|
|
86
|
+
<mat-icon>support_agent</mat-icon>
|
|
87
|
+
</button>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import { RouterOutlet } from '@angular/router';
|
|
4
|
+
import { DatosGlobalesService } from '../../../datos-globales.service';
|
|
5
|
+
import { Location, CommonModule } from '@angular/common';
|
|
6
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
7
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
8
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
9
|
+
import { ReporteDeIncidenciasComponent } from '../../../Componentes/Nucleo/reporte-de-incidencias/reporte-de-incidencias.component'
|
|
10
|
+
import { MensajesComponent } from '../../../Componentes/Nucleo/mensajes/mensajes.component'
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'app-contenedor-componentes',
|
|
14
|
+
imports: [RouterOutlet, MatIconModule, MatTooltipModule, CommonModule],
|
|
15
|
+
templateUrl: './contenedor-componentes.component.html',
|
|
16
|
+
styleUrl: './contenedor-componentes.component.css'
|
|
17
|
+
})
|
|
18
|
+
export class ContenedorComponentesComponent {
|
|
19
|
+
public TienePermiso: boolean = false;
|
|
20
|
+
public Titulo: string = '';
|
|
21
|
+
public Modulo: string = '';
|
|
22
|
+
public Version: string = '';
|
|
23
|
+
public Mensajes: string[] = [];
|
|
24
|
+
public EnlaceDelManual: string = '-';
|
|
25
|
+
public EnlaceDelVideo: string = '-';
|
|
26
|
+
public claseDelContenedor: string = '';
|
|
27
|
+
public Descripcion: string = '';
|
|
28
|
+
public Detalle: string = '';
|
|
29
|
+
constructor(private http: HttpClient, private datosGlobalesService: DatosGlobalesService, private location: Location, private dialog: MatDialog) {
|
|
30
|
+
if (datosGlobalesService.ObtenerToken() === '') {
|
|
31
|
+
datosGlobalesService.RedirigirALogin();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ngOnInit() {
|
|
36
|
+
const url = window.location.href.toLowerCase();
|
|
37
|
+
if (url.includes('calidad')) {
|
|
38
|
+
this.claseDelContenedor = 'contenedor calidad';
|
|
39
|
+
} else if (url.includes('pruebas')) {
|
|
40
|
+
this.claseDelContenedor = 'contenedor pruebas';
|
|
41
|
+
} else {
|
|
42
|
+
this.claseDelContenedor = 'contenedor';
|
|
43
|
+
}
|
|
44
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/validarToken').subscribe((datos: any) => {
|
|
45
|
+
this.TienePermiso = datos.body;
|
|
46
|
+
if (!this.TienePermiso) {
|
|
47
|
+
this.Entrar();
|
|
48
|
+
}
|
|
49
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/configurarFrontend').subscribe((datos: any) => {
|
|
50
|
+
this.Titulo = datos.body.Titulo;
|
|
51
|
+
this.Modulo = datos.body.Modulo;
|
|
52
|
+
this.Version = datos.body.Version;
|
|
53
|
+
this.Descripcion = datos.body.Descripcion;
|
|
54
|
+
this.Detalle = datos.body.Detalle;
|
|
55
|
+
})
|
|
56
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerNotificaciones', {
|
|
57
|
+
headers: new HttpHeaders({
|
|
58
|
+
Authorization: this.datosGlobalesService.ObtenerToken(),
|
|
59
|
+
'Content-Type': 'application/json'
|
|
60
|
+
})
|
|
61
|
+
}).subscribe((datos: any) => {
|
|
62
|
+
this.Mensajes = datos.body;
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerDetalleDelModulo').subscribe((datos: any) => {
|
|
66
|
+
this.EnlaceDelManual = datos.body[0].EnlaceDelManual;
|
|
67
|
+
this.EnlaceDelVideo = datos.body[0].EnlaceDelVideo;
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
irAtras(): void {
|
|
72
|
+
this.location.back();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
irAlMenuDeModulo(): void {
|
|
76
|
+
window.location.href = new URL(window.location.href).origin;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
irAlModuloPadre(): void {
|
|
80
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerEnlaceDelModuloPadre').subscribe((datos: any) => {
|
|
81
|
+
window.location.href = datos.body;
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
irAlInicio(): void {
|
|
86
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerEnlaceDePortal').subscribe((datos: any) => {
|
|
87
|
+
window.location.href = datos.body;
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
irAMensajes(): void {
|
|
92
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerNotificaciones').subscribe((datos: any) => {
|
|
93
|
+
let data = datos.body;
|
|
94
|
+
this.dialog.open(MensajesComponent, { data });
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
irAAyuda(): void {
|
|
99
|
+
window.open(this.EnlaceDelManual, '_blank', 'noopener,noreferrer');
|
|
100
|
+
// const link = document.createElement('a');
|
|
101
|
+
// link.href = 'assets/Ayuda.pdf';
|
|
102
|
+
// link.setAttribute('download', 'Ayuda.pdf');
|
|
103
|
+
// link.setAttribute('target', '_blank');
|
|
104
|
+
// document.body.appendChild(link);
|
|
105
|
+
// link.click();
|
|
106
|
+
// document.body.removeChild(link);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
irAVideo(): void {
|
|
110
|
+
window.open(this.EnlaceDelVideo, '_blank', 'noopener,noreferrer');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
irASoporte(): void {
|
|
114
|
+
this.dialog.open(ReporteDeIncidenciasComponent);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
irAPerfil(): void {
|
|
118
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/obtenerEnlaceDePerfil').subscribe((datos: any) => {
|
|
119
|
+
window.location.href = datos.body;
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
Salir(): void {
|
|
124
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/cerrarSesion').subscribe((datos: any) => {
|
|
125
|
+
document.cookie.split(";").forEach(c => {
|
|
126
|
+
const eqPos = c.indexOf("=");
|
|
127
|
+
const name = eqPos > -1 ? c.substring(0, eqPos).trim() : c.trim();
|
|
128
|
+
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";
|
|
129
|
+
});
|
|
130
|
+
window.location.href = datos.body;
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
Entrar(): void {
|
|
135
|
+
this.http.get(this.datosGlobalesService.ObtenerURL() + 'misc/iniciarSesion').subscribe((datos: any) => {
|
|
136
|
+
window.location.href = datos.body;
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
}
|
package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.html
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div class="contenido">
|
|
2
|
+
<app-tarjeta [rutaASeguir]="'tabla'" titulo="Registro"
|
|
3
|
+
descripcion="Módulo para el registro de las ausencias por concepto de incapacidades, licencias o permisos"
|
|
4
|
+
icono="inventory"></app-tarjeta>
|
|
5
|
+
<app-tarjeta [rutaASeguir]="'graficoDeModulos'" titulo="Gráficos"
|
|
6
|
+
descripcion="Módulo para la visualización de gráficos sobre módulosV2" icono="analytics"></app-tarjeta>
|
|
7
|
+
<app-tarjeta [rutaASeguir]="'parametros-reportes'" titulo="Reportes sobre el módulo"
|
|
8
|
+
descripcion="Módulo para la gestión de los reportes del módulo" icono="analytics"></app-tarjeta>
|
|
9
|
+
<app-tarjeta [rutaASeguir]="'gestionIframe1'" titulo="Matrícula por sedes" descripcion="Matrícula por sedes"
|
|
10
|
+
icono="mail"></app-tarjeta>
|
|
11
|
+
@if(cantidadMaxima > 0) {
|
|
12
|
+
<app-tarjeta [rutaASeguir]="'aprobaciones'" titulo="Aprobaciones" [cantidad]="cantidad"
|
|
13
|
+
[cantidadMaxima]="cantidadMaxima"
|
|
14
|
+
descripcion="Módulo para las aprobaciones de las ausencias por concepto de incapacidades, licencias o permisos por parte de las personas jefes"
|
|
15
|
+
icono="check"></app-tarjeta>
|
|
16
|
+
}
|
|
17
|
+
</div>
|
package/templates/frontend/src/app/Paginas/contenedor-principal/contenedor-principal.component.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component } from "@angular/core";
|
|
2
|
+
import { TarjetaComponent } from "../../Componentes/Nucleo/tarjeta/tarjeta.component";
|
|
3
|
+
// import { HttpClient, HttpHeaders } from "@angular/common/http";
|
|
4
|
+
// import { DatosGlobalesService } from '../../datos-globales.service'
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: "app-contenedor-principal",
|
|
8
|
+
imports: [TarjetaComponent],
|
|
9
|
+
templateUrl: "./contenedor-principal.component.html",
|
|
10
|
+
styleUrl: "./contenedor-principal.component.css"
|
|
11
|
+
})
|
|
12
|
+
export class ContenedorPrincipalComponent {
|
|
13
|
+
public cantidad: number = 0;
|
|
14
|
+
public cantidadMaxima: number = 0;
|
|
15
|
+
|
|
16
|
+
constructor(/*private http: HttpClient, private datosGlobalesService: DatosGlobalesService */) {
|
|
17
|
+
this.cantidad = 0;
|
|
18
|
+
this.cantidadMaxima = 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ngOnInit() {
|
|
22
|
+
// this.http.get(`${this.datosGlobalesService.ObtenerURL()}licencias/consolidadoDeLaJefatura`).subscribe({
|
|
23
|
+
// next: (datos: any) => {
|
|
24
|
+
// if (datos.error) {
|
|
25
|
+
// console.error('Problemas al obtener los datos:', datos.error);
|
|
26
|
+
// return;
|
|
27
|
+
// }
|
|
28
|
+
// this.cantidad = datos.body[0]['cantidad'];
|
|
29
|
+
// this.cantidadMaxima = datos.body[0]['cantidadMaxima'];
|
|
30
|
+
// },
|
|
31
|
+
// error: (error) => {
|
|
32
|
+
// console.error('Problemas al intentar obtener los datos: ', error);
|
|
33
|
+
// },
|
|
34
|
+
// });
|
|
35
|
+
}
|
|
36
|
+
}
|
package/templates/frontend/src/app/Paginas/gestion-de-reportes/gestion-de-reportes.component.html
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<h1>Reportería del módulo</h1>
|
|
2
|
+
<div class="contenido">
|
|
3
|
+
<app-tarjeta-reporte [reporteAGenerar]="'ElReporte1'" titulo="Reporte número uno"
|
|
4
|
+
descripcion="Acá la descripción de lo que hace el reporte número uno"
|
|
5
|
+
icono="pie_chart" (GenerarReporte)="GenerarReporte($event)"></app-tarjeta-reporte>
|
|
6
|
+
</div>
|
package/templates/frontend/src/app/Paginas/gestion-de-reportes/gestion-de-reportes.component.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component } from "@angular/core";
|
|
2
|
+
import { HttpClient, HttpHeaders } from "@angular/common/http";
|
|
3
|
+
import { DatosGlobalesService } from '../../datos-globales.service'
|
|
4
|
+
import { TarjetaReporteComponent } from '../../Componentes/Nucleo/tarjeta-reporte/tarjeta-reporte.component';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: "gestion-de-reportes",
|
|
8
|
+
imports: [TarjetaReporteComponent],
|
|
9
|
+
templateUrl: "./gestion-de-reportes.component.html",
|
|
10
|
+
styleUrl: "./gestion-de-reportes.component.css"
|
|
11
|
+
})
|
|
12
|
+
export class GestionDeReportesComponent {
|
|
13
|
+
|
|
14
|
+
constructor(private http: HttpClient, private datosGlobalesService: DatosGlobalesService) { }
|
|
15
|
+
|
|
16
|
+
ngOnInit() { }
|
|
17
|
+
|
|
18
|
+
GenerarReporte(event: { reporte: string }) {
|
|
19
|
+
if (event.reporte === 'ElReporte1') {
|
|
20
|
+
this.http.get(`${this.datosGlobalesService.ObtenerURL()}misc/DatosParaReporteCSV`, {
|
|
21
|
+
responseType: 'text'
|
|
22
|
+
}).subscribe({
|
|
23
|
+
next: (datos: any) => {
|
|
24
|
+
const blob = new Blob([decodeURIComponent(datos)], { type: 'text/csv;charset=utf-8;' });
|
|
25
|
+
const enlace = document.createElement('a');
|
|
26
|
+
enlace.href = URL.createObjectURL(blob);
|
|
27
|
+
enlace.download = 'datos.csv';
|
|
28
|
+
enlace.click();
|
|
29
|
+
},
|
|
30
|
+
error: (error) => {
|
|
31
|
+
console.error('Problemas al intentar descargar el reporte: ', error);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div>
|
|
2
|
+
<!-- <h3>Gráficos sobre módulos del SIGU</h3> -->
|
|
3
|
+
@if(cargando) {
|
|
4
|
+
<div class="cargando-overlay">
|
|
5
|
+
<mat-spinner diameter="50"></mat-spinner>
|
|
6
|
+
<p>Procesando, por favor espere...</p>
|
|
7
|
+
</div>
|
|
8
|
+
} @else {
|
|
9
|
+
<app-graficos [TipoDeGrafico]="'Pie'" [Datos]="datosParaElGraficoPie" [Titulo]="'Módulos desarrollados en SIGU'" />
|
|
10
|
+
<app-graficos [TipoDeGrafico]="'Barras'" [Datos]="datosParaElGraficoBarras"
|
|
11
|
+
[Titulo]="'Total de nacimientos por mes'" />
|
|
12
|
+
}
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
4
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
6
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
7
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
8
|
+
import { DatosGlobalesService } from '../../datos-globales.service';
|
|
9
|
+
// import { MatDialog } from '@angular/material/dialog';
|
|
10
|
+
// import { TablaComponent } from '../../Componentes/Nucleo/tabla/tabla.component';
|
|
11
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
12
|
+
// import { GuardarIncapacidadComponent } from '../../Componentes/guardar-incapacidad/guardar-incapacidad.component';
|
|
13
|
+
// import { MensajeConfirmacionComponent } from '../../Componentes/Nucleo/mensaje-confirmacion/mensaje-confirmacion';
|
|
14
|
+
// import { SubirArchivoComponent } from '../../Componentes/Nucleo/subir-archivo/subir-archivo.component';
|
|
15
|
+
// import { MensajeInformacionComponent } from '../../Componentes/Nucleo/mensaje-informacion/mensaje-informacion';
|
|
16
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
17
|
+
import { GraficosComponent } from '../../Componentes/Nucleo/graficos/graficos.component';
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
selector: 'app-gestion-graficos',
|
|
21
|
+
imports: [
|
|
22
|
+
// TablaComponent,
|
|
23
|
+
MatFormFieldModule,
|
|
24
|
+
MatSelectModule,
|
|
25
|
+
FormsModule,
|
|
26
|
+
MatRadioModule,
|
|
27
|
+
MatProgressBarModule,
|
|
28
|
+
MatButtonModule,
|
|
29
|
+
MatProgressSpinnerModule,
|
|
30
|
+
GraficosComponent
|
|
31
|
+
],
|
|
32
|
+
templateUrl: './gestion-graficos.component.html',
|
|
33
|
+
styleUrls: ['./gestion-graficos.component.css'],
|
|
34
|
+
})
|
|
35
|
+
export class GestionGraficosComponent {
|
|
36
|
+
|
|
37
|
+
public cargando: boolean = false;
|
|
38
|
+
public datosParaElGraficoPie: any;
|
|
39
|
+
public datosParaElGraficoBarras: any;
|
|
40
|
+
constructor(private http: HttpClient, private datosGlobalesService: DatosGlobalesService) {
|
|
41
|
+
}
|
|
42
|
+
ngOnInit() {
|
|
43
|
+
this.cargando = true;
|
|
44
|
+
this.http.get(`${this.datosGlobalesService.ObtenerURL()}misc/DatosParaGraficoDePie`).subscribe({
|
|
45
|
+
next: (datos: any) => {
|
|
46
|
+
if (datos.error) {
|
|
47
|
+
console.error('Problemas al intentar obtener los registros:', datos.error);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.datosParaElGraficoPie = datos.body;
|
|
51
|
+
// this.cargando = false;
|
|
52
|
+
},
|
|
53
|
+
error: (error) => {
|
|
54
|
+
console.error('Problemas al intentar obtener los registros: ', error);
|
|
55
|
+
// this.cargando = false;
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
// this.cargando = true;
|
|
59
|
+
this.http.get(`${this.datosGlobalesService.ObtenerURL()}misc/DatosParaGraficoDeBarras`).subscribe({
|
|
60
|
+
next: (datos: any) => {
|
|
61
|
+
if (datos.error) {
|
|
62
|
+
console.error('Problemas al intentar obtener los registros:', datos.error);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.datosParaElGraficoBarras = datos.body;
|
|
66
|
+
// this.cargando = false;
|
|
67
|
+
},
|
|
68
|
+
error: (error) => {
|
|
69
|
+
console.error('Problemas al intentar obtener los registros: ', error);
|
|
70
|
+
// this.cargando = false;
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
this.cargando = false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { IframeComponent } from '../../Componentes/Nucleo/iframe/iframe';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-gestion-iframe1',
|
|
6
|
+
imports: [
|
|
7
|
+
IframeComponent
|
|
8
|
+
],
|
|
9
|
+
templateUrl: './gestion-iframe1.component.html',
|
|
10
|
+
styleUrls: ['./gestion-iframe1.component.css'],
|
|
11
|
+
})
|
|
12
|
+
export class GestionIframe1Component {
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<div>
|
|
2
|
+
<h3>Listado de incapacidades, licencias y permisos por persona</h3>
|
|
3
|
+
@if(cargando) {
|
|
4
|
+
<div class="cargando-overlay">
|
|
5
|
+
<mat-spinner diameter="50"></mat-spinner>
|
|
6
|
+
<p>Procesando, por favor espere...</p>
|
|
7
|
+
</div>
|
|
8
|
+
}
|
|
9
|
+
@if(DatosParaPoblarLaTabla){
|
|
10
|
+
<div class="borde">
|
|
11
|
+
<app-tabla [columnas]="columnas" [datos]="DatosParaPoblarLaTabla" [acciones]="acciones"
|
|
12
|
+
[mostrarElBotonDeGuardado]="true" [mostrarElBotonDeDescargar]="true" [accionesSiempreClickeable]="accionesSiempreClickeable"
|
|
13
|
+
[estadosQuePermitenEdicion]="estadosQuePermitenEdicion" (GuardarAccion)="AbrirModal()"
|
|
14
|
+
(DescargarInformacion)="DescargarReporte()" (CambioDePagina)="onCambioDePagina($event)"
|
|
15
|
+
[paginarResultados]="PaginarResultados" [TotalDeRegistros]="TotalDeRegistros"></app-tabla>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="pie">
|
|
18
|
+
</div>
|
|
19
|
+
} @else {
|
|
20
|
+
<div>
|
|
21
|
+
<mat-progress-bar mode="indeterminate"></mat-progress-bar>Cargando...
|
|
22
|
+
</div>
|
|
23
|
+
}
|
|
24
|
+
</div>
|