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,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "frontend",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"start": "ng serve --host=0.0.0.0 --disable-host-check",
|
|
7
|
+
"build": "ng build",
|
|
8
|
+
"watch": "ng build --watch --configuration development",
|
|
9
|
+
"test": "ng test"
|
|
10
|
+
},
|
|
11
|
+
"private": true,
|
|
12
|
+
"packageManager": "npm@10.8.2",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@angular/animations": "^21.0.4",
|
|
15
|
+
"@angular/cdk": "^21.0.3",
|
|
16
|
+
"@angular/common": "^21.0.0",
|
|
17
|
+
"@angular/compiler": "^21.0.0",
|
|
18
|
+
"@angular/core": "^21.0.0",
|
|
19
|
+
"@angular/forms": "^21.0.0",
|
|
20
|
+
"@angular/material": "^21.0.3",
|
|
21
|
+
"@angular/platform-browser": "^21.0.0",
|
|
22
|
+
"@angular/platform-browser-dynamic": "^21.0.4",
|
|
23
|
+
"@angular/router": "^21.0.0",
|
|
24
|
+
"chart.js": "^4.5.1",
|
|
25
|
+
"ng2-charts": "^8.0.0",
|
|
26
|
+
"rxjs": "~7.8.0",
|
|
27
|
+
"tslib": "^2.3.0",
|
|
28
|
+
"zone.js": "^0.16.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@angular-devkit/build-angular": "^21.0.3",
|
|
32
|
+
"@angular/build": "^21.0.3",
|
|
33
|
+
"@angular/cli": "^21.0.3",
|
|
34
|
+
"@angular/compiler-cli": "^21.0.0",
|
|
35
|
+
"@types/jasmine": "^5.1.13",
|
|
36
|
+
"jasmine-core": "^5.13.0",
|
|
37
|
+
"jsdom": "^27.1.0",
|
|
38
|
+
"karma": "^6.4.4",
|
|
39
|
+
"karma-chrome-launcher": "^3.2.0",
|
|
40
|
+
"karma-coverage": "^2.2.1",
|
|
41
|
+
"karma-jasmine": "^5.1.0",
|
|
42
|
+
"karma-jasmine-html-reporter": "^2.1.0",
|
|
43
|
+
"typescript": "~5.9.2",
|
|
44
|
+
"vitest": "^4.0.8"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="contenedor">
|
|
2
|
+
@if(Datos && TipoDeGrafico==='Barras') {
|
|
3
|
+
<!-- Gráfico de Barras -->
|
|
4
|
+
<div class="grafico" [ngStyle]="{ width: Ancho, height: Alto }">
|
|
5
|
+
<h3>{{Titulo}}</h3>
|
|
6
|
+
<canvas baseChart [data]="barChartData" [options]="barChartOptions" [type]="'bar'"></canvas>
|
|
7
|
+
</div>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@if(Datos && TipoDeGrafico==='Pie') {
|
|
11
|
+
<!-- Gráfico de Pie -->
|
|
12
|
+
<div class="grafico" [ngStyle]="{ width: Ancho, height: Alto }">
|
|
13
|
+
<h3>{{Titulo}}</h3>
|
|
14
|
+
<canvas baseChart [data]="pieChartData" [options]="pieChartOptions" [type]="'pie'"></canvas>
|
|
15
|
+
</div>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@if(Datos && TipoDeGrafico==='Línea') {
|
|
19
|
+
<!-- Gráfico de Línea -->
|
|
20
|
+
<div class="grafico" [ngStyle]="{ width: Ancho, height: Alto }">
|
|
21
|
+
<h3>{{Titulo}}</h3>
|
|
22
|
+
<canvas baseChart [data]="lineChartData" [options]="lineChartOptions" [type]="'line'"></canvas>
|
|
23
|
+
</div>
|
|
24
|
+
}
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { BaseChartDirective } from 'ng2-charts';
|
|
3
|
+
import { ChartConfiguration, ChartData } from 'chart.js';
|
|
4
|
+
import { NgStyle } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-graficos',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [BaseChartDirective, NgStyle],
|
|
10
|
+
templateUrl: './graficos.component.html',
|
|
11
|
+
styleUrl: './graficos.component.css'
|
|
12
|
+
})
|
|
13
|
+
export class GraficosComponent {
|
|
14
|
+
|
|
15
|
+
@Input() public TipoDeGrafico: string = '';
|
|
16
|
+
@Input() public Datos: [{}] = [{}];
|
|
17
|
+
@Input() public Titulo: string = '';
|
|
18
|
+
@Input() public Ancho: string = '400px';
|
|
19
|
+
@Input() public Alto: string = '300px';
|
|
20
|
+
|
|
21
|
+
// === Gráfico de Barras ===
|
|
22
|
+
public barChartOptions: ChartConfiguration<'bar'>['options'] = { responsive: true, };
|
|
23
|
+
public barChartData: ChartData<'bar'> = { labels: [], datasets: [] };
|
|
24
|
+
|
|
25
|
+
// === Gráfico de Pie ===
|
|
26
|
+
public pieChartOptions: ChartConfiguration<'pie'>['options'] = { responsive: true, };
|
|
27
|
+
public pieChartData: ChartData<'pie', number[], string | string[]> = { labels: [], datasets: [] };
|
|
28
|
+
|
|
29
|
+
// === Gráfico de Línea ===
|
|
30
|
+
public lineChartOptions: ChartConfiguration<'line'>['options'] = { responsive: true, };
|
|
31
|
+
public lineChartData: ChartData<'line'> = {
|
|
32
|
+
labels: [],
|
|
33
|
+
datasets: [
|
|
34
|
+
{
|
|
35
|
+
data: [65, 59, 80, 81, 56],
|
|
36
|
+
label: 'Tendencia de Ventas',
|
|
37
|
+
fill: true,
|
|
38
|
+
tension: 0.4, // suaviza la línea
|
|
39
|
+
borderColor: 'blue',
|
|
40
|
+
backgroundColor: 'rgba(30,144,255,0.2)'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
data: [28, 48, 40, 19, 86],
|
|
44
|
+
label: 'Tendencia de Compras',
|
|
45
|
+
fill: true,
|
|
46
|
+
tension: 0.4,
|
|
47
|
+
borderColor: 'green',
|
|
48
|
+
backgroundColor: 'rgba(34,139,34,0.2)'
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
constructor() { }
|
|
54
|
+
|
|
55
|
+
ngOnChanges() {
|
|
56
|
+
if (this.TipoDeGrafico === 'Pie') {
|
|
57
|
+
const Etiquetas: string[] = [];
|
|
58
|
+
const Datos: number[] = [];
|
|
59
|
+
this.Datos.forEach((elemento: any) => {
|
|
60
|
+
Etiquetas.push(elemento.Etiqueta);
|
|
61
|
+
Datos.push(elemento.Total);
|
|
62
|
+
});
|
|
63
|
+
this.pieChartData.datasets = [{ data: Datos }];
|
|
64
|
+
this.pieChartData.labels = Etiquetas;
|
|
65
|
+
}
|
|
66
|
+
if (this.TipoDeGrafico === 'Barras') {
|
|
67
|
+
const ejesHorizontales = [...new Set(this.Datos.map((item: any) => item.EjeHorizontal))];
|
|
68
|
+
const etiquetas = [...new Set(this.Datos.map((item: any) => item.Etiqueta))];
|
|
69
|
+
const datasets = etiquetas.map(etiqueta => ({
|
|
70
|
+
label: etiqueta,
|
|
71
|
+
data: ejesHorizontales.map(mes => {
|
|
72
|
+
const registro: any = this.Datos.find((item: any) => item.EjeHorizontal === mes && item.Etiqueta === etiqueta);
|
|
73
|
+
return registro ? registro.Total : 0;
|
|
74
|
+
})
|
|
75
|
+
}));
|
|
76
|
+
this.barChartData.labels = ejesHorizontales;
|
|
77
|
+
this.barChartData.datasets = datasets;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Component, Input, OnChanges } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-iframe',
|
|
6
|
+
standalone: true,
|
|
7
|
+
template: `
|
|
8
|
+
<div class="iframe-container">
|
|
9
|
+
@if(safeUrl) {
|
|
10
|
+
<iframe [src]="safeUrl" frameborder="0"></iframe>
|
|
11
|
+
}
|
|
12
|
+
</div>
|
|
13
|
+
`,
|
|
14
|
+
styles: [`
|
|
15
|
+
.iframe-container {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 600px;
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
iframe {
|
|
21
|
+
flex: 1;
|
|
22
|
+
border: none;
|
|
23
|
+
}
|
|
24
|
+
`]
|
|
25
|
+
})
|
|
26
|
+
export class IframeComponent implements OnChanges {
|
|
27
|
+
@Input() url: string = '';
|
|
28
|
+
safeUrl!: SafeResourceUrl;
|
|
29
|
+
|
|
30
|
+
constructor(private sanitizer: DomSanitizer) {}
|
|
31
|
+
|
|
32
|
+
ngOnChanges() {
|
|
33
|
+
if (this.url) {
|
|
34
|
+
this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.url);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<h3 mat-dialog-title>{{ data.titulo }}</h3>
|
|
2
|
+
|
|
3
|
+
<mat-dialog-content>
|
|
4
|
+
<p>{{ data.mensaje }}</p>
|
|
5
|
+
@if(SolicitaMensaje){
|
|
6
|
+
<mat-form-field class="mensaje">
|
|
7
|
+
<mat-label>Agregar comentario</mat-label>
|
|
8
|
+
<textarea matInput placeholder="Explicación del motivo de aprobación o rechazo" [(ngModel)]="MensajeBrindado"></textarea>
|
|
9
|
+
</mat-form-field>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
</mat-dialog-content>
|
|
13
|
+
|
|
14
|
+
<mat-dialog-actions>
|
|
15
|
+
@if(data.textoCerrar){
|
|
16
|
+
<button mat-button (click)="onClose()">{{ data.textoCerrar }}</button>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@if(data.textoAceptar){
|
|
20
|
+
<button mat-button (click)="onAccept()" cdkFocusInitial>{{ data.textoAceptar }}</button>
|
|
21
|
+
}
|
|
22
|
+
</mat-dialog-actions>
|
package/templates/frontend/src/app/Componentes/Nucleo/mensaje-confirmacion/mensaje-confirmacion.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
3
|
+
import {
|
|
4
|
+
MAT_DIALOG_DATA,
|
|
5
|
+
MatDialogActions,
|
|
6
|
+
MatDialogContent,
|
|
7
|
+
MatDialogRef,
|
|
8
|
+
MatDialogTitle
|
|
9
|
+
} from '@angular/material/dialog';
|
|
10
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
+
import { MatInputModule } from '@angular/material/input';
|
|
12
|
+
import { FormsModule } from '@angular/forms';
|
|
13
|
+
|
|
14
|
+
export interface DialogData {
|
|
15
|
+
titulo: string;
|
|
16
|
+
mensaje: string;
|
|
17
|
+
textoCerrar?: string;
|
|
18
|
+
textoAceptar?: string;
|
|
19
|
+
SolicitaMensaje?: string;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
onAccept?: (MensajeBrindado: any) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Component({
|
|
25
|
+
selector: 'app-dialogo',
|
|
26
|
+
templateUrl: './mensaje-confirmacion.component.html',
|
|
27
|
+
styleUrls: ['./mensaje-confirmacion.component.css'],
|
|
28
|
+
imports: [
|
|
29
|
+
MatButtonModule,
|
|
30
|
+
MatDialogTitle,
|
|
31
|
+
MatDialogContent,
|
|
32
|
+
MatDialogActions,
|
|
33
|
+
MatFormFieldModule,
|
|
34
|
+
MatInputModule,
|
|
35
|
+
FormsModule
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
export class MensajeConfirmacionComponent {
|
|
39
|
+
|
|
40
|
+
SolicitaMensaje: string | undefined;
|
|
41
|
+
|
|
42
|
+
public MensajeBrindado: string = '';
|
|
43
|
+
|
|
44
|
+
constructor(
|
|
45
|
+
public dialogRef: MatDialogRef<MensajeConfirmacionComponent>,
|
|
46
|
+
@Inject(MAT_DIALOG_DATA) public data: DialogData
|
|
47
|
+
) {
|
|
48
|
+
this.SolicitaMensaje = this.data.SolicitaMensaje;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
onClose(): void {
|
|
52
|
+
if (this.data.onClose) {
|
|
53
|
+
this.data.onClose();
|
|
54
|
+
}
|
|
55
|
+
this.dialogRef.close();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onAccept(): void {
|
|
59
|
+
if (this.data.onAccept) {
|
|
60
|
+
this.data.onAccept(this.MensajeBrindado);
|
|
61
|
+
}
|
|
62
|
+
this.dialogRef.close(this.MensajeBrindado);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<h3 mat-dialog-title>{{ data.titulo }}</h3>
|
|
2
|
+
|
|
3
|
+
<mat-dialog-content>
|
|
4
|
+
<p><span [innerHTML]="data.mensaje"></span></p>
|
|
5
|
+
@if(SolicitaMensaje){
|
|
6
|
+
<mat-form-field class="mensaje">
|
|
7
|
+
<mat-label>Agregar comentario</mat-label>
|
|
8
|
+
<textarea matInput placeholder="Explicación del motivo de aprobación o rechazo" [(ngModel)]="MensajeBrindado"></textarea>
|
|
9
|
+
</mat-form-field>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
</mat-dialog-content>
|
|
13
|
+
|
|
14
|
+
<mat-dialog-actions>
|
|
15
|
+
@if(data.textoCerrar){
|
|
16
|
+
<button mat-button (click)="onClose()">{{ data.textoCerrar }}</button>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@if(data.textoAceptar){
|
|
20
|
+
<button mat-button (click)="onAccept()" cdkFocusInitial>{{ data.textoAceptar }}</button>
|
|
21
|
+
}
|
|
22
|
+
</mat-dialog-actions>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
3
|
+
import {
|
|
4
|
+
MAT_DIALOG_DATA,
|
|
5
|
+
MatDialogActions,
|
|
6
|
+
MatDialogContent,
|
|
7
|
+
MatDialogRef,
|
|
8
|
+
MatDialogTitle
|
|
9
|
+
} from '@angular/material/dialog';
|
|
10
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
+
import { MatInputModule } from '@angular/material/input';
|
|
12
|
+
import { FormsModule } from '@angular/forms';
|
|
13
|
+
|
|
14
|
+
export interface DialogData {
|
|
15
|
+
titulo: string;
|
|
16
|
+
mensaje: string;
|
|
17
|
+
textoCerrar?: string;
|
|
18
|
+
textoAceptar?: string;
|
|
19
|
+
SolicitaMensaje?: string;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
onAccept?: (MensajeBrindado: any) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Component({
|
|
25
|
+
selector: 'mensaje-confirmacion-html',
|
|
26
|
+
templateUrl: './mensaje-confirmacion-html.component.html',
|
|
27
|
+
styleUrls: ['./mensaje-confirmacion-html.component.css'],
|
|
28
|
+
imports: [
|
|
29
|
+
MatButtonModule,
|
|
30
|
+
MatDialogTitle,
|
|
31
|
+
MatDialogContent,
|
|
32
|
+
MatDialogActions,
|
|
33
|
+
MatFormFieldModule,
|
|
34
|
+
MatInputModule,
|
|
35
|
+
FormsModule
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
export class MensajeConfirmacionHTMLComponent {
|
|
39
|
+
|
|
40
|
+
SolicitaMensaje: string | undefined;
|
|
41
|
+
|
|
42
|
+
public MensajeBrindado: string = '';
|
|
43
|
+
|
|
44
|
+
constructor(
|
|
45
|
+
public dialogRef: MatDialogRef<MensajeConfirmacionHTMLComponent>,
|
|
46
|
+
@Inject(MAT_DIALOG_DATA) public data: DialogData
|
|
47
|
+
) {
|
|
48
|
+
this.SolicitaMensaje = this.data.SolicitaMensaje;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
onClose(): void {
|
|
52
|
+
if (this.data.onClose) {
|
|
53
|
+
this.data.onClose();
|
|
54
|
+
}
|
|
55
|
+
this.dialogRef.close();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onAccept(): void {
|
|
59
|
+
if (this.data.onAccept) {
|
|
60
|
+
this.data.onAccept(this.MensajeBrindado);
|
|
61
|
+
}
|
|
62
|
+
this.dialogRef.close(this.MensajeBrindado);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<h3 mat-dialog-title>Información detallada del registro</h3>
|
|
2
|
+
|
|
3
|
+
<mat-dialog-content>
|
|
4
|
+
@for (propiedad of arregloDeDatos; track propiedad.llave) {
|
|
5
|
+
<p><strong>{{ propiedad.llave }}:</strong><span [innerHTML]="propiedad.valor"></span></p>
|
|
6
|
+
<mat-divider></mat-divider>
|
|
7
|
+
}
|
|
8
|
+
</mat-dialog-content>
|
|
9
|
+
<mat-dialog-actions>
|
|
10
|
+
<button mat-button (click)="onClose()">Cerrar</button>
|
|
11
|
+
</mat-dialog-actions>
|
package/templates/frontend/src/app/Componentes/Nucleo/mensaje-informacion/mensaje-informacion.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
3
|
+
import {
|
|
4
|
+
MAT_DIALOG_DATA,
|
|
5
|
+
MatDialogActions,
|
|
6
|
+
MatDialogContent,
|
|
7
|
+
MatDialogRef,
|
|
8
|
+
MatDialogTitle
|
|
9
|
+
} from '@angular/material/dialog';
|
|
10
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
11
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
12
|
+
|
|
13
|
+
export interface DialogData {
|
|
14
|
+
Informacion: any;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: 'app-mensaje-informacion',
|
|
20
|
+
templateUrl: './mensaje-informacion.component.html',
|
|
21
|
+
styleUrls: ['./mensaje-informacion.component.css'],
|
|
22
|
+
imports: [
|
|
23
|
+
MatButtonModule,
|
|
24
|
+
MatDialogTitle,
|
|
25
|
+
MatDialogContent,
|
|
26
|
+
MatDialogActions,
|
|
27
|
+
MatDividerModule
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
export class MensajeInformacionComponent {
|
|
31
|
+
public arregloDeDatos: { llave: string; valor: SafeHtml }[];
|
|
32
|
+
|
|
33
|
+
constructor(public dialogRef: MatDialogRef<MensajeInformacionComponent>
|
|
34
|
+
, @Inject(MAT_DIALOG_DATA) public data: DialogData
|
|
35
|
+
, private sanitizer: DomSanitizer
|
|
36
|
+
) {
|
|
37
|
+
this.arregloDeDatos = Object.entries(this.data).map(([llave, valor]) => ({
|
|
38
|
+
llave,
|
|
39
|
+
valor: this.sanitizer.bypassSecurityTrustHtml(valor?.toString() ?? '')
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
onClose(): void {
|
|
44
|
+
this.dialogRef.close();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<h3 mat-dialog-title>Mensajes</h3>
|
|
2
|
+
|
|
3
|
+
<mat-dialog-content>
|
|
4
|
+
@for (item of arregloDeDatos; track item.llave) {
|
|
5
|
+
<div class="linea" [class.tachado]="item.tachado">
|
|
6
|
+
<span [innerHTML]="item.valor"></span>
|
|
7
|
+
<button mat-icon-button color="primary" (click)="enviar(item)">
|
|
8
|
+
<mat-icon>beenhere</mat-icon>
|
|
9
|
+
</button>
|
|
10
|
+
</div>
|
|
11
|
+
<mat-divider></mat-divider>
|
|
12
|
+
}
|
|
13
|
+
</mat-dialog-content>
|
|
14
|
+
|
|
15
|
+
<mat-dialog-actions align="end">
|
|
16
|
+
<button mat-button (click)="onClose()">Cerrar</button>
|
|
17
|
+
</mat-dialog-actions>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
3
|
+
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
4
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
6
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
7
|
+
import { MatDialogContent, MatDialogActions, MatDialogTitle } from '@angular/material/dialog';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { DatosGlobalesService } from '../../../datos-globales.service';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'app-mensajes',
|
|
13
|
+
templateUrl: './mensajes.component.html',
|
|
14
|
+
styleUrls: ['./mensajes.component.css'],
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [
|
|
17
|
+
CommonModule,
|
|
18
|
+
MatButtonModule,
|
|
19
|
+
MatIconModule,
|
|
20
|
+
MatDividerModule,
|
|
21
|
+
MatDialogTitle,
|
|
22
|
+
MatDialogContent,
|
|
23
|
+
MatDialogActions
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
export class MensajesComponent {
|
|
27
|
+
public arregloDeDatos: { llave: any; valor: any; tachado: any }[] = [];
|
|
28
|
+
|
|
29
|
+
constructor(private http: HttpClient, public dialogRef: MatDialogRef<MensajesComponent>
|
|
30
|
+
, @Inject(MAT_DIALOG_DATA) public data: any, private datosGlobalesService: DatosGlobalesService) {
|
|
31
|
+
this.arregloDeDatos = data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
onClose(): void {
|
|
35
|
+
this.dialogRef.close();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
enviar(item: { llave: any; valor: any; tachado: any }) {
|
|
39
|
+
item.tachado = true;
|
|
40
|
+
this.http
|
|
41
|
+
.post(`${this.datosGlobalesService.ObtenerURL()}misc/actualizarNotificacion`, { FechaYHoraDeCreacion: item.llave }).subscribe();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.contenedor {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.fila {
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-width: 500px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.campo {
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.zona-archivo {
|
|
16
|
+
width: 90%;
|
|
17
|
+
height: 10vh;
|
|
18
|
+
margin-left: 4%;
|
|
19
|
+
border: 2px dashed #3498db;
|
|
20
|
+
padding: 1%;
|
|
21
|
+
align-items: center;
|
|
22
|
+
display: flex;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
transition: background 0.3s;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.texto {
|
|
28
|
+
width: 100%;
|
|
29
|
+
text-align: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.texto-clic {
|
|
33
|
+
color: #007bff;
|
|
34
|
+
font-weight: bold;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
text-decoration: underline;
|
|
37
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<h2 mat-dialog-title>Reporte de incidencias</h2>
|
|
2
|
+
<mat-dialog-content>
|
|
3
|
+
<div class="contenedor">
|
|
4
|
+
<form [formGroup]="formulario">
|
|
5
|
+
<div class="fila">
|
|
6
|
+
<mat-form-field class="campo">
|
|
7
|
+
<mat-label>Detalle del problema</mat-label>
|
|
8
|
+
<textarea matInput formControlName="detalle" required></textarea>
|
|
9
|
+
</mat-form-field>
|
|
10
|
+
<mat-form-field class="campo">
|
|
11
|
+
<mat-label>Resultado esperado</mat-label>
|
|
12
|
+
<textarea matInput formControlName="resultado" required></textarea>
|
|
13
|
+
</mat-form-field>
|
|
14
|
+
<mat-form-field class="campo">
|
|
15
|
+
<mat-label>Información de contacto</mat-label>
|
|
16
|
+
<textarea matInput formControlName="contacto" required></textarea>
|
|
17
|
+
</mat-form-field>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="zona-archivo" (click)="AbrirGestorDeArchivos()" (dragover)="ArrastrarAdentro($event)"
|
|
20
|
+
(dragleave)="ArrastrarAfuera($event)" (drop)="Soltar($event)">
|
|
21
|
+
@if(!Archivo){
|
|
22
|
+
<p class="texto">Arrastra y suelta un archivo aquí o <span class="texto-clic">haz clic para subirlo</span></p>
|
|
23
|
+
}
|
|
24
|
+
@else{
|
|
25
|
+
<p>Archivo seleccionado: {{ Archivo.name }}</p>
|
|
26
|
+
}
|
|
27
|
+
<input type="file" #EntradDeArchivo hidden (change)="ArchivoSeleccionado($event)">
|
|
28
|
+
</div>
|
|
29
|
+
</form>
|
|
30
|
+
</div>
|
|
31
|
+
</mat-dialog-content>
|
|
32
|
+
<mat-dialog-actions>
|
|
33
|
+
<button mat-button (click)="Cerrar()">Cerrar</button>
|
|
34
|
+
<button mat-button (click)="Enviar()">Enviar</button>
|
|
35
|
+
</mat-dialog-actions>
|