utn-cli 2.0.62 → 2.0.64
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/frontend.js
CHANGED
|
@@ -245,8 +245,8 @@ function personalizarModalFrontend(contenido, tableInfo, fileName) {
|
|
|
245
245
|
return ` ${col.name}: controles.${col.name}Control.value`;
|
|
246
246
|
}).join(',\n');
|
|
247
247
|
|
|
248
|
-
contenido = contenido.replace(/let
|
|
249
|
-
`let controles = this.grupoFormulario.controls;\n this.dialogRef.close({\n${objetoRetorno},\n ${primaryKey}: this.data.Registro?.${primaryKey}\n })
|
|
248
|
+
contenido = contenido.replace(/let \w+ = this\.grupoFormulario\.controls;[\s\S]*?this\.dialogRef\.close\(\{[\s\S]*?\}\);/,
|
|
249
|
+
`let controles = this.grupoFormulario.controls;\n /*\n this.dialogRef.close({\n${objetoRetorno},\n ${primaryKey}: this.data.Registro?.${primaryKey}\n });\n */`);
|
|
250
250
|
|
|
251
251
|
// Quitar TiposDeLicencias si existe
|
|
252
252
|
contenido = contenido.replace(/TiposDeLicencias = this\.data\.TiposDeLicencias;/g, '');
|
package/package.json
CHANGED
|
@@ -58,7 +58,7 @@ export class GestionTablaXYZComponent {
|
|
|
58
58
|
// https://fonts.google.com/icons
|
|
59
59
|
public acciones = [
|
|
60
60
|
{ icono: 'edit', color: 'azul', textoAyuda: 'Editar', ejecutar: (fila: any) => this.AbrirModal(fila), },
|
|
61
|
-
{ icono: 'draw', color: 'marino', textoAyuda: 'Firmar', ejecutar: (fila: any) => this.confirmacionFirmaDelUsuario(fila), },
|
|
61
|
+
// { icono: 'draw', color: 'marino', textoAyuda: 'Firmar', ejecutar: (fila: any) => this.confirmacionFirmaDelUsuario(fila), },
|
|
62
62
|
{ icono: 'delete', color: 'rojo', textoAyuda: 'Eliminar', ejecutar: (fila: any) => this.confirmacionEliminar(fila), },
|
|
63
63
|
];
|
|
64
64
|
public accionesDinamicas = [];
|
|
@@ -71,7 +71,6 @@ export class GestionTablaXYZComponent {
|
|
|
71
71
|
public subAccionesDinamicas = [];
|
|
72
72
|
constructor(private http: HttpClient, private dialog: MatDialog, private datosGlobalesService: DatosGlobalesService) {
|
|
73
73
|
this.obtenerDatosParaPoblarLaTabla();
|
|
74
|
-
this.obtenerTiposLicencias();
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
// PuntosPorColegioEnCantonConMIDH(fila: any): void {
|
|
@@ -122,30 +121,6 @@ export class GestionTablaXYZComponent {
|
|
|
122
121
|
});
|
|
123
122
|
}
|
|
124
123
|
|
|
125
|
-
confirmacionFirmaDelUsuario(fila: any): void {
|
|
126
|
-
this.dialog.open(MensajeConfirmacionComponent, {
|
|
127
|
-
data: {
|
|
128
|
-
titulo: 'Confirmación',
|
|
129
|
-
mensaje: `¿Realmente desea hacer la confirmación de este registro?`,
|
|
130
|
-
textoCerrar: 'Cancelar',
|
|
131
|
-
textoAceptar: 'Firmar',
|
|
132
|
-
onClose: () => { },
|
|
133
|
-
onAccept: () => { this.firmaFuncionario(fila.LicenciaId) },
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
firmaFuncionario(LicenciaId: any): void {
|
|
138
|
-
this.http
|
|
139
|
-
.post(`${this.datosGlobalesService.ObtenerURL()}XYZ/firmaFuncionario`, { LicenciaId })
|
|
140
|
-
.subscribe({
|
|
141
|
-
next: (datos: any) => {
|
|
142
|
-
this.obtenerDatosParaPoblarLaTabla();
|
|
143
|
-
},
|
|
144
|
-
error: (error) => {
|
|
145
|
-
this.obtenerDatosParaPoblarLaTabla();
|
|
146
|
-
},
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
124
|
confirmacionEliminar(fila: any): void {
|
|
150
125
|
this.dialog.open(MensajeConfirmacionComponent, {
|
|
151
126
|
data: {
|
|
@@ -158,9 +133,10 @@ export class GestionTablaXYZComponent {
|
|
|
158
133
|
},
|
|
159
134
|
});
|
|
160
135
|
}
|
|
161
|
-
|
|
136
|
+
|
|
137
|
+
eliminar(fila: any): void {
|
|
162
138
|
this.http
|
|
163
|
-
.post(`${this.datosGlobalesService.ObtenerURL()}XYZ/borrar`, { LicenciaId })
|
|
139
|
+
.post(`${this.datosGlobalesService.ObtenerURL()}XYZ/borrar`, { LicenciaId: fila.LicenciaId })
|
|
164
140
|
.subscribe({
|
|
165
141
|
next: (datos: any) => {
|
|
166
142
|
this.obtenerDatosParaPoblarLaTabla();
|
|
@@ -215,23 +191,9 @@ export class GestionTablaXYZComponent {
|
|
|
215
191
|
},
|
|
216
192
|
});
|
|
217
193
|
}
|
|
218
|
-
obtenerTiposLicencias() {
|
|
219
|
-
this.http.get(`${this.datosGlobalesService.ObtenerURL()}XYZ/tipos`).subscribe({
|
|
220
|
-
next: (datos: any) => {
|
|
221
|
-
if (datos.error) {
|
|
222
|
-
console.error('Problemas al intentar obtener los registros:', datos.error);
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
this.tiposDeLicencias = datos.body || [];
|
|
226
194
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
console.error('Problemas al intentar obtener los registros: ', error);
|
|
230
|
-
},
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
Agregar(incapacidad: any) {
|
|
234
|
-
this.http.post(`${this.datosGlobalesService.ObtenerURL()}XYZ/agregar`, incapacidad).subscribe({
|
|
195
|
+
Agregar(fila: any) {
|
|
196
|
+
this.http.post(`${this.datosGlobalesService.ObtenerURL()}XYZ/agregar`, fila).subscribe({
|
|
235
197
|
next: (datos: any) => {
|
|
236
198
|
if (datos.error) {
|
|
237
199
|
console.log('Problemas al intentar obtener los registros:', datos.error);
|
|
@@ -244,8 +206,9 @@ export class GestionTablaXYZComponent {
|
|
|
244
206
|
},
|
|
245
207
|
});
|
|
246
208
|
}
|
|
247
|
-
|
|
248
|
-
|
|
209
|
+
|
|
210
|
+
Actualizar(fila: any) {
|
|
211
|
+
this.http.post(`${this.datosGlobalesService.ObtenerURL()}XYZ/actualizar`, fila).subscribe({
|
|
249
212
|
next: (datos: any) => {
|
|
250
213
|
if (datos.error) {
|
|
251
214
|
console.log('Problemas al intentar obtener los registros:', datos.error);
|
|
@@ -258,6 +221,7 @@ export class GestionTablaXYZComponent {
|
|
|
258
221
|
},
|
|
259
222
|
});
|
|
260
223
|
}
|
|
224
|
+
|
|
261
225
|
DescargarReporte() {
|
|
262
226
|
this.cargando = true;
|
|
263
227
|
this.http.get(`${this.datosGlobalesService.ObtenerURL()}XYZ/reporte`, {
|
|
@@ -278,13 +242,14 @@ export class GestionTablaXYZComponent {
|
|
|
278
242
|
}
|
|
279
243
|
});
|
|
280
244
|
}
|
|
281
|
-
|
|
245
|
+
|
|
246
|
+
AbrirModal(fila?: any): void {
|
|
282
247
|
const dialogRef = this.dialog.open(GuardarIncapacidadComponent, {
|
|
283
|
-
data: { Incapacidad:
|
|
248
|
+
data: { Incapacidad: fila, TiposDeLicencias: this.tiposDeLicencias },
|
|
284
249
|
});
|
|
285
250
|
dialogRef.afterClosed().subscribe(result => {
|
|
286
251
|
if (result !== undefined) {
|
|
287
|
-
if (
|
|
252
|
+
if (fila) {
|
|
288
253
|
this.Actualizar(result);
|
|
289
254
|
}
|
|
290
255
|
else {
|
|
@@ -293,11 +258,12 @@ export class GestionTablaXYZComponent {
|
|
|
293
258
|
}
|
|
294
259
|
});
|
|
295
260
|
}
|
|
296
|
-
|
|
261
|
+
|
|
262
|
+
async AbrirModalArchivo(fila?: any): Promise<void> {
|
|
297
263
|
const dialogRef = this.dialog.open(SubirArchivoComponent, {
|
|
298
264
|
data: {
|
|
299
|
-
Etiqueta:
|
|
300
|
-
, EsEditable:
|
|
265
|
+
Etiqueta: fila.LicenciaId
|
|
266
|
+
, EsEditable: fila.Estado == 'Pendiente'
|
|
301
267
|
, Permiso: 'Usuario'
|
|
302
268
|
},
|
|
303
269
|
});
|