sf-documents 0.0.1 → 0.0.3
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/fesm2022/sf-documents.mjs +209 -80
- package/fesm2022/sf-documents.mjs.map +1 -1
- package/{dialog → lib/components/dialog}/upload-dialog/upload-dialog.component.d.ts +1 -1
- package/lib/gateways/document.port.d.ts +5 -3
- package/lib/sf-documents.component.d.ts +20 -5
- package/lib/sf-documents.service.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Pipe, InjectionToken, EventEmitter, ViewChild, Output, Input, Component, inject, ElementRef } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
4
|
import * as i3 from 'primeng/api';
|
|
4
5
|
import { ConfirmationService } from 'primeng/api';
|
|
5
6
|
import * as i2$1 from 'primeng/dynamicdialog';
|
|
@@ -8,26 +9,35 @@ import { ToastModule } from 'primeng/toast';
|
|
|
8
9
|
import * as _ from 'lodash';
|
|
9
10
|
import * as i1$1 from 'primeng/button';
|
|
10
11
|
import { ButtonModule } from 'primeng/button';
|
|
11
|
-
import * as
|
|
12
|
+
import * as i6 from 'primeng/confirmdialog';
|
|
12
13
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
13
|
-
import * as
|
|
14
|
+
import * as i7 from 'primeng/panel';
|
|
14
15
|
import { PanelModule } from 'primeng/panel';
|
|
15
|
-
import * as
|
|
16
|
+
import * as i8 from 'primeng/checkbox';
|
|
16
17
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
17
18
|
import * as i2 from 'primeng/dialog';
|
|
18
19
|
import { DialogModule } from 'primeng/dialog';
|
|
19
|
-
import * as
|
|
20
|
+
import * as i10 from '@angular/common';
|
|
20
21
|
import { CommonModule } from '@angular/common';
|
|
21
|
-
import * as
|
|
22
|
+
import * as i11 from '@angular/forms';
|
|
22
23
|
import { FormsModule } from '@angular/forms';
|
|
23
24
|
import * as i1 from '@angular/platform-browser';
|
|
24
|
-
import * as
|
|
25
|
+
import * as i12 from 'primeng/inputtext';
|
|
25
26
|
import { InputTextModule } from 'primeng/inputtext';
|
|
26
27
|
import { InputIcon } from 'primeng/inputicon';
|
|
27
28
|
import { IconField } from 'primeng/iconfield';
|
|
28
|
-
import
|
|
29
|
+
import * as i13 from 'primeng/dropdown';
|
|
30
|
+
import { DropdownModule } from 'primeng/dropdown';
|
|
31
|
+
import { tap, switchMap, finalize } from 'rxjs/operators';
|
|
32
|
+
import * as i14 from 'primeng/datepicker';
|
|
33
|
+
import { DatePickerModule } from 'primeng/datepicker';
|
|
29
34
|
|
|
30
35
|
class SfDocumentsService {
|
|
36
|
+
_loading = new BehaviorSubject(false);
|
|
37
|
+
loading$ = this._loading.asObservable();
|
|
38
|
+
set loading(loading) {
|
|
39
|
+
this._loading.next(loading);
|
|
40
|
+
}
|
|
31
41
|
constructor() { }
|
|
32
42
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
43
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, providedIn: 'root' });
|
|
@@ -74,18 +84,21 @@ class UploadDialogComponent {
|
|
|
74
84
|
}
|
|
75
85
|
fileChange(event) {
|
|
76
86
|
const input = event.target;
|
|
77
|
-
|
|
87
|
+
if (!input.files?.length)
|
|
88
|
+
return;
|
|
89
|
+
const files = Array.from(input.files);
|
|
90
|
+
const pdfs = files.filter(f => f.type === 'application/pdf' || f.name.toLowerCase().endsWith('.pdf'));
|
|
78
91
|
const imagePathInput = input.value;
|
|
79
|
-
if (
|
|
80
|
-
this.onUploaded.emit({ fileList, tagValue: imagePathInput });
|
|
92
|
+
if (pdfs?.length)
|
|
93
|
+
this.onUploaded.emit({ fileList: pdfs, tagValue: imagePathInput });
|
|
81
94
|
this.visible = false;
|
|
82
95
|
}
|
|
83
96
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UploadDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UploadDialogComponent, isStandalone: true, selector: "lib-upload-dialog", inputs: { selectedDocument: "selectedDocument" }, outputs: { onUploaded: "onUploaded", loadFile: "loadFile" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<button pButton type=\"button\" label=\"Adicionar\" icon=\"pi pi-plus\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"
|
|
97
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UploadDialogComponent, isStandalone: true, selector: "lib-upload-dialog", inputs: { selectedDocument: "selectedDocument" }, outputs: { onUploaded: "onUploaded", loadFile: "loadFile" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<button pButton type=\"button\" label=\"Adicionar\" icon=\"pi pi-plus\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"mt-3\">\r\n <div class=\"text-center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" accept=\"application/pdf,.pdf\" multiple>\r\n </div>\r\n <div class=\"text-center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] });
|
|
85
98
|
}
|
|
86
99
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UploadDialogComponent, decorators: [{
|
|
87
100
|
type: Component,
|
|
88
|
-
args: [{ selector: 'lib-upload-dialog', imports: [CommonModule, ButtonModule, DialogModule], template: "<button pButton type=\"button\" label=\"Adicionar\" icon=\"pi pi-plus\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"
|
|
101
|
+
args: [{ selector: 'lib-upload-dialog', imports: [CommonModule, ButtonModule, DialogModule], template: "<button pButton type=\"button\" label=\"Adicionar\" icon=\"pi pi-plus\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"mt-3\">\r\n <div class=\"text-center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" accept=\"application/pdf,.pdf\" multiple>\r\n </div>\r\n <div class=\"text-center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n" }]
|
|
89
102
|
}], ctorParameters: () => [], propDecorators: { selectedDocument: [{
|
|
90
103
|
type: Input
|
|
91
104
|
}], onUploaded: [{
|
|
@@ -103,6 +116,7 @@ class SfDocumentsComponent {
|
|
|
103
116
|
snackBar;
|
|
104
117
|
appRef;
|
|
105
118
|
confirmationService;
|
|
119
|
+
documentService;
|
|
106
120
|
documentsService = inject(DOCUMENT_SERVICE);
|
|
107
121
|
accion = "";
|
|
108
122
|
entidad = "";
|
|
@@ -147,12 +161,22 @@ class SfDocumentsComponent {
|
|
|
147
161
|
UsuarioNdoc;
|
|
148
162
|
UsuarioTdoc;
|
|
149
163
|
idKatios;
|
|
150
|
-
|
|
164
|
+
displayGenerate = false;
|
|
165
|
+
canGenerate = true; // lo puedes controlar por permisos si aplica
|
|
166
|
+
documentTypes = [];
|
|
167
|
+
documentsToGenerate = [];
|
|
168
|
+
documentsToGenerateMap = {};
|
|
169
|
+
dynamicParams = [];
|
|
170
|
+
dynamicValues = {};
|
|
171
|
+
selectedDocType = null;
|
|
172
|
+
selectedRange = null;
|
|
173
|
+
constructor(sanitizer, dialog, snackBar, appRef, confirmationService, documentService) {
|
|
151
174
|
this.sanitizer = sanitizer;
|
|
152
175
|
this.dialog = dialog;
|
|
153
176
|
this.snackBar = snackBar;
|
|
154
177
|
this.appRef = appRef;
|
|
155
178
|
this.confirmationService = confirmationService;
|
|
179
|
+
this.documentService = documentService;
|
|
156
180
|
}
|
|
157
181
|
ngOnInit() {
|
|
158
182
|
if (this.oSession != null && this.oSession.UsuarioSistema.TDOC !== undefined && this.oSession.UsuarioSistema.NDOC !== undefined) {
|
|
@@ -164,16 +188,40 @@ class SfDocumentsComponent {
|
|
|
164
188
|
}
|
|
165
189
|
}
|
|
166
190
|
cargarParametros(tipo) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
191
|
+
if (tipo !== '1')
|
|
192
|
+
return;
|
|
193
|
+
this.documentService.loading = true;
|
|
194
|
+
const data = {
|
|
195
|
+
action: this.accion,
|
|
196
|
+
entity: this.entidad,
|
|
197
|
+
tdoc: this.tdoc,
|
|
198
|
+
ndoc: this.ndoc,
|
|
199
|
+
request: this.Solicitud,
|
|
200
|
+
documentProfile: this.perfilDocumentos,
|
|
201
|
+
product: this.Producto
|
|
202
|
+
};
|
|
203
|
+
this.documentsService.getFolders(this.idKatios, data).pipe(tap((response) => {
|
|
204
|
+
const res = response.data.RESPUESTA;
|
|
205
|
+
this.okCargoArbol(res);
|
|
206
|
+
}), switchMap(() => this.documentsService.getDocumentsToGenerate(this.idKatios, this.Solicitud)), tap((resp) => {
|
|
207
|
+
const list = resp?.data ?? []; // según tu JSON real
|
|
208
|
+
this.documentsToGenerate = list;
|
|
209
|
+
this.documentsToGenerateMap = {};
|
|
210
|
+
list.forEach((d) => (this.documentsToGenerateMap[d.idDoc] = d));
|
|
211
|
+
// dropdown: usa idDoc pero mantén objeto completo en map
|
|
212
|
+
this.documentTypes = list.map((d) => ({
|
|
213
|
+
label: d.description,
|
|
214
|
+
code: d.idDoc
|
|
215
|
+
}));
|
|
216
|
+
}), finalize(() => {
|
|
217
|
+
this.documentService.loading = false;
|
|
218
|
+
})).subscribe({
|
|
219
|
+
error: (error) => {
|
|
220
|
+
this.errorCargarArbol(error);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
this.tab = 1;
|
|
224
|
+
this.documentoSeleccionado = null;
|
|
177
225
|
}
|
|
178
226
|
expandAll() {
|
|
179
227
|
this.files.forEach((node) => {
|
|
@@ -210,11 +258,11 @@ class SfDocumentsComponent {
|
|
|
210
258
|
this.files = iArbol;
|
|
211
259
|
this.filesFilter = iArbol;
|
|
212
260
|
this.expandAll();
|
|
213
|
-
this.
|
|
261
|
+
this.documentService.loading = false;
|
|
214
262
|
};
|
|
215
263
|
errorCargarArbol = (iError) => {
|
|
216
|
-
this.message("Error al traer la información
|
|
217
|
-
this.
|
|
264
|
+
this.message("error", "Error al traer la información", iError.message);
|
|
265
|
+
this.documentService.loading = false;
|
|
218
266
|
};
|
|
219
267
|
onClickedCheckDelete($event, document) {
|
|
220
268
|
if ($event.checked)
|
|
@@ -227,16 +275,16 @@ class SfDocumentsComponent {
|
|
|
227
275
|
if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === this.docsEliminables.length) {
|
|
228
276
|
this.cargarParametros(this.tipo);
|
|
229
277
|
if (this.totalDocsEliminadosApi.fallido > 0)
|
|
230
|
-
this.message("Algunos documentos no pudieron ser eliminados"
|
|
278
|
+
this.message("warn", "", "Algunos documentos no pudieron ser eliminados");
|
|
231
279
|
else
|
|
232
|
-
this.message("Documentos eliminados satisfactoriamente"
|
|
280
|
+
this.message("success", "", "Documentos eliminados satisfactoriamente");
|
|
233
281
|
}
|
|
234
282
|
};
|
|
235
283
|
funcErrDelDocumentMasivo = () => {
|
|
236
284
|
this.totalDocsEliminadosApi.fallido += 1;
|
|
237
285
|
if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === this.docsEliminables.length) {
|
|
238
286
|
this.cargarParametros(this.tipo);
|
|
239
|
-
this.message("Algunos documentos no pudieron ser eliminados"
|
|
287
|
+
this.message("warn", "", "Algunos documentos no pudieron ser eliminados");
|
|
240
288
|
}
|
|
241
289
|
};
|
|
242
290
|
eliminarMasivo() {
|
|
@@ -245,11 +293,19 @@ class SfDocumentsComponent {
|
|
|
245
293
|
acceptLabel: 'Si',
|
|
246
294
|
rejectLabel: 'No',
|
|
247
295
|
accept: () => {
|
|
248
|
-
this.
|
|
296
|
+
this.documentService.loading = true;
|
|
249
297
|
this.totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
250
298
|
this.docsEliminables.forEach(doc => {
|
|
251
|
-
let data = { "
|
|
252
|
-
this.documentsService.
|
|
299
|
+
let data = { "code": doc.codigo, "status": "DES" };
|
|
300
|
+
this.documentsService.updateStatus(this.idKatios, data).subscribe({
|
|
301
|
+
next: (response) => {
|
|
302
|
+
this.funcOkDelDocumentMasivo();
|
|
303
|
+
},
|
|
304
|
+
error: (error) => {
|
|
305
|
+
this.documentService.loading = false;
|
|
306
|
+
this.funcErrDelDocumentMasivo();
|
|
307
|
+
}
|
|
308
|
+
});
|
|
253
309
|
});
|
|
254
310
|
}
|
|
255
311
|
});
|
|
@@ -312,12 +368,12 @@ class SfDocumentsComponent {
|
|
|
312
368
|
// } else {
|
|
313
369
|
// this.loadFileToList(file);
|
|
314
370
|
// }
|
|
315
|
-
// this.
|
|
371
|
+
// this.documentService.loading = false;
|
|
316
372
|
// })
|
|
317
373
|
// .catch((error: Error) => {
|
|
318
374
|
// console.error('Error processing camera image:', error);
|
|
319
375
|
// this.message("Error al procesar la imagen de la cámara", "Error");
|
|
320
|
-
// this.
|
|
376
|
+
// this.documentService.loading = false;
|
|
321
377
|
// });
|
|
322
378
|
// }
|
|
323
379
|
loadFileToList(file) {
|
|
@@ -325,8 +381,8 @@ class SfDocumentsComponent {
|
|
|
325
381
|
file["name"] = "scan" + Date.now() + this.scanFileList.length + ".jpg";
|
|
326
382
|
this.scanFileList.push(file);
|
|
327
383
|
this.scanFileList = this.scanFileList.slice();
|
|
328
|
-
this.
|
|
329
|
-
this.message("
|
|
384
|
+
this.documentService.loading = false;
|
|
385
|
+
this.message("success", "", "Archivo cargado exitosamente");
|
|
330
386
|
this.appRef.tick();
|
|
331
387
|
}, 200);
|
|
332
388
|
}
|
|
@@ -345,7 +401,7 @@ class SfDocumentsComponent {
|
|
|
345
401
|
window.FileReader = orig;
|
|
346
402
|
}
|
|
347
403
|
makeFileIntoBlob(_imagePath) {
|
|
348
|
-
this.
|
|
404
|
+
this.documentService.loading = true;
|
|
349
405
|
// INSTALL PLUGIN - cordova plugin add cordova-plugin-file
|
|
350
406
|
return new Promise((resolve, reject) => {
|
|
351
407
|
try {
|
|
@@ -377,38 +433,39 @@ class SfDocumentsComponent {
|
|
|
377
433
|
});
|
|
378
434
|
}
|
|
379
435
|
subirImagen(data, fileList) {
|
|
380
|
-
this.
|
|
436
|
+
this.documentService.loading = true;
|
|
381
437
|
const formData = new FormData();
|
|
382
438
|
var dataDocs;
|
|
383
439
|
var sIdKatios = this.idKatios;
|
|
384
|
-
let json;
|
|
385
|
-
let headers = new Headers();
|
|
386
440
|
dataDocs = { "data": data };
|
|
387
441
|
formData.append('data', JSON.stringify(dataDocs));
|
|
388
|
-
formData.append('
|
|
442
|
+
formData.append('merge', "true");
|
|
389
443
|
for (let _i = 0; _i < fileList.length; _i++) {
|
|
390
|
-
formData.append('
|
|
444
|
+
formData.append('files', fileList[_i], fileList[_i].name);
|
|
391
445
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
this.modalReference2
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
this.modalReference
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
446
|
+
this.documentsService.uploadFiles(sIdKatios, formData).subscribe({
|
|
447
|
+
next: (response) => {
|
|
448
|
+
this.scanFileList = new Array();
|
|
449
|
+
if (this.modalReference2) {
|
|
450
|
+
this.modalReference2.close();
|
|
451
|
+
}
|
|
452
|
+
if (this.modalReference) {
|
|
453
|
+
this.modalReference.close();
|
|
454
|
+
}
|
|
455
|
+
this.message("success", "Felicidades", "Se almacenó el documento correctamente");
|
|
456
|
+
this.cargarParametros(this.tipo);
|
|
457
|
+
this.documentService.loading = false;
|
|
458
|
+
this.appRef.tick();
|
|
459
|
+
},
|
|
460
|
+
error: (err) => {
|
|
461
|
+
this.documentService.loading = false;
|
|
462
|
+
this.message("error", "Se presentaron inconvenientes almacenando el documento", err.message);
|
|
463
|
+
console.error("Error : " + err);
|
|
464
|
+
},
|
|
408
465
|
});
|
|
409
466
|
}
|
|
410
467
|
generarData(fileList) {
|
|
411
|
-
this.
|
|
468
|
+
this.documentService.loading = true;
|
|
412
469
|
var sPath1;
|
|
413
470
|
var dataClientes;
|
|
414
471
|
let sPaths = "";
|
|
@@ -445,7 +502,7 @@ class SfDocumentsComponent {
|
|
|
445
502
|
this.scanFileList = new Array();
|
|
446
503
|
this.documentoSeleccionado = iNodo;
|
|
447
504
|
}
|
|
448
|
-
openDoc(item, pdfContent) {
|
|
505
|
+
async openDoc(item, pdfContent) {
|
|
449
506
|
if (this.carpetaSeleccionada.TipoArchivo == '1' && this.isMobile) {
|
|
450
507
|
cordova.InAppBrowser.open(item.Path, '_system', 'location=yes');
|
|
451
508
|
}
|
|
@@ -465,20 +522,20 @@ class SfDocumentsComponent {
|
|
|
465
522
|
this.displayPDF = true;
|
|
466
523
|
}
|
|
467
524
|
}
|
|
468
|
-
openNewWindow(item) {
|
|
525
|
+
async openNewWindow(item) {
|
|
469
526
|
window.open(item.Path, '_blank').focus();
|
|
470
527
|
}
|
|
471
|
-
seleccionoDocs(iNodo) {
|
|
528
|
+
async seleccionoDocs(iNodo) {
|
|
472
529
|
var path = iNodo.Path + iNodo.label;
|
|
473
|
-
this.pdfUrl =
|
|
530
|
+
this.pdfUrl = "//imagenes//" + iNodo.idKatios + "//" + path;
|
|
474
531
|
this.pdfUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.pdfUrl);
|
|
475
|
-
;
|
|
476
532
|
this.gotoBottom();
|
|
477
533
|
}
|
|
478
|
-
message(
|
|
534
|
+
message(severity, summary, message) {
|
|
479
535
|
this.snackBar.add({
|
|
480
|
-
severity:
|
|
481
|
-
summary:
|
|
536
|
+
severity: severity,
|
|
537
|
+
summary: summary,
|
|
538
|
+
detail: message,
|
|
482
539
|
life: 4000
|
|
483
540
|
});
|
|
484
541
|
}
|
|
@@ -500,7 +557,6 @@ class SfDocumentsComponent {
|
|
|
500
557
|
this.docsEliminables = [];
|
|
501
558
|
this.totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
502
559
|
this.carpetaSeleccionada.children.forEach((element) => element.delete = false);
|
|
503
|
-
console.log(this.carpetaSeleccionada);
|
|
504
560
|
this.tab = 2;
|
|
505
561
|
}
|
|
506
562
|
isEmptyString(str) {
|
|
@@ -511,20 +567,27 @@ class SfDocumentsComponent {
|
|
|
511
567
|
this.confirmationService.confirm({
|
|
512
568
|
message: `¿Desea eliminar el documento?`,
|
|
513
569
|
accept: () => {
|
|
514
|
-
let data = { "
|
|
515
|
-
this.documentsService.
|
|
570
|
+
let data = { "code": docEliminar.codigo, "status": "DES" };
|
|
571
|
+
this.documentsService.updateStatus(this.idKatios, data).subscribe({
|
|
572
|
+
next: (response) => {
|
|
573
|
+
funcOkDelDocument();
|
|
574
|
+
},
|
|
575
|
+
error: (error) => {
|
|
576
|
+
this.documentService.loading = false;
|
|
577
|
+
funcErrDelDocument(error);
|
|
578
|
+
}
|
|
579
|
+
});
|
|
516
580
|
}
|
|
517
581
|
});
|
|
518
582
|
}
|
|
519
583
|
ok_eliminarDocumento = () => {
|
|
520
|
-
this.message("Documento eliminado satisfactoriamente"
|
|
584
|
+
this.message("success", "", "Documento eliminado satisfactoriamente");
|
|
521
585
|
if (this.tipo !== undefined) {
|
|
522
586
|
this.cargarParametros(this.tipo);
|
|
523
587
|
}
|
|
524
588
|
};
|
|
525
589
|
err_eliminarDocumento = (err) => {
|
|
526
|
-
this.message("No se pudo eliminar el documento",
|
|
527
|
-
console.log(err);
|
|
590
|
+
this.message("error", "No se pudo eliminar el documento", err.message);
|
|
528
591
|
};
|
|
529
592
|
goToTab(tab) {
|
|
530
593
|
this.tab = tab;
|
|
@@ -541,7 +604,7 @@ class SfDocumentsComponent {
|
|
|
541
604
|
this.nextTabPapa.emit(iValor);
|
|
542
605
|
}
|
|
543
606
|
else {
|
|
544
|
-
this.message(
|
|
607
|
+
this.message("warn", "Ups!", respuesta);
|
|
545
608
|
}
|
|
546
609
|
}
|
|
547
610
|
}
|
|
@@ -575,15 +638,81 @@ class SfDocumentsComponent {
|
|
|
575
638
|
this.modalReference2.close();
|
|
576
639
|
}
|
|
577
640
|
}
|
|
578
|
-
|
|
579
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SfDocumentsComponent, isStandalone: true, selector: "app-sf-documents", inputs: { accion: "accion", entidad: "entidad", ndoc: "ndoc", tdoc: "tdoc", tipo: "tipo", Kasociada: "Kasociada", Producto: "Producto", Solicitud: "Solicitud", oSession: "oSession", perfilDocumentos: "perfilDocumentos", subestado: "subestado", isMobile: "isMobile", bAtras: "bAtras", bFinal: "bFinal", botones: "botones", aplFiltro: "aplFiltro", nmco: "nmco", server: "server", idKatios: "idKatios" }, outputs: { nextTabPapa: "nextTabPapa" }, providers: [DialogService, ConfirmationService], viewQueries: [{ propertyName: "panel", first: true, predicate: ["pdf"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n</div>\r\n<p-iconfield *ngIf=\"aplFiltro\">\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Busqueda\" [(ngModel)]=\"valorFiltro\" (keyup)=\"filtrarDocumentos()\" class=\"w-full\">\r\n</p-iconfield>\r\n<p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n<ng-container *ngIf=\"tab==1\" class=\"tablaGestor\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\" class=\"tablaGestor\">\r\n <p-panel header=\"{{carpeta.label}}\" [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpeta.children\">\r\n <a (click)=\"VerDetalleTab(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.children?.length > 0 ? 'green':'red' }\"> <i\r\n class=\"{{item.collapsedIcon || 'pi pi-folder'}}\"></i>\r\n </span>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children !== undefined && item.children.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length === undefined || item.children?.length == 0\">Sin documentos cargados</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n </ng-container>\r\n <ng-container class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-container *ngIf=\"tab==2\">\r\n <div style=\"margin-block: 15px; display: flex;\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goToTab('1')\"></button>\r\n </div>\r\n <p-panel [header]=\"carpetaSeleccionada.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpetaSeleccionada.children\">\r\n <p-checkbox *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" [binary]=\"true\" [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"></p-checkbox>\r\n <a (click)=\"openVisorDoc(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.color }\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && isMobile\" class=\"frameDoc\" scrolling=\"no\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\" style=\"width:75px; height:90px;\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && !isMobile\" class=\"frameDoc\"\r\n style=\"width:85px; height:90px;\" [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </span>\r\n <div>\r\n <div>\r\n <span class=\"name\">{{item.label}}</span>\r\n </div>\r\n <div>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida}}</span>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida}}</span>\r\n </div>\r\n </div>\r\n <span class=\"celular\">\r\n <i\r\n class=\"pi pi-external-link text-blue-500 text-2xl cursor-pointer\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en una nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"\r\n (keydown.space)=\"openNewWindow(item); $event.stopPropagation()\"\r\n ></i>\r\n </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n <div class=\"div-table\" style=\"text-align: center;\">\r\n <div class=\"div-table-row\" style=\"text-align: center;\" class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.cargarFront\" [selectedDocument]=\"carpetaSeleccionada\" (onUploaded)=\"fileChange($event)\" (loadFile)=\"cargarArchivo(carpetaSeleccionada)\"></lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" (click)=\"eliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div-table\" style=\"font-size: 5px\">\r\n V1.0.3\r\n </div>\r\n</ng-container>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n\r\n\r\n<div *ngIf=\"enProceso\" id=\"divProceso\" class=\"cCargando\">\r\n <div id=\"divProcesoMsg\" class=\"cCargandoImg\">\r\n <br />\r\n <i style=\"font-size: 50px\" class=\"pi pi-cog pi-spin\"></i>\r\n <br />\r\n </div>\r\n</div>", styles: [".iconWhatsApp{font-size:40px;color:#6495ed}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.contacts{list-style-type:none;padding:0;margin:0}.contacts li{display:flex;border-bottom:1px solid #e3e3e3}.contacts li>p-checkbox{margin-inline:10px}.contacts li a{padding:0;width:100%;height:90px;box-sizing:border-box;text-decoration:none;position:relative;display:flex;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-transition:background-color .2s;-o-transition:background-color .2s;-webkit-transition:background-color .2s;transition:background-color .2s}.contacts li a .name{position:absolute;right:0;top:3px;font-size:18px}.contacts li a .Label{position:absolute;right:0;top:22px;font-size:13px}.contacts li a .email{position:absolute;right:0;top:30px;font-size:14px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;font-size:25px;color:#000;top:5px;display:absolute;text-align:left;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:14px;color:#a4a4a4}.contacts li a:hover{cursor:pointer;background-color:#eee}.contacts li:last-child{border:0}@media only screen and (max-width: 656px),(max-device-width: 656px){.contacts li a .name{position:absolute;right:0;top:10px;font-size:15px;width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contacts li>p-checkbox{margin-left:0}.contacts li a .email{position:absolute;right:0;top:30px;font-size:12px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;left:0%;font-size:25px;color:#000;top:5px;display:inline-block;text-align:center;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:15px;color:#00f}.tablaGestor{width:100%}}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}\n"], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i5.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "ngmodule", type: PanelModule }, { kind: "component", type: i6.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i7.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i10.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i11.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: UploadDialogComponent, selector: "lib-upload-dialog", inputs: ["selectedDocument"], outputs: ["onUploaded", "loadFile"] }] });
|
|
641
|
+
openGenerateDialog() {
|
|
642
|
+
this.selectedDocType = null;
|
|
643
|
+
this.selectedRange = null;
|
|
644
|
+
this.displayGenerate = true;
|
|
645
|
+
}
|
|
646
|
+
generateDocument() {
|
|
647
|
+
if (!this.selectedDocType)
|
|
648
|
+
return;
|
|
649
|
+
// Validación mínima: si hay params, exigir que no estén vacíos
|
|
650
|
+
for (const p of this.dynamicParams || []) {
|
|
651
|
+
const key = p.name;
|
|
652
|
+
const v = this.dynamicValues?.[key];
|
|
653
|
+
if (v === null || v === undefined || v === '') {
|
|
654
|
+
this.message('warn', '', `Falta el parámetro ${p.description}`);
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
// construir params
|
|
659
|
+
const paramsToSend = {};
|
|
660
|
+
for (const p of this.dynamicParams || []) {
|
|
661
|
+
const key = p.name;
|
|
662
|
+
const raw = this.dynamicValues?.[key];
|
|
663
|
+
paramsToSend[p.name] =
|
|
664
|
+
(p.type || '').toLowerCase() === 'date'
|
|
665
|
+
? this.toYYYYMMDD(raw)
|
|
666
|
+
: raw;
|
|
667
|
+
}
|
|
668
|
+
this.enProceso = true;
|
|
669
|
+
const payload = {
|
|
670
|
+
params: paramsToSend
|
|
671
|
+
};
|
|
672
|
+
this.documentsService.generateDocument(this.idKatios, this.selectedDocType, this.Solicitud, payload).subscribe({
|
|
673
|
+
next: () => {
|
|
674
|
+
this.displayGenerate = false;
|
|
675
|
+
this.message('success', '', 'Documento en generación');
|
|
676
|
+
this.cargarParametros(this.tipo);
|
|
677
|
+
this.enProceso = false;
|
|
678
|
+
},
|
|
679
|
+
error: (err) => {
|
|
680
|
+
this.message('error', 'No se pudo generar el documento', err?.message || err);
|
|
681
|
+
this.enProceso = false;
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
toYYYYMMDD(value) {
|
|
686
|
+
if (!value)
|
|
687
|
+
return null;
|
|
688
|
+
const d = value instanceof Date ? value : new Date(value);
|
|
689
|
+
if (isNaN(d.getTime()))
|
|
690
|
+
return null;
|
|
691
|
+
// ISO: 2025-12-19T05:00:00.000Z -> 2025-12-19
|
|
692
|
+
return d.toISOString().slice(0, 10);
|
|
693
|
+
}
|
|
694
|
+
onDocTypeChange() {
|
|
695
|
+
const doc = this.selectedDocType ? this.documentsToGenerateMap[this.selectedDocType] : null;
|
|
696
|
+
this.dynamicParams = doc?.params ?? [];
|
|
697
|
+
this.dynamicValues = {}; // reset valores
|
|
698
|
+
// valores default opcionales
|
|
699
|
+
for (const p of this.dynamicParams) {
|
|
700
|
+
const key = p.name;
|
|
701
|
+
this.dynamicValues[key] = null;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, deps: [{ token: i1.DomSanitizer }, { token: i2$1.DialogService }, { token: i3.MessageService }, { token: i0.ApplicationRef }, { token: i3.ConfirmationService }, { token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
705
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SfDocumentsComponent, isStandalone: true, selector: "app-sf-documents", inputs: { accion: "accion", entidad: "entidad", ndoc: "ndoc", tdoc: "tdoc", tipo: "tipo", Kasociada: "Kasociada", Producto: "Producto", Solicitud: "Solicitud", oSession: "oSession", perfilDocumentos: "perfilDocumentos", subestado: "subestado", isMobile: "isMobile", bAtras: "bAtras", bFinal: "bFinal", botones: "botones", aplFiltro: "aplFiltro", nmco: "nmco", server: "server", idKatios: "idKatios" }, outputs: { nextTabPapa: "nextTabPapa" }, providers: [DialogService, ConfirmationService], viewQueries: [{ propertyName: "panel", first: true, predicate: ["pdf"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n</div>\r\n<!-- Toolbar superior (solo tab 1) -->\r\n<div *ngIf=\"tab==1\" class=\"doc-toolbar\">\r\n <div class=\"doc-toolbar-left\" *ngIf=\"aplFiltro\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Busqueda\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"(documentTypes?.length ?? 0) > 0\" >\r\n <button pButton type=\"button\"\r\n label=\"Generar documento\"\r\n icon=\"pi pi-file-edit\"\r\n class=\"p-button-primary\"\r\n (click)=\"openGenerateDialog()\"\r\n [disabled]=\"enProceso || !canGenerate\">\r\n </button>\r\n </div>\r\n</div>\r\n<p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n<ng-container *ngIf=\"tab==1\" class=\"tablaGestor\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\" class=\"tablaGestor\">\r\n <p-panel header=\"{{carpeta.label}}\" [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpeta.children\">\r\n <a (click)=\"VerDetalleTab(item)\">\r\n <i class=\"{{item.collapsedIcon || 'pi pi-folder'}} imagen\" [ngStyle]=\"{'color': item.children?.length > 0 ? 'green':'red' }\"></i>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children !== undefined && item.children.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length === undefined || item.children?.length == 0\">Sin documentos cargados</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n </ng-container>\r\n <ng-container class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-container *ngIf=\"tab==2\">\r\n <div style=\"margin-block: 15px; display: flex;\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goToTab('1')\"></button>\r\n </div>\r\n <p-panel [header]=\"carpetaSeleccionada.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpetaSeleccionada.children\">\r\n <p-checkbox *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" [binary]=\"true\" [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"></p-checkbox>\r\n <a (click)=\"openVisorDoc(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.color }\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && isMobile\" class=\"frameDoc\" scrolling=\"no\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\" style=\"width:75px; height:90px;\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && !isMobile\" class=\"frameDoc\"\r\n style=\"width:85px; height:90px;\" [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </span>\r\n <div>\r\n <div>\r\n <span class=\"name\">{{item.label}}</span>\r\n </div>\r\n <div>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida}}</span>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida}}</span>\r\n </div>\r\n </div>\r\n <span class=\"celular\">\r\n <i\r\n class=\"pi pi-external-link text-blue-500 text-2xl cursor-pointer\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en una nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"\r\n (keydown.space)=\"openNewWindow(item); $event.stopPropagation()\"\r\n ></i>\r\n </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n <div class=\"div-table\" style=\"text-align: center;\">\r\n <div class=\"div-table-row\" style=\"text-align: center;\" class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.cargarFront\" [selectedDocument]=\"carpetaSeleccionada\" (onUploaded)=\"fileChange($event)\" (loadFile)=\"cargarArchivo(carpetaSeleccionada)\"></lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" (click)=\"eliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div-table\" style=\"font-size: 5px\">\r\n V1.0.3\r\n </div>\r\n</ng-container>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n<p-dialog header=\"Generar documento\"\r\n [(visible)]=\"displayGenerate\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [style]=\"{width: isMobile ? '95vw' : '520px'}\">\r\n\r\n <div class=\"gen-form\">\r\n <!-- Tipo de documento -->\r\n <div class=\"gen-field\">\r\n <label class=\"gen-label\">Tipo de documento</label>\r\n <p-dropdown\r\n class=\"gen-control\"\r\n [options]=\"documentTypes\"\r\n optionLabel=\"label\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDocType\"\r\n placeholder=\"Seleccione un tipo\"\r\n appendTo=\"body\"\r\n (onChange)=\"onDocTypeChange()\">\r\n </p-dropdown>\r\n </div>\r\n\r\n <!-- Par\u00E1metros din\u00E1micos -->\r\n <div class=\"gen-section\" *ngIf=\"dynamicParams?.length\">\r\n <div class=\"gen-field\" *ngFor=\"let p of dynamicParams\">\r\n <label class=\"gen-label\">\r\n {{ p.description }}\r\n <span class=\"gen-required\" *ngIf=\"p.required\">*</span>\r\n </label>\r\n\r\n <!-- Date -->\r\n <p-datepicker\r\n *ngIf=\"(p.type || '').toLowerCase() === 'date'\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n [showIcon]=\"true\"\r\n appendTo=\"body\"\r\n dateFormat=\"yy-mm-dd\">\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"(p.type || '').toLowerCase() === 'nvarchar' || (p.type || '').toLowerCase() === 'string'\"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\" />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"['int','decimal','number'].includes((p.type || '').toLowerCase())\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n >\r\n </p-inputNumber>\r\n\r\n <!-- Boolean -->\r\n <div class=\"gen-control gen-checkbox\"\r\n *ngIf=\"['boolean','bit','bool'].includes((p.type || '').toLowerCase())\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-checkbox>\r\n <span class=\"gen-checkbox-label\">S\u00ED</span>\r\n </div>\r\n\r\n <!-- helper opcional -->\r\n <small class=\"gen-help\" *ngIf=\"p.help\">{{ p.help }}</small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button pButton type=\"button\" label=\"Cancelar\" class=\"p-button-text\"\r\n (click)=\"displayGenerate=false\"></button>\r\n\r\n <button pButton type=\"button\" label=\"Generar\" icon=\"pi pi-cog\"\r\n (click)=\"generateDocument()\"\r\n [disabled]=\"!selectedDocType || enProceso\">\r\n </button>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n", styles: [".iconWhatsApp{font-size:40px;color:#6495ed}.doc-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0 14px}.doc-toolbar-left{flex:1;min-width:180px}.doc-toolbar-right{display:flex;justify-content:flex-end}@media only screen and (max-width: 656px),(max-device-width: 656px){.doc-toolbar{flex-direction:column;align-items:stretch}.doc-toolbar-right{justify-content:stretch}.doc-toolbar-right button{width:100%}}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.contacts{list-style-type:none;padding:0;margin:0}.contacts li{display:flex;border-bottom:1px solid #e3e3e3}.contacts li>p-checkbox{margin-inline:10px}.contacts li a{padding:0;width:100%;height:90px;box-sizing:border-box;text-decoration:none;position:relative;display:flex;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-transition:background-color .2s;-o-transition:background-color .2s;-webkit-transition:background-color .2s;transition:background-color .2s}.contacts li a .name{position:absolute;right:0;top:3px;font-size:18px}.contacts li a .Label{position:absolute;right:0;top:22px;font-size:13px}.contacts li a .email{position:absolute;right:0;top:30px;font-size:14px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;font-size:25px;color:#000;top:5px;display:absolute;text-align:left;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:14px;color:#a4a4a4}.contacts li a:hover{cursor:pointer;background-color:#eee}.contacts li:last-child{border:0}@media only screen and (max-width: 656px),(max-device-width: 656px){.contacts li a .name{position:absolute;right:0;top:10px;font-size:15px;width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contacts li>p-checkbox{margin-left:0}.contacts li a .email{position:absolute;right:0;top:30px;font-size:12px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;left:0%;font-size:25px;color:#000;top:5px;display:inline-block;text-align:center;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:15px;color:#00f}.tablaGestor{width:100%}}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}.gen-form{display:flex;flex-direction:column;gap:14px}.gen-section{display:flex;flex-direction:column;gap:12px}.gen-field{display:flex;flex-direction:column;gap:6px}.gen-label{font-size:13px;font-weight:600;color:#111827}.gen-required{color:#ef4444;margin-left:4px}.gen-control{width:100%}:host ::ng-deep .gen-control .p-dropdown,:host ::ng-deep .gen-control .p-inputtext,:host ::ng-deep .gen-control .p-inputnumber,:host ::ng-deep .gen-control .p-datepicker{width:100%}:host ::ng-deep .gen-control .p-inputnumber-input{width:100%}.gen-checkbox{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}.gen-checkbox-label{font-size:14px;color:#374151}.gen-help{color:#6b7280}\n"], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i6.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "ngmodule", type: PanelModule }, { kind: "component", type: i7.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i8.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i11.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i12.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: UploadDialogComponent, selector: "lib-upload-dialog", inputs: ["selectedDocument"], outputs: ["onUploaded", "loadFile"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i13.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i14.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] });
|
|
580
706
|
}
|
|
581
707
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, decorators: [{
|
|
582
708
|
type: Component,
|
|
583
|
-
args: [{ selector: 'app-sf-documents', imports: [
|
|
584
|
-
|
|
585
|
-
], providers: [DialogService, ConfirmationService], standalone: true, template: "<div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n</div>\r\n<p-iconfield *ngIf=\"aplFiltro\">\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Busqueda\" [(ngModel)]=\"valorFiltro\" (keyup)=\"filtrarDocumentos()\" class=\"w-full\">\r\n</p-iconfield>\r\n<p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n<ng-container *ngIf=\"tab==1\" class=\"tablaGestor\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\" class=\"tablaGestor\">\r\n <p-panel header=\"{{carpeta.label}}\" [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpeta.children\">\r\n <a (click)=\"VerDetalleTab(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.children?.length > 0 ? 'green':'red' }\"> <i\r\n class=\"{{item.collapsedIcon || 'pi pi-folder'}}\"></i>\r\n </span>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children !== undefined && item.children.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length === undefined || item.children?.length == 0\">Sin documentos cargados</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n </ng-container>\r\n <ng-container class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-container *ngIf=\"tab==2\">\r\n <div style=\"margin-block: 15px; display: flex;\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goToTab('1')\"></button>\r\n </div>\r\n <p-panel [header]=\"carpetaSeleccionada.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpetaSeleccionada.children\">\r\n <p-checkbox *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" [binary]=\"true\" [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"></p-checkbox>\r\n <a (click)=\"openVisorDoc(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.color }\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && isMobile\" class=\"frameDoc\" scrolling=\"no\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\" style=\"width:75px; height:90px;\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && !isMobile\" class=\"frameDoc\"\r\n style=\"width:85px; height:90px;\" [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </span>\r\n <div>\r\n <div>\r\n <span class=\"name\">{{item.label}}</span>\r\n </div>\r\n <div>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida}}</span>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida}}</span>\r\n </div>\r\n </div>\r\n <span class=\"celular\">\r\n <i\r\n class=\"pi pi-external-link text-blue-500 text-2xl cursor-pointer\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en una nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"\r\n (keydown.space)=\"openNewWindow(item); $event.stopPropagation()\"\r\n ></i>\r\n </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n <div class=\"div-table\" style=\"text-align: center;\">\r\n <div class=\"div-table-row\" style=\"text-align: center;\" class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.cargarFront\" [selectedDocument]=\"carpetaSeleccionada\" (onUploaded)=\"fileChange($event)\" (loadFile)=\"cargarArchivo(carpetaSeleccionada)\"></lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" (click)=\"eliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div-table\" style=\"font-size: 5px\">\r\n V1.0.3\r\n </div>\r\n</ng-container>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n\r\n\r\n<div *ngIf=\"enProceso\" id=\"divProceso\" class=\"cCargando\">\r\n <div id=\"divProcesoMsg\" class=\"cCargandoImg\">\r\n <br />\r\n <i style=\"font-size: 50px\" class=\"pi pi-cog pi-spin\"></i>\r\n <br />\r\n </div>\r\n</div>", styles: [".iconWhatsApp{font-size:40px;color:#6495ed}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.contacts{list-style-type:none;padding:0;margin:0}.contacts li{display:flex;border-bottom:1px solid #e3e3e3}.contacts li>p-checkbox{margin-inline:10px}.contacts li a{padding:0;width:100%;height:90px;box-sizing:border-box;text-decoration:none;position:relative;display:flex;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-transition:background-color .2s;-o-transition:background-color .2s;-webkit-transition:background-color .2s;transition:background-color .2s}.contacts li a .name{position:absolute;right:0;top:3px;font-size:18px}.contacts li a .Label{position:absolute;right:0;top:22px;font-size:13px}.contacts li a .email{position:absolute;right:0;top:30px;font-size:14px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;font-size:25px;color:#000;top:5px;display:absolute;text-align:left;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:14px;color:#a4a4a4}.contacts li a:hover{cursor:pointer;background-color:#eee}.contacts li:last-child{border:0}@media only screen and (max-width: 656px),(max-device-width: 656px){.contacts li a .name{position:absolute;right:0;top:10px;font-size:15px;width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contacts li>p-checkbox{margin-left:0}.contacts li a .email{position:absolute;right:0;top:30px;font-size:12px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;left:0%;font-size:25px;color:#000;top:5px;display:inline-block;text-align:center;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:15px;color:#00f}.tablaGestor{width:100%}}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}\n"] }]
|
|
586
|
-
|
|
709
|
+
args: [{ selector: 'app-sf-documents', imports: [
|
|
710
|
+
ToastModule, ButtonModule, ConfirmDialogModule, PanelModule, CheckboxModule,
|
|
711
|
+
DialogModule, CommonModule, FormsModule, SafePipe, InputTextModule, InputIcon,
|
|
712
|
+
IconField, UploadDialogComponent,
|
|
713
|
+
DropdownModule, DatePickerModule
|
|
714
|
+
], providers: [DialogService, ConfirmationService], standalone: true, template: "<div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n</div>\r\n<!-- Toolbar superior (solo tab 1) -->\r\n<div *ngIf=\"tab==1\" class=\"doc-toolbar\">\r\n <div class=\"doc-toolbar-left\" *ngIf=\"aplFiltro\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Busqueda\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"(documentTypes?.length ?? 0) > 0\" >\r\n <button pButton type=\"button\"\r\n label=\"Generar documento\"\r\n icon=\"pi pi-file-edit\"\r\n class=\"p-button-primary\"\r\n (click)=\"openGenerateDialog()\"\r\n [disabled]=\"enProceso || !canGenerate\">\r\n </button>\r\n </div>\r\n</div>\r\n<p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n<ng-container *ngIf=\"tab==1\" class=\"tablaGestor\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\" class=\"tablaGestor\">\r\n <p-panel header=\"{{carpeta.label}}\" [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpeta.children\">\r\n <a (click)=\"VerDetalleTab(item)\">\r\n <i class=\"{{item.collapsedIcon || 'pi pi-folder'}} imagen\" [ngStyle]=\"{'color': item.children?.length > 0 ? 'green':'red' }\"></i>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children !== undefined && item.children.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length === undefined || item.children?.length == 0\">Sin documentos cargados</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n </ng-container>\r\n <ng-container class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-container *ngIf=\"tab==2\">\r\n <div style=\"margin-block: 15px; display: flex;\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goToTab('1')\"></button>\r\n </div>\r\n <p-panel [header]=\"carpetaSeleccionada.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpetaSeleccionada.children\">\r\n <p-checkbox *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" [binary]=\"true\" [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"></p-checkbox>\r\n <a (click)=\"openVisorDoc(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.color }\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && isMobile\" class=\"frameDoc\" scrolling=\"no\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\" style=\"width:75px; height:90px;\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && !isMobile\" class=\"frameDoc\"\r\n style=\"width:85px; height:90px;\" [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </span>\r\n <div>\r\n <div>\r\n <span class=\"name\">{{item.label}}</span>\r\n </div>\r\n <div>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida}}</span>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida}}</span>\r\n </div>\r\n </div>\r\n <span class=\"celular\">\r\n <i\r\n class=\"pi pi-external-link text-blue-500 text-2xl cursor-pointer\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en una nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"\r\n (keydown.space)=\"openNewWindow(item); $event.stopPropagation()\"\r\n ></i>\r\n </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n <div class=\"div-table\" style=\"text-align: center;\">\r\n <div class=\"div-table-row\" style=\"text-align: center;\" class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.cargarFront\" [selectedDocument]=\"carpetaSeleccionada\" (onUploaded)=\"fileChange($event)\" (loadFile)=\"cargarArchivo(carpetaSeleccionada)\"></lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" (click)=\"eliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div-table\" style=\"font-size: 5px\">\r\n V1.0.3\r\n </div>\r\n</ng-container>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n<p-dialog header=\"Generar documento\"\r\n [(visible)]=\"displayGenerate\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [style]=\"{width: isMobile ? '95vw' : '520px'}\">\r\n\r\n <div class=\"gen-form\">\r\n <!-- Tipo de documento -->\r\n <div class=\"gen-field\">\r\n <label class=\"gen-label\">Tipo de documento</label>\r\n <p-dropdown\r\n class=\"gen-control\"\r\n [options]=\"documentTypes\"\r\n optionLabel=\"label\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDocType\"\r\n placeholder=\"Seleccione un tipo\"\r\n appendTo=\"body\"\r\n (onChange)=\"onDocTypeChange()\">\r\n </p-dropdown>\r\n </div>\r\n\r\n <!-- Par\u00E1metros din\u00E1micos -->\r\n <div class=\"gen-section\" *ngIf=\"dynamicParams?.length\">\r\n <div class=\"gen-field\" *ngFor=\"let p of dynamicParams\">\r\n <label class=\"gen-label\">\r\n {{ p.description }}\r\n <span class=\"gen-required\" *ngIf=\"p.required\">*</span>\r\n </label>\r\n\r\n <!-- Date -->\r\n <p-datepicker\r\n *ngIf=\"(p.type || '').toLowerCase() === 'date'\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n [showIcon]=\"true\"\r\n appendTo=\"body\"\r\n dateFormat=\"yy-mm-dd\">\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"(p.type || '').toLowerCase() === 'nvarchar' || (p.type || '').toLowerCase() === 'string'\"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\" />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"['int','decimal','number'].includes((p.type || '').toLowerCase())\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n >\r\n </p-inputNumber>\r\n\r\n <!-- Boolean -->\r\n <div class=\"gen-control gen-checkbox\"\r\n *ngIf=\"['boolean','bit','bool'].includes((p.type || '').toLowerCase())\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-checkbox>\r\n <span class=\"gen-checkbox-label\">S\u00ED</span>\r\n </div>\r\n\r\n <!-- helper opcional -->\r\n <small class=\"gen-help\" *ngIf=\"p.help\">{{ p.help }}</small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button pButton type=\"button\" label=\"Cancelar\" class=\"p-button-text\"\r\n (click)=\"displayGenerate=false\"></button>\r\n\r\n <button pButton type=\"button\" label=\"Generar\" icon=\"pi pi-cog\"\r\n (click)=\"generateDocument()\"\r\n [disabled]=\"!selectedDocType || enProceso\">\r\n </button>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n", styles: [".iconWhatsApp{font-size:40px;color:#6495ed}.doc-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0 14px}.doc-toolbar-left{flex:1;min-width:180px}.doc-toolbar-right{display:flex;justify-content:flex-end}@media only screen and (max-width: 656px),(max-device-width: 656px){.doc-toolbar{flex-direction:column;align-items:stretch}.doc-toolbar-right{justify-content:stretch}.doc-toolbar-right button{width:100%}}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.contacts{list-style-type:none;padding:0;margin:0}.contacts li{display:flex;border-bottom:1px solid #e3e3e3}.contacts li>p-checkbox{margin-inline:10px}.contacts li a{padding:0;width:100%;height:90px;box-sizing:border-box;text-decoration:none;position:relative;display:flex;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-transition:background-color .2s;-o-transition:background-color .2s;-webkit-transition:background-color .2s;transition:background-color .2s}.contacts li a .name{position:absolute;right:0;top:3px;font-size:18px}.contacts li a .Label{position:absolute;right:0;top:22px;font-size:13px}.contacts li a .email{position:absolute;right:0;top:30px;font-size:14px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;font-size:25px;color:#000;top:5px;display:absolute;text-align:left;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:14px;color:#a4a4a4}.contacts li a:hover{cursor:pointer;background-color:#eee}.contacts li:last-child{border:0}@media only screen and (max-width: 656px),(max-device-width: 656px){.contacts li a .name{position:absolute;right:0;top:10px;font-size:15px;width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contacts li>p-checkbox{margin-left:0}.contacts li a .email{position:absolute;right:0;top:30px;font-size:12px;color:#a4a4a4}.contacts li a .imagen{height:40px;width:40px;border-radius:50%;left:0%;font-size:25px;color:#000;top:5px;display:inline-block;text-align:center;vertical-align:center}.contacts li a .celular{position:absolute;right:10px;top:45px;font-size:15px;color:#00f}.tablaGestor{width:100%}}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}.gen-form{display:flex;flex-direction:column;gap:14px}.gen-section{display:flex;flex-direction:column;gap:12px}.gen-field{display:flex;flex-direction:column;gap:6px}.gen-label{font-size:13px;font-weight:600;color:#111827}.gen-required{color:#ef4444;margin-left:4px}.gen-control{width:100%}:host ::ng-deep .gen-control .p-dropdown,:host ::ng-deep .gen-control .p-inputtext,:host ::ng-deep .gen-control .p-inputnumber,:host ::ng-deep .gen-control .p-datepicker{width:100%}:host ::ng-deep .gen-control .p-inputnumber-input{width:100%}.gen-checkbox{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}.gen-checkbox-label{font-size:14px;color:#374151}.gen-help{color:#6b7280}\n"] }]
|
|
715
|
+
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i2$1.DialogService }, { type: i3.MessageService }, { type: i0.ApplicationRef }, { type: i3.ConfirmationService }, { type: SfDocumentsService }], propDecorators: { accion: [{
|
|
587
716
|
type: Input
|
|
588
717
|
}], entidad: [{
|
|
589
718
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sf-documents.mjs","sources":["../../../projects/sf-documents/src/lib/sf-documents.service.ts","../../../projects/sf-documents/src/lib/pipes/safe.pipe.ts","../../../projects/sf-documents/src/lib/gateways/document.port.ts","../../../projects/sf-documents/src/dialog/upload-dialog/upload-dialog.component.ts","../../../projects/sf-documents/src/dialog/upload-dialog/upload-dialog.component.html","../../../projects/sf-documents/src/lib/sf-documents.component.ts","../../../projects/sf-documents/src/lib/sf-documents.component.html","../../../projects/sf-documents/src/public-api.ts","../../../projects/sf-documents/src/sf-documents.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SfDocumentsService {\r\n\r\n constructor() { }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\n\r\n@Pipe({ name: 'safe' })\r\n\r\nexport class SafePipe implements PipeTransform {\r\n\r\n constructor(private sanitizer: DomSanitizer) { }\r\n transform(url:any) {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\r\n }\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\n\r\nexport interface DocumentGatewayService{\r\n getCarptasByAccion(idKatios: string, data: any, okCallback: any, errorCallback: any): Promise<any>;\r\n updateEstadoFileSystemByCodigo(data: any, okCallback: any, errorCallback: any): Promise<any>;\r\n postServiceHttpOptionsDocs(idKatios: string, formData: FormData, headers: any): Observable<any>;\r\n}\r\n\r\nexport const DOCUMENT_SERVICE = new InjectionToken<DocumentGatewayService>('DOCUMENT_SERVICE');","import { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { DialogModule } from 'primeng/dialog';\r\n\r\n@Component({\r\n selector: 'lib-upload-dialog',\r\n imports: [CommonModule, ButtonModule, DialogModule],\r\n templateUrl: './upload-dialog.component.html',\r\n styleUrl: './upload-dialog.component.css'\r\n})\r\nexport class UploadDialogComponent {\r\n @Input() selectedDocument: any;\r\n @Output() onUploaded = new EventEmitter<{ fileList: FileList, tagValue: any }>();\r\n @Output() loadFile = new EventEmitter<void>();\r\n visible: boolean = false;\r\n @ViewChild('fileInput', { static: true })\r\n fileInput!: ElementRef<HTMLInputElement>;\r\n\r\n constructor() { }\r\n\r\n showDialog(){\r\n this.loadFile.emit();\r\n this.visible = true;\r\n }\r\n loadFileClick() {\r\n this.fileInput.nativeElement.value = '';\r\n this.fileInput.nativeElement.click();\r\n }\r\n fileChange(event: any) {\r\n const input = event.target as HTMLInputElement;\r\n let fileList = input.files as FileList | null;\r\n const imagePathInput = input.value;\r\n if(fileList?.length) this.onUploaded.emit({ fileList, tagValue: imagePathInput });\r\n this.visible = false;\r\n }\r\n\r\n}\r\n","<button pButton type=\"button\" label=\"Adicionar\" icon=\"pi pi-plus\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" multiple>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n size=\"large\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n","import { ApplicationRef, Component, ElementRef, EventEmitter, inject, Input, OnChanges, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { ConfirmationService, MessageService, TreeNode } from 'primeng/api';\r\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';\r\nimport { ToastModule } from 'primeng/toast';\r\n\r\nimport * as _ from \"lodash\";\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\r\nimport { PanelModule } from 'primeng/panel';\r\nimport { CheckboxModule } from 'primeng/checkbox';\r\nimport { DialogModule } from 'primeng/dialog';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { SafePipe } from './pipes/safe.pipe';\r\nimport { DOCUMENT_SERVICE, DocumentGatewayService } from './gateways/document.port';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { InputIcon } from 'primeng/inputicon';\r\nimport { IconField } from 'primeng/iconfield';\r\nimport { UploadDialogComponent } from '../dialog/upload-dialog/upload-dialog.component';\r\nimport { firstValueFrom } from 'rxjs';\r\n\r\ndeclare var cordova: any;\r\ndeclare var window: any;\r\n\r\n@Component({\r\n selector: 'app-sf-documents',\r\n imports: [ToastModule, ButtonModule, ConfirmDialogModule,PanelModule,CheckboxModule, DialogModule, CommonModule, FormsModule,SafePipe, InputTextModule, InputIcon,\r\n IconField, UploadDialogComponent\r\n ],\r\n templateUrl: './sf-documents.component.html',\r\n styleUrls: ['./sf-documents.component.scss'],\r\n providers: [DialogService, ConfirmationService],\r\n standalone: true\r\n})\r\nexport class SfDocumentsComponent implements OnDestroy, OnInit{\r\n private documentsService = inject<DocumentGatewayService>(DOCUMENT_SERVICE);\r\n @Input() accion: string = \"\";\r\n @Input() entidad: string = \"\";\r\n @Input() ndoc: string = \"\";\r\n @Input() tdoc: string = \"\";\r\n @Input() tipo: string = \"\";\r\n //Información necesaria para cargar documentos de productos\r\n @Input() Kasociada: string = \"\";\r\n @Input() Producto: string = \"\";\r\n @Input() Solicitud: string = \"\";\r\n @Input() oSession: any;\r\n @Input() perfilDocumentos: any;\r\n @Input() subestado: string = '';\r\n @Input() isMobile: boolean = false;\r\n @Output() nextTabPapa: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n @Input() bAtras: boolean = false;\r\n @Input() bFinal: boolean = false;\r\n @Input() botones: boolean = true;\r\n @Input() aplFiltro: boolean = false;\r\n\r\n @Input() nmco: string[] = [];\r\n\r\n @Input() server: string = \"\";\r\n valorFiltro: string = \"\";\r\n\r\n tab = 1;\r\n enProceso = false;\r\n carpetaSeleccionada: any;\r\n files: any;\r\n filesFilter: any;\r\n imagePathInput: any;\r\n modalReference: DynamicDialogRef | undefined;\r\n modalReference2: DynamicDialogRef | undefined;\r\n documentoSeleccionado: any;\r\n docsEliminables: any[] = [];\r\n totalDocsEliminadosApi = {existoso: 0, fallido: 0};\r\n file: any;\r\n urlDoc: any;\r\n pdfUrl: any;\r\n current_path: string = \"\";\r\n current_label: string = \"\";\r\n scanFileList = new Array<any>();\r\n displayPDF: boolean = false;\r\n\r\n @ViewChild('pdf', { read: ElementRef }) public panel!: ElementRef<any>;\r\n UsuarioNdoc: any;\r\n UsuarioTdoc: any;\r\n @Input() idKatios: any;\r\n constructor(\r\n private sanitizer: DomSanitizer,\r\n private dialog: DialogService,\r\n public snackBar: MessageService,\r\n private appRef: ApplicationRef,\r\n private confirmationService: ConfirmationService\r\n ) { }\r\n\r\n ngOnInit() {\r\n if (this.oSession != null && this.oSession.UsuarioSistema.TDOC !== undefined && this.oSession.UsuarioSistema.NDOC !== undefined) {\r\n this.idKatios = this.oSession.UsuarioSistema.IDKATIOS.trim();\r\n this.perfilDocumentos = this.oSession.UsuarioSistema.PERDOCUMENTOS.trim();\r\n } \r\n if (this.tipo && this.perfilDocumentos) {\r\n this.cargarParametros(this.tipo)\r\n }\r\n }\r\n\r\n cargarParametros(tipo: string) {\r\n var data;\r\n switch (tipo) {\r\n case \"1\":\r\n this.enProceso = true;\r\n data = { \"Accion\": this.accion, \"Entidad\": this.entidad, \"IdKatios\": this.idKatios, \"TDoc\": this.tdoc, \"NDoc\": this.ndoc, \"Solicitud\": this.Solicitud, \"perfilDocumentos\": this.perfilDocumentos,\"Producto\": this.Producto }\r\n this.documentsService.getCarptasByAccion(this.idKatios, data, this.okCargoArbol, this.errorCargarArbol)\r\n this.tab = 1\r\n this.documentoSeleccionado = null\r\n break;\r\n }\r\n }\r\n\r\n expandAll() {\r\n this.files.forEach((node: any) => {\r\n this.expandRecursive(node, true);\r\n });\r\n }\r\n\r\n private expandRecursive(node: TreeNode, isExpand: boolean) {\r\n node.expanded = isExpand;\r\n var objeto: any;\r\n objeto = node\r\n if (node.children && node.children?.length > 0) {\r\n node.children.forEach(childNode => {\r\n this.expandRecursive(childNode, isExpand);\r\n });\r\n } else if (objeto.Path !== undefined) {\r\n var path = 'Imagenes/' + objeto.Path + objeto.label\r\n var re = /[\\\\]/gi;\r\n path = path.replace(re, \"/\")\r\n objeto.Path = this.server + path\r\n //this.sanitizer.bypassSecurityTrustUrl(this.server + path)\r\n }\r\n }\r\n \r\n public okCargoArbol = (iArbol: any) => {\r\n if (iArbol.CARPETA.length === undefined) {\r\n iArbol = new Array(iArbol.CARPETA)\r\n }\r\n\r\n iArbol.forEach((element: any) => {\r\n this.convertirArrayChildren(element)\r\n });\r\n\r\n //\r\n this.filtrarTipoDocumento(iArbol)\r\n //\r\n this.files = iArbol;\r\n this.filesFilter = iArbol;\r\n this.expandAll();\r\n this.enProceso = false;\r\n }\r\n public errorCargarArbol = (iError: any) => {\r\n this.message(\"Error al traer la información del servidor\", \"Ups!\")\r\n this.enProceso = false;\r\n }\r\n\r\n onClickedCheckDelete($event: any, document: any) {\r\n if ($event.checked) this.docsEliminables.push(document);\r\n else this.docsEliminables = this.docsEliminables.filter(doc => doc !== document);\r\n }\r\n\r\n funcOkDelDocumentMasivo = () => {\r\n this.totalDocsEliminadosApi.existoso += 1;\r\n if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === this.docsEliminables.length) {\r\n this.cargarParametros(this.tipo);\r\n if ( this.totalDocsEliminadosApi.fallido > 0) this.message(\"Algunos documentos no pudieron ser eliminados\", \"Entiendo\");\r\n else this.message(\"Documentos eliminados satisfactoriamente\", \"\");\r\n\r\n }\r\n }\r\n\r\n funcErrDelDocumentMasivo = () => {\r\n this.totalDocsEliminadosApi.fallido += 1;\r\n if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === this.docsEliminables.length) {\r\n this.cargarParametros(this.tipo);\r\n this.message(\"Algunos documentos no pudieron ser eliminados\", \"Entiendo\");\r\n }\r\n }\r\n\r\n eliminarMasivo(){\r\n this.confirmationService.confirm({\r\n message: `¿Desea eliminar los ${this.docsEliminables.length} documentos seleccionados?`,\r\n acceptLabel: 'Si',\r\n rejectLabel: 'No',\r\n accept: () => {\r\n this.enProceso = true\r\n this.totalDocsEliminadosApi = {existoso: 0, fallido: 0};\r\n this.docsEliminables.forEach(doc => {\r\n let data = { \"idKatios\": this.idKatios, \"codigo\": doc.codigo, \"estado\": \"DES\" };\r\n this.documentsService.updateEstadoFileSystemByCodigo(data, this.funcOkDelDocumentMasivo, this.funcErrDelDocumentMasivo);\r\n })\r\n }\r\n });\r\n }\r\n\r\n filtrarTipoDocumento(iArbol: any){\r\n if(this.nmco.length !== 0){\r\n iArbol.forEach((element: any) => {\r\n element.children = element.children.filter((child: any) => this.nmco.includes(child.NMCo));\r\n })\r\n }\r\n }\r\n\r\n convertirArrayChildren(node: any) {\r\n if (node.children === undefined) node.children = []\r\n else if (node.children.length == undefined) {\r\n node.children = new Array(node.children)\r\n }\r\n node.children.forEach((childNode: any) => {\r\n this.convertirArrayChildren(childNode);\r\n });\r\n\r\n }\r\n openBigModal(content: any) {\r\n this.modalReference = this.dialog.open(content, { \r\n width: '70%',\r\n modal: true,\r\n closable: true\r\n });\r\n this.modalReference.onClose.subscribe((result: any) => {\r\n //this.closeResult = `Closed with: ${result}`;\r\n });\r\n // this.modalReference.onHide.subscribe(() => {\r\n // //this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;\r\n // });\r\n }\r\n\r\n openModal2(content: any) {\r\n this.modalReference2 = this.dialog.open(content,{});\r\n this.modalReference2.onClose.subscribe((result: any) => {\r\n //this.closeResult = `Closed with: ${result}`;\r\n });\r\n }\r\n\r\n\r\n // takePhotoClick() {\r\n // this.documentsService.openCamera(this.ok_openCamera, this.error_openCamera);\r\n // }\r\n /////Cuando se cargar archivos adjuntos\r\n fileChange(data: any) {\r\n const fileList = data.fileList;\r\n const tagValue = data.tagValue;\r\n this.file = fileList[0];\r\n this.imagePathInput = tagValue;\r\n this.generarData(fileList);\r\n }\r\n\r\n // ok_openCamera = (imageUri: any) => {\r\n // this.makeFileIntoBlob(imageUri)\r\n // .then((file: Blob) => {\r\n // this.appRef.tick();\r\n // if (file.size > 1000000) {\r\n // if (confirm(\"Este archivo es bastate pesado, le recomendamos bajar la calidad de la cámara. ¿Desea subir este archivo?\")) {\r\n // this.loadFileToList(file);\r\n // }\r\n // } else {\r\n // this.loadFileToList(file);\r\n // }\r\n // this.enProceso = false;\r\n // })\r\n // .catch((error: Error) => {\r\n // console.error('Error processing camera image:', error);\r\n // this.message(\"Error al procesar la imagen de la cámara\", \"Error\");\r\n // this.enProceso = false;\r\n // });\r\n // }\r\n\r\n loadFileToList(file: any) {\r\n\r\n setTimeout(() => {\r\n file[\"name\"] = \"scan\" + Date.now() + this.scanFileList.length + \".jpg\"\r\n this.scanFileList.push(file);\r\n this.scanFileList = this.scanFileList.slice();\r\n this.enProceso = false\r\n this.message(\"Archivo cargado\", \"\")\r\n\r\n this.appRef.tick();\r\n }, 200)\r\n }\r\n\r\n subirFotosScan() {\r\n this.generarData(this.scanFileList);\r\n }\r\n // error_openCamera = (err: any) => {\r\n // console.log(err);\r\n // this.message(\"No se pudo acceder a la camara\", \"Error\")\r\n // }\r\n\r\n noZonePatch(cb: () => void) {\r\n const orig = FileReader;\r\n const unpatched = ((window as any).FileReader as any).__zone_symbol__OriginalDelegate;\r\n (window as any).FileReader = unpatched;\r\n cb();\r\n (window as any).FileReader = orig;\r\n }\r\n\r\n makeFileIntoBlob(_imagePath: any): Promise<Blob> {\r\n this.enProceso = true;\r\n // INSTALL PLUGIN - cordova plugin add cordova-plugin-file\r\n return new Promise((resolve, reject) => {\r\n try {\r\n window.resolveLocalFileSystemURL(_imagePath, (fileEntry: any) => {\r\n fileEntry.file((resFile: any) => {\r\n this.noZonePatch(() => {//! Alert 1: Comentarear esta linea y una de de abajo para ambiente de prueba\r\n var reader = new FileReader();\r\n\r\n reader.onloadend = (evt: any) => {\r\n var imgBlob: any = new Blob([evt.target.result], { type: 'image/jpeg' });\r\n imgBlob.name = 'scan.jpg';\r\n resolve(imgBlob);\r\n };\r\n\r\n reader.onerror = (e) => {\r\n console.log('Failed file read: ' + e.toString());\r\n reject(e);\r\n };\r\n reader.readAsArrayBuffer(resFile);\r\n });//!Comentarear esta linea y una de de arriba para ambiente de prueba\r\n });\r\n }, (error: any) => {\r\n console.error('Error resolving file system URL:', error);\r\n reject(error);\r\n });\r\n } catch (ex) {\r\n console.error('Error in makeFileIntoBlob:', ex);\r\n reject(ex);\r\n }\r\n });\r\n }\r\n\r\n subirImagen(data: any, fileList: any) {\r\n this.enProceso = true;\r\n const formData: FormData = new FormData();\r\n var dataDocs;\r\n var sIdKatios = this.idKatios;\r\n let json;\r\n let headers = new Headers()\r\n dataDocs = { \"data\": data };\r\n formData.append('data', JSON.stringify(dataDocs));\r\n formData.append('unificar', \"true\");\r\n\r\n for (let _i = 0; _i < fileList.length; _i++) {\r\n formData.append('uploadFile_' + data.id + '_' + _i, fileList[_i], fileList[_i].name);\r\n }\r\n\r\n firstValueFrom(this.documentsService.postServiceHttpOptionsDocs(sIdKatios, formData, headers)).then((posts: any) => {\r\n this.scanFileList = new Array<any>();\r\n if (this.modalReference2) {\r\n this.modalReference2.close();\r\n }\r\n if(this.modalReference) {\r\n this.modalReference.close();\r\n }\r\n this.message(\"Se almaceno exitosamente el documento\", \"Felicidades\")\r\n this.cargarParametros(this.tipo)\r\n this.enProceso = false;\r\n this.appRef.tick();\r\n },\r\n\r\n (err: any) => {\r\n this.enProceso = false;\r\n this.message(\"Se presentaron inconvenientes almacenando el documento\", \"Ups!\")\r\n console.error(\"Error : \" + err);\r\n },\r\n );\r\n }\r\n\r\n generarData(fileList: any) {\r\n this.enProceso = true\r\n var sPath1;\r\n var dataClientes\r\n let sPaths = \"\";\r\n if (this.documentoSeleccionado.Tipo.trim().toUpperCase() == \"PERSONA\") {\r\n sPath1 = this.documentoSeleccionado.Tipo.trim() + \"\\\\\" + this.tdoc.trim() +\r\n \"\\\\\" + this.ndoc.trim() + \"\\\\Cliente\\\\\" + this.documentoSeleccionado.NMCo.trim();\r\n } else {\r\n //Kasociada\r\n //producto\r\n //Falta numero de solicitud\r\n\r\n\r\n\r\n sPath1 = this.documentoSeleccionado.Tipo.trim() + \"\\\\\" + this.Kasociada +\r\n \"\\\\\" + this.Producto + \"\\\\\" + this.Solicitud + \"\\\\\" + this.documentoSeleccionado.NMCo;\r\n }\r\n\r\n dataClientes = {\r\n \"Tipo\": this.documentoSeleccionado.Tipo,\r\n \"id\": \"1\",\r\n \"documento\": this.documentoSeleccionado.NMCo,\r\n \"tdoc\": this.tdoc.trim(),\r\n \"ndoc\": this.ndoc.trim(),\r\n \"IdProducto\": this.Solicitud,\r\n \"TipoProducto\": this.Producto,\r\n \"Kasociada\": this.Kasociada,\r\n \"archivoUpload\": fileList[0],\r\n \"nombre\": this.tdoc.trim() + '-' + this.ndoc.trim(),\r\n \"fileCargado\": fileList[0],\r\n \"pathArchivo\": sPath1,\r\n \"TipoArchivo\": this.documentoSeleccionado.TipoArchivo\r\n }\r\n sPaths = sPaths + sPath1 + \",\";\r\n this.subirImagen(dataClientes, fileList)\r\n }\r\n\r\n cargarArchivo(iNodo: any) {\r\n this.scanFileList = new Array<any>();\r\n this.documentoSeleccionado = iNodo;\r\n }\r\n\r\n openDoc(item: any, pdfContent: any) {\r\n if (this.carpetaSeleccionada.TipoArchivo == '1' && this.isMobile) {\r\n cordova.InAppBrowser.open(item.Path, '_system', 'location=yes');\r\n } else {\r\n this.current_path = item.Path;\r\n this.current_label = item.label;\r\n this.openBigModal(pdfContent);\r\n }\r\n }\r\n\r\n openVisorDoc(item: any) {\r\n if (this.carpetaSeleccionada.TipoArchivo == '1' && this.isMobile) {//is mobile\r\n cordova.InAppBrowser.open(item.Path, '_system', 'location=yes');\r\n } else {\r\n this.current_path = item.Path;\r\n this.current_label = item.label;\r\n this.displayPDF = true;\r\n }\r\n }\r\n\r\n openNewWindow(item: any) {\r\n window.open(item.Path, '_blank').focus();\r\n }\r\n\r\n seleccionoDocs(iNodo: any) {\r\n var path = iNodo.Path + iNodo.label\r\n this.pdfUrl = this.server + \"//imagenes//\" + iNodo.idKatios + \"//\" + path;\r\n this.pdfUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.pdfUrl);;\r\n this.gotoBottom();\r\n }\r\n\r\n\r\n message(mensaje: any, tipo: any) {\r\n this.snackBar.add({\r\n severity: tipo,\r\n summary: mensaje,\r\n life: 4000\r\n });\r\n }\r\n\r\n\r\n public gotoBottom(): void {\r\n window.scrollBy(0, this.panel.nativeElement.scrollHeight)\r\n }\r\n\r\n\r\n public VerDetalleTab(items: any) {\r\n if(items?.reglas && typeof(items.reglas) == 'string') items.reglas = JSON.parse(items.reglas);\r\n if (!items?.reglas?.permisos?.subestados && items?.reglas?.permisos){\r\n items.reglas.permisos.cargarFront = items.reglas.permisos.cargar;\r\n items.reglas.permisos.borrarFront = items.reglas.permisos.borrar;\r\n }\r\n else if (items?.reglas?.permisos?.subestados && !this.isEmptyString(this.subestado)){\r\n items.reglas.permisos.cargarFront = Array.isArray(items.reglas.permisos.subestados.cargar) ? items.reglas.permisos.subestados.cargar.map((c: any) => c.toLowerCase().trim()).includes(this.subestado.toLowerCase().trim()): items.reglas.permisos.cargar;\r\n items.reglas.permisos.borrarFront = Array.isArray(items.reglas.permisos.subestados.borrar) ? items.reglas.permisos.subestados.borrar.map((b: any) => b.toLowerCase().trim()).includes(this.subestado.toLowerCase().trim()): items.reglas.permisos.borrar;\r\n }\r\n this.carpetaSeleccionada = items\r\n this.docsEliminables = []\r\n this.totalDocsEliminadosApi = {existoso: 0, fallido: 0};\r\n this.carpetaSeleccionada.children.forEach((element: any) => element.delete = false);\r\n console.log(this.carpetaSeleccionada)\r\n this.tab = 2\r\n }\r\n\r\n private isEmptyString(str: string): boolean {\r\n return str === undefined || str === null || str.trim() === '';\r\n }\r\n\r\n eliminarDocumento(docEliminar: any, e: any, funcOkDelDocument=this.ok_eliminarDocumento, funcErrDelDocument=this.err_eliminarDocumento) {\r\n e.stopPropagation();\r\n this.confirmationService.confirm({\r\n message: `¿Desea eliminar el documento?`,\r\n accept: () => {\r\n let data = { \"idKatios\": this.idKatios, \"codigo\": docEliminar.codigo, \"estado\": \"DES\" };\r\n this.documentsService.updateEstadoFileSystemByCodigo(data, funcOkDelDocument, funcErrDelDocument);\r\n }\r\n });\r\n }\r\n ok_eliminarDocumento = () => {\r\n this.message(\"Documento eliminado satisfactoriamente\", \"\");\r\n\r\n if (this.tipo !== undefined) {\r\n this.cargarParametros(this.tipo)\r\n }\r\n }\r\n err_eliminarDocumento = (err: any) => {\r\n this.message(\"No se pudo eliminar el documento\", \"Ups!\");\r\n console.log(err);\r\n }\r\n\r\n goToTab(tab: any) {\r\n this.tab = tab;\r\n }\r\n\r\n next(iValor: any) {\r\n if (iValor < 0) {\r\n this.nextTabPapa.emit(iValor)\r\n } else {\r\n var respuesta = \"\"\r\n if (this.files) respuesta = this.valorDocumentosPendientes(this.files[0])\r\n\r\n if (respuesta == \"\") {\r\n this.nextTabPapa.emit(iValor)\r\n } else {\r\n this.message(respuesta, \"Ups!\");\r\n }\r\n }\r\n }\r\n\r\n valorDocumentosPendientes(carpetas: any) {\r\n\r\n var respuesta = \"\";\r\n if (carpetas.children) {\r\n carpetas.children.forEach((carpeta: any) => {\r\n\r\n if (carpeta.Obligatorio == 1 && (!carpeta.children || carpeta.children.length == 0)) respuesta = \"Falta \" + carpeta.label\r\n })\r\n }\r\n return respuesta\r\n\r\n }\r\n\r\n filtrarDocumentos() {\r\n this.filesFilter = _.cloneDeep(this.files);\r\n for (let i = 0; i < this.files.length; i++) {\r\n let node = [];\r\n for (let j = 0; j < this.files[i].children.length; j++) {\r\n let file = this.files[i].children[j];\r\n if (file.label.toLowerCase().indexOf(this.valorFiltro.toLowerCase()) == 0) node.push(file)\r\n }\r\n this.filesFilter[i].children = node;\r\n }\r\n }\r\n ngOnDestroy() {\r\n if (this.modalReference) {\r\n this.modalReference.close();\r\n }\r\n if(this.modalReference2) {\r\n this.modalReference2.close();\r\n }\r\n }\r\n}\r\n","<div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n</div>\r\n<p-iconfield *ngIf=\"aplFiltro\">\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Busqueda\" [(ngModel)]=\"valorFiltro\" (keyup)=\"filtrarDocumentos()\" class=\"w-full\">\r\n</p-iconfield>\r\n<p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n<ng-container *ngIf=\"tab==1\" class=\"tablaGestor\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\" class=\"tablaGestor\">\r\n <p-panel header=\"{{carpeta.label}}\" [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpeta.children\">\r\n <a (click)=\"VerDetalleTab(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.children?.length > 0 ? 'green':'red' }\"> <i\r\n class=\"{{item.collapsedIcon || 'pi pi-folder'}}\"></i>\r\n </span>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children !== undefined && item.children.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length === undefined || item.children?.length == 0\">Sin documentos cargados</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n </ng-container>\r\n <ng-container class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-container *ngIf=\"tab==2\">\r\n <div style=\"margin-block: 15px; display: flex;\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goToTab('1')\"></button>\r\n </div>\r\n <p-panel [header]=\"carpetaSeleccionada.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpetaSeleccionada.children\">\r\n <p-checkbox *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" [binary]=\"true\" [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"></p-checkbox>\r\n <a (click)=\"openVisorDoc(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.color }\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && isMobile\" class=\"frameDoc\" scrolling=\"no\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\" style=\"width:75px; height:90px;\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && !isMobile\" class=\"frameDoc\"\r\n style=\"width:85px; height:90px;\" [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </span>\r\n <div>\r\n <div>\r\n <span class=\"name\">{{item.label}}</span>\r\n </div>\r\n <div>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida}}</span>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida}}</span>\r\n </div>\r\n </div>\r\n <span class=\"celular\">\r\n <i\r\n class=\"pi pi-external-link text-blue-500 text-2xl cursor-pointer\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en una nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"\r\n (keydown.space)=\"openNewWindow(item); $event.stopPropagation()\"\r\n ></i>\r\n </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n <div class=\"div-table\" style=\"text-align: center;\">\r\n <div class=\"div-table-row\" style=\"text-align: center;\" class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.cargarFront\" [selectedDocument]=\"carpetaSeleccionada\" (onUploaded)=\"fileChange($event)\" (loadFile)=\"cargarArchivo(carpetaSeleccionada)\"></lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" (click)=\"eliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div-table\" style=\"font-size: 5px\">\r\n V1.0.3\r\n </div>\r\n</ng-container>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n\r\n\r\n<div *ngIf=\"enProceso\" id=\"divProceso\" class=\"cCargando\">\r\n <div id=\"divProcesoMsg\" class=\"cCargandoImg\">\r\n <br />\r\n <i style=\"font-size: 50px\" class=\"pi pi-cog pi-spin\"></i>\r\n <br />\r\n </div>\r\n</div>","/*\r\n * Public API Surface of sf-documents\r\n */\r\n\r\nexport * from './lib/sf-documents.service';\r\nexport * from './lib/sf-documents.component';\r\nexport * from './lib/gateways/document.port';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKa,kBAAkB,CAAA;AAE7B,IAAA,WAAA,GAAA;wGAFW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IA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,IAAI,EAAA,CAAA;sBAAZ;gBAEQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBAEQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBAEQ,IAAI,EAAA,CAAA;sBAAZ;gBAEQ,MAAM,EAAA,CAAA;sBAAd;gBAsB8C,KAAK,EAAA,CAAA;sBAAnD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;gBAG7B,QAAQ,EAAA,CAAA;sBAAhB;;;AEpFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sf-documents.mjs","sources":["../../../projects/sf-documents/src/lib/sf-documents.service.ts","../../../projects/sf-documents/src/lib/pipes/safe.pipe.ts","../../../projects/sf-documents/src/lib/gateways/document.port.ts","../../../projects/sf-documents/src/lib/components/dialog/upload-dialog/upload-dialog.component.ts","../../../projects/sf-documents/src/lib/components/dialog/upload-dialog/upload-dialog.component.html","../../../projects/sf-documents/src/lib/sf-documents.component.ts","../../../projects/sf-documents/src/lib/sf-documents.component.html","../../../projects/sf-documents/src/public-api.ts","../../../projects/sf-documents/src/sf-documents.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SfDocumentsService {\r\n _loading = new BehaviorSubject<boolean>(false);\r\n loading$ = this._loading.asObservable();\r\n\r\n set loading(loading: boolean) {\r\n this._loading.next(loading);\r\n }\r\n constructor() { }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\n\r\n@Pipe({ name: 'safe' })\r\n\r\nexport class SafePipe implements PipeTransform {\r\n\r\n constructor(private sanitizer: DomSanitizer) { }\r\n transform(url:any) {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\r\n }\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\n\r\nexport interface DocumentGatewayService{\r\n getFolders(idKatios:string, data: any): Observable<any>;\r\n updateStatus(idKatios:string, data: any): Observable<any>;\r\n uploadFiles(idKatios: string, formData: FormData): Observable<any>;\r\n generateDocument(idKatios:string, idDoc:string , noDoc:string,data: any): Observable<any>;\r\n getDocumentsToGenerate(idKatios:string, noDoc: string): Observable<any>;\r\n}\r\n\r\nexport const DOCUMENT_SERVICE = new InjectionToken<DocumentGatewayService>('DOCUMENT_SERVICE');","import { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { DialogModule } from 'primeng/dialog';\r\n\r\n@Component({\r\n selector: 'lib-upload-dialog',\r\n imports: [CommonModule, ButtonModule, DialogModule],\r\n templateUrl: './upload-dialog.component.html',\r\n styleUrl: './upload-dialog.component.scss'\r\n})\r\nexport class UploadDialogComponent {\r\n @Input() selectedDocument: any;\r\n @Output() onUploaded = new EventEmitter<{ fileList: File[], tagValue: any }>();\r\n @Output() loadFile = new EventEmitter<void>();\r\n visible: boolean = false;\r\n @ViewChild('fileInput', { static: true })\r\n fileInput!: ElementRef<HTMLInputElement>;\r\n\r\n constructor() { }\r\n\r\n showDialog(){\r\n this.loadFile.emit();\r\n this.visible = true;\r\n }\r\n loadFileClick() {\r\n this.fileInput.nativeElement.value = '';\r\n this.fileInput.nativeElement.click();\r\n }\r\n fileChange(event: any) {\r\n const input = event.target as HTMLInputElement;\r\n if (!input.files?.length) return;\r\n const files = Array.from(input.files);\r\n const pdfs = files.filter(f =>\r\n f.type === 'application/pdf' || f.name.toLowerCase().endsWith('.pdf')\r\n );\r\n const imagePathInput = input.value;\r\n if(pdfs?.length) this.onUploaded.emit({ fileList: pdfs, tagValue: imagePathInput });\r\n this.visible = false;\r\n }\r\n\r\n}\r\n","<button pButton type=\"button\" label=\"Adicionar\" icon=\"pi pi-plus\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"mt-3\">\r\n <div class=\"text-center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" accept=\"application/pdf,.pdf\" multiple>\r\n </div>\r\n <div class=\"text-center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n","import { ApplicationRef, Component, ElementRef, EventEmitter, inject, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { ConfirmationService, MessageService, TreeNode } from 'primeng/api';\r\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';\r\nimport { ToastModule } from 'primeng/toast';\r\nimport * as _ from \"lodash\";\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\r\nimport { PanelModule } from 'primeng/panel';\r\nimport { CheckboxModule } from 'primeng/checkbox';\r\nimport { DialogModule } from 'primeng/dialog';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { SafePipe } from './pipes/safe.pipe';\r\nimport { DOCUMENT_SERVICE, DocumentGatewayService } from './gateways/document.port';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { InputIcon } from 'primeng/inputicon';\r\nimport { IconField } from 'primeng/iconfield';\r\nimport { UploadDialogComponent } from './components/dialog/upload-dialog/upload-dialog.component';\r\nimport { DropdownModule } from 'primeng/dropdown';\r\nimport { SfDocumentsService } from './sf-documents.service';\r\nimport { finalize, switchMap, tap } from 'rxjs/operators';\r\nimport { DatePickerModule } from 'primeng/datepicker';\r\n\r\ndeclare var cordova: any;\r\ndeclare var window: any;\r\n\r\n@Component({\r\n selector: 'app-sf-documents',\r\n imports: [\r\n ToastModule, ButtonModule, ConfirmDialogModule, PanelModule, CheckboxModule,\r\n DialogModule, CommonModule, FormsModule, SafePipe, InputTextModule, InputIcon,\r\n IconField, UploadDialogComponent,\r\n DropdownModule, DatePickerModule\r\n ],\r\n templateUrl: './sf-documents.component.html',\r\n styleUrls: ['./sf-documents.component.scss'],\r\n providers: [DialogService, ConfirmationService],\r\n standalone: true\r\n})\r\nexport class SfDocumentsComponent implements OnDestroy, OnInit{\r\n private documentsService = inject<DocumentGatewayService>(DOCUMENT_SERVICE);\r\n @Input() accion: string = \"\";\r\n @Input() entidad: string = \"\";\r\n @Input() ndoc: string = \"\";\r\n @Input() tdoc: string = \"\";\r\n @Input() tipo: string = \"\";\r\n //Información necesaria para cargar documentos de productos\r\n @Input() Kasociada: string = \"\";\r\n @Input() Producto: string = \"\";\r\n @Input() Solicitud: string = \"\";\r\n @Input() oSession: any;\r\n @Input() perfilDocumentos: any;\r\n @Input() subestado: string = '';\r\n @Input() isMobile: boolean = false;\r\n @Output() nextTabPapa: EventEmitter<number> = new EventEmitter<number>();\r\n\r\n @Input() bAtras: boolean = false;\r\n @Input() bFinal: boolean = false;\r\n @Input() botones: boolean = true;\r\n @Input() aplFiltro: boolean = false;\r\n\r\n @Input() nmco: string[] = [];\r\n\r\n @Input() server: string = \"\";\r\n valorFiltro: string = \"\";\r\n\r\n tab = 1;\r\n enProceso = false;\r\n carpetaSeleccionada: any;\r\n files: any;\r\n filesFilter: any;\r\n imagePathInput: any;\r\n modalReference: DynamicDialogRef | undefined;\r\n modalReference2: DynamicDialogRef | undefined;\r\n documentoSeleccionado: any;\r\n docsEliminables: any[] = [];\r\n totalDocsEliminadosApi = {existoso: 0, fallido: 0};\r\n file: any;\r\n urlDoc: any;\r\n pdfUrl: any;\r\n current_path: string = \"\";\r\n current_label: string = \"\";\r\n scanFileList = new Array<any>();\r\n displayPDF: boolean = false;\r\n\r\n @ViewChild('pdf', { read: ElementRef }) public panel!: ElementRef<any>;\r\n UsuarioNdoc: any;\r\n UsuarioTdoc: any;\r\n @Input() idKatios: any;\r\n\r\n displayGenerate = false;\r\n\r\ncanGenerate = true; // lo puedes controlar por permisos si aplica\r\n\r\ndocumentTypes: any[] = [];\r\ndocumentsToGenerate: any[] = [];\r\ndocumentsToGenerateMap: Record<string, any> = {};\r\ndynamicParams: any[] = [];\r\ndynamicValues: Record<string, any> = {};\r\nselectedDocType: string | null = null;\r\nselectedRange: string | null = null;\r\n\r\n constructor(\r\n private sanitizer: DomSanitizer,\r\n private dialog: DialogService,\r\n public snackBar: MessageService,\r\n private appRef: ApplicationRef,\r\n private confirmationService: ConfirmationService,\r\n private documentService: SfDocumentsService\r\n ) { }\r\n\r\n ngOnInit() {\r\n if (this.oSession != null && this.oSession.UsuarioSistema.TDOC !== undefined && this.oSession.UsuarioSistema.NDOC !== undefined) {\r\n this.idKatios = this.oSession.UsuarioSistema.IDKATIOS.trim();\r\n this.perfilDocumentos = this.oSession.UsuarioSistema.PERDOCUMENTOS.trim();\r\n } \r\n if (this.tipo && this.perfilDocumentos) {\r\n this.cargarParametros(this.tipo)\r\n }\r\n }\r\n\r\n cargarParametros(tipo: string) {\r\n if (tipo !== '1') return;\r\n \r\n this.documentService.loading = true;\r\n \r\n const data = {\r\n action: this.accion,\r\n entity: this.entidad,\r\n tdoc: this.tdoc,\r\n ndoc: this.ndoc,\r\n request: this.Solicitud,\r\n documentProfile: this.perfilDocumentos,\r\n product: this.Producto\r\n };\r\n \r\n this.documentsService.getFolders(this.idKatios, data).pipe(\r\n tap((response: any) => {\r\n const res = response.data.RESPUESTA;\r\n this.okCargoArbol(res);\r\n }),\r\n switchMap(() =>\r\n this.documentsService.getDocumentsToGenerate(this.idKatios, this.Solicitud)\r\n ),\r\n tap((resp: any) => {\r\n const list = resp?.data ?? []; // según tu JSON real\r\n this.documentsToGenerate = list;\r\n \r\n this.documentsToGenerateMap = {};\r\n list.forEach((d: any) => (this.documentsToGenerateMap[d.idDoc] = d));\r\n \r\n // dropdown: usa idDoc pero mantén objeto completo en map\r\n this.documentTypes = list.map((d: any) => ({\r\n label: d.description,\r\n code: d.idDoc\r\n }));\r\n }),\r\n finalize(() => {\r\n this.documentService.loading = false;\r\n })\r\n ).subscribe({\r\n error: (error: any) => {\r\n this.errorCargarArbol(error);\r\n }\r\n });\r\n \r\n this.tab = 1;\r\n this.documentoSeleccionado = null;\r\n }\r\n expandAll() {\r\n this.files.forEach((node: any) => {\r\n this.expandRecursive(node, true);\r\n });\r\n }\r\n\r\n private expandRecursive(node: TreeNode, isExpand: boolean) {\r\n node.expanded = isExpand;\r\n var objeto: any;\r\n objeto = node\r\n if (node.children && node.children?.length > 0) {\r\n node.children.forEach(childNode => {\r\n this.expandRecursive(childNode, isExpand);\r\n });\r\n } else if (objeto.Path !== undefined) {\r\n var path = 'Imagenes/' + objeto.Path + objeto.label\r\n var re = /[\\\\]/gi;\r\n path = path.replace(re, \"/\")\r\n objeto.Path = this.server + path\r\n //this.sanitizer.bypassSecurityTrustUrl(this.server + path)\r\n }\r\n }\r\n \r\n public okCargoArbol = (iArbol: any) => {\r\n if (iArbol.CARPETA.length === undefined) {\r\n iArbol = new Array(iArbol.CARPETA)\r\n }\r\n\r\n iArbol.forEach((element: any) => {\r\n this.convertirArrayChildren(element)\r\n });\r\n\r\n //\r\n this.filtrarTipoDocumento(iArbol)\r\n //\r\n this.files = iArbol;\r\n this.filesFilter = iArbol;\r\n this.expandAll();\r\n this.documentService.loading = false;\r\n }\r\n public errorCargarArbol = (iError: any) => {\r\n this.message(\"error\", \"Error al traer la información\", iError.message);\r\n this.documentService.loading = false;\r\n }\r\n\r\n onClickedCheckDelete($event: any, document: any) {\r\n if ($event.checked) this.docsEliminables.push(document);\r\n else this.docsEliminables = this.docsEliminables.filter(doc => doc !== document);\r\n }\r\n\r\n funcOkDelDocumentMasivo = () => {\r\n this.totalDocsEliminadosApi.existoso += 1;\r\n if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === this.docsEliminables.length) {\r\n this.cargarParametros(this.tipo);\r\n if ( this.totalDocsEliminadosApi.fallido > 0) this.message(\"warn\", \"\", \"Algunos documentos no pudieron ser eliminados\");\r\n else this.message(\"success\", \"\", \"Documentos eliminados satisfactoriamente\");\r\n\r\n }\r\n }\r\n\r\n funcErrDelDocumentMasivo = () => {\r\n this.totalDocsEliminadosApi.fallido += 1;\r\n if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === this.docsEliminables.length) {\r\n this.cargarParametros(this.tipo);\r\n this.message(\"warn\", \"\", \"Algunos documentos no pudieron ser eliminados\");\r\n }\r\n }\r\n\r\n eliminarMasivo(){\r\n this.confirmationService.confirm({\r\n message: `¿Desea eliminar los ${this.docsEliminables.length} documentos seleccionados?`,\r\n acceptLabel: 'Si',\r\n rejectLabel: 'No',\r\n accept: () => {\r\n this.documentService.loading = true\r\n this.totalDocsEliminadosApi = {existoso: 0, fallido: 0};\r\n this.docsEliminables.forEach(doc => {\r\n let data = { \"code\": doc.codigo, \"status\": \"DES\" };\r\n this.documentsService.updateStatus(this.idKatios,data).subscribe({\r\n next: (response: any) => {\r\n this.funcOkDelDocumentMasivo();\r\n },\r\n error: (error: any) => {\r\n this.documentService.loading = false;\r\n this.funcErrDelDocumentMasivo();\r\n }\r\n });\r\n })\r\n }\r\n });\r\n }\r\n\r\n filtrarTipoDocumento(iArbol: any){\r\n if(this.nmco.length !== 0){\r\n iArbol.forEach((element: any) => {\r\n element.children = element.children.filter((child: any) => this.nmco.includes(child.NMCo));\r\n })\r\n }\r\n }\r\n\r\n convertirArrayChildren(node: any) {\r\n if (node.children === undefined) node.children = []\r\n else if (node.children.length == undefined) {\r\n node.children = new Array(node.children)\r\n }\r\n node.children.forEach((childNode: any) => {\r\n this.convertirArrayChildren(childNode);\r\n });\r\n\r\n }\r\n openBigModal(content: any) {\r\n this.modalReference = this.dialog.open(content, { \r\n width: '70%',\r\n modal: true,\r\n closable: true\r\n });\r\n this.modalReference.onClose.subscribe((result: any) => {\r\n //this.closeResult = `Closed with: ${result}`;\r\n });\r\n // this.modalReference.onHide.subscribe(() => {\r\n // //this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;\r\n // });\r\n }\r\n\r\n openModal2(content: any) {\r\n this.modalReference2 = this.dialog.open(content,{});\r\n this.modalReference2.onClose.subscribe((result: any) => {\r\n //this.closeResult = `Closed with: ${result}`;\r\n });\r\n }\r\n\r\n\r\n // takePhotoClick() {\r\n // this.documentsService.openCamera(this.ok_openCamera, this.error_openCamera);\r\n // }\r\n /////Cuando se cargar archivos adjuntos\r\n fileChange(data: any) {\r\n const fileList = data.fileList;\r\n const tagValue = data.tagValue;\r\n this.file = fileList[0];\r\n this.imagePathInput = tagValue;\r\n this.generarData(fileList);\r\n }\r\n\r\n // ok_openCamera = (imageUri: any) => {\r\n // this.makeFileIntoBlob(imageUri)\r\n // .then((file: Blob) => {\r\n // this.appRef.tick();\r\n // if (file.size > 1000000) {\r\n // if (confirm(\"Este archivo es bastate pesado, le recomendamos bajar la calidad de la cámara. ¿Desea subir este archivo?\")) {\r\n // this.loadFileToList(file);\r\n // }\r\n // } else {\r\n // this.loadFileToList(file);\r\n // }\r\n // this.documentService.loading = false;\r\n // })\r\n // .catch((error: Error) => {\r\n // console.error('Error processing camera image:', error);\r\n // this.message(\"Error al procesar la imagen de la cámara\", \"Error\");\r\n // this.documentService.loading = false;\r\n // });\r\n // }\r\n\r\n loadFileToList(file: any) {\r\n\r\n setTimeout(() => {\r\n file[\"name\"] = \"scan\" + Date.now() + this.scanFileList.length + \".jpg\"\r\n this.scanFileList.push(file);\r\n this.scanFileList = this.scanFileList.slice();\r\n this.documentService.loading = false\r\n this.message(\"success\", \"\", \"Archivo cargado exitosamente\");\r\n\r\n this.appRef.tick();\r\n }, 200)\r\n }\r\n\r\n subirFotosScan() {\r\n this.generarData(this.scanFileList);\r\n }\r\n // error_openCamera = (err: any) => {\r\n // console.log(err);\r\n // this.message(\"No se pudo acceder a la camara\", \"Error\")\r\n // }\r\n\r\n noZonePatch(cb: () => void) {\r\n const orig = FileReader;\r\n const unpatched = ((window as any).FileReader as any).__zone_symbol__OriginalDelegate;\r\n (window as any).FileReader = unpatched;\r\n cb();\r\n (window as any).FileReader = orig;\r\n }\r\n\r\n makeFileIntoBlob(_imagePath: any): Promise<Blob> {\r\n this.documentService.loading = true;\r\n // INSTALL PLUGIN - cordova plugin add cordova-plugin-file\r\n return new Promise((resolve, reject) => {\r\n try {\r\n window.resolveLocalFileSystemURL(_imagePath, (fileEntry: any) => {\r\n fileEntry.file((resFile: any) => {\r\n this.noZonePatch(() => {//! Alert 1: Comentarear esta linea y una de de abajo para ambiente de prueba\r\n var reader = new FileReader();\r\n\r\n reader.onloadend = (evt: any) => {\r\n var imgBlob: any = new Blob([evt.target.result], { type: 'image/jpeg' });\r\n imgBlob.name = 'scan.jpg';\r\n resolve(imgBlob);\r\n };\r\n\r\n reader.onerror = (e) => {\r\n console.log('Failed file read: ' + e.toString());\r\n reject(e);\r\n };\r\n reader.readAsArrayBuffer(resFile);\r\n });//!Comentarear esta linea y una de de arriba para ambiente de prueba\r\n });\r\n }, (error: any) => {\r\n console.error('Error resolving file system URL:', error);\r\n reject(error);\r\n });\r\n } catch (ex) {\r\n console.error('Error in makeFileIntoBlob:', ex);\r\n reject(ex);\r\n }\r\n });\r\n }\r\n\r\n subirImagen(data: any, fileList: any) {\r\n this.documentService.loading = true;\r\n const formData: FormData = new FormData();\r\n var dataDocs;\r\n var sIdKatios = this.idKatios;\r\n dataDocs = { \"data\": data };\r\n formData.append('data', JSON.stringify(dataDocs));\r\n formData.append('merge', \"true\");\r\n\r\n for (let _i = 0; _i < fileList.length; _i++) {\r\n formData.append('files', fileList[_i], fileList[_i].name);\r\n }\r\n\r\n this.documentsService.uploadFiles(sIdKatios, formData).subscribe({\r\n next: (response: any) => {\r\n this.scanFileList = new Array<any>();\r\n if (this.modalReference2) {\r\n this.modalReference2.close();\r\n }\r\n if(this.modalReference) {\r\n this.modalReference.close();\r\n }\r\n this.message(\"success\", \"Felicidades\", \"Se almacenó el documento correctamente\");\r\n this.cargarParametros(this.tipo)\r\n this.documentService.loading = false;\r\n this.appRef.tick();\r\n },\r\n error: (err: any) => {\r\n this.documentService.loading = false;\r\n this.message(\"error\", \"Se presentaron inconvenientes almacenando el documento\", err.message);\r\n console.error(\"Error : \" + err);\r\n },\r\n });\r\n }\r\n\r\n generarData(fileList: any) {\r\n this.documentService.loading = true\r\n var sPath1;\r\n var dataClientes\r\n let sPaths = \"\";\r\n if (this.documentoSeleccionado.Tipo.trim().toUpperCase() == \"PERSONA\") {\r\n sPath1 = this.documentoSeleccionado.Tipo.trim() + \"\\\\\" + this.tdoc.trim() +\r\n \"\\\\\" + this.ndoc.trim() + \"\\\\Cliente\\\\\" + this.documentoSeleccionado.NMCo.trim();\r\n } else {\r\n //Kasociada\r\n //producto\r\n //Falta numero de solicitud\r\n\r\n\r\n\r\n sPath1 = this.documentoSeleccionado.Tipo.trim() + \"\\\\\" + this.Kasociada +\r\n \"\\\\\" + this.Producto + \"\\\\\" + this.Solicitud + \"\\\\\" + this.documentoSeleccionado.NMCo;\r\n }\r\n\r\n dataClientes = {\r\n \"Tipo\": this.documentoSeleccionado.Tipo,\r\n \"id\": \"1\",\r\n \"documento\": this.documentoSeleccionado.NMCo,\r\n \"tdoc\": this.tdoc.trim(),\r\n \"ndoc\": this.ndoc.trim(),\r\n \"IdProducto\": this.Solicitud,\r\n \"TipoProducto\": this.Producto,\r\n \"Kasociada\": this.Kasociada,\r\n \"archivoUpload\": fileList[0],\r\n \"nombre\": this.tdoc.trim() + '-' + this.ndoc.trim(),\r\n \"fileCargado\": fileList[0],\r\n \"pathArchivo\": sPath1,\r\n \"TipoArchivo\": this.documentoSeleccionado.TipoArchivo\r\n }\r\n sPaths = sPaths + sPath1 + \",\";\r\n this.subirImagen(dataClientes, fileList)\r\n }\r\n\r\n cargarArchivo(iNodo: any) {\r\n this.scanFileList = new Array<any>();\r\n this.documentoSeleccionado = iNodo;\r\n }\r\n\r\n async openDoc(item: any, pdfContent: any) {\r\n if (this.carpetaSeleccionada.TipoArchivo == '1' && this.isMobile) {\r\n cordova.InAppBrowser.open(item.Path, '_system', 'location=yes');\r\n } else {\r\n this.current_path = item.Path;\r\n this.current_label = item.label;\r\n this.openBigModal(pdfContent);\r\n }\r\n }\r\n\r\n openVisorDoc(item: any) {\r\n if (this.carpetaSeleccionada.TipoArchivo == '1' && this.isMobile) {//is mobile\r\n cordova.InAppBrowser.open(item.Path, '_system', 'location=yes');\r\n } else {\r\n this.current_path = item.Path;\r\n this.current_label = item.label;\r\n this.displayPDF = true;\r\n }\r\n }\r\n\r\n async openNewWindow(item: any) {\r\n window.open(item.Path, '_blank').focus();\r\n }\r\n\r\n async seleccionoDocs(iNodo: any) {\r\n var path = iNodo.Path + iNodo.label\r\n this.pdfUrl = \"//imagenes//\" + iNodo.idKatios + \"//\" + path;\r\n this.pdfUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.pdfUrl);\r\n this.gotoBottom();\r\n }\r\n\r\n\r\n message(severity: string, summary: string, message: any) {\r\n this.snackBar.add({\r\n severity: severity,\r\n summary: summary,\r\n detail: message,\r\n life: 4000\r\n });\r\n }\r\n\r\n\r\n public gotoBottom(): void {\r\n window.scrollBy(0, this.panel.nativeElement.scrollHeight)\r\n }\r\n\r\n\r\n public VerDetalleTab(items: any) {\r\n if(items?.reglas && typeof(items.reglas) == 'string') items.reglas = JSON.parse(items.reglas);\r\n if (!items?.reglas?.permisos?.subestados && items?.reglas?.permisos){\r\n items.reglas.permisos.cargarFront = items.reglas.permisos.cargar;\r\n items.reglas.permisos.borrarFront = items.reglas.permisos.borrar;\r\n }\r\n else if (items?.reglas?.permisos?.subestados && !this.isEmptyString(this.subestado)){\r\n items.reglas.permisos.cargarFront = Array.isArray(items.reglas.permisos.subestados.cargar) ? items.reglas.permisos.subestados.cargar.map((c: any) => c.toLowerCase().trim()).includes(this.subestado.toLowerCase().trim()): items.reglas.permisos.cargar;\r\n items.reglas.permisos.borrarFront = Array.isArray(items.reglas.permisos.subestados.borrar) ? items.reglas.permisos.subestados.borrar.map((b: any) => b.toLowerCase().trim()).includes(this.subestado.toLowerCase().trim()): items.reglas.permisos.borrar;\r\n }\r\n this.carpetaSeleccionada = items\r\n this.docsEliminables = []\r\n this.totalDocsEliminadosApi = {existoso: 0, fallido: 0};\r\n this.carpetaSeleccionada.children.forEach((element: any) => element.delete = false);\r\n this.tab = 2\r\n }\r\n\r\n private isEmptyString(str: string): boolean {\r\n return str === undefined || str === null || str.trim() === '';\r\n }\r\n\r\n eliminarDocumento(docEliminar: any, e: any, funcOkDelDocument=this.ok_eliminarDocumento, funcErrDelDocument=this.err_eliminarDocumento) {\r\n e.stopPropagation();\r\n this.confirmationService.confirm({\r\n message: `¿Desea eliminar el documento?`,\r\n accept: () => {\r\n let data = { \"code\": docEliminar.codigo, \"status\": \"DES\" };\r\n this.documentsService.updateStatus(this.idKatios,data).subscribe({\r\n next: (response: any) => {\r\n funcOkDelDocument();\r\n },\r\n error: (error: any) => {\r\n this.documentService.loading = false;\r\n funcErrDelDocument(error);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n ok_eliminarDocumento = () => {\r\n this.message(\"success\", \"\", \"Documento eliminado satisfactoriamente\");\r\n\r\n if (this.tipo !== undefined) {\r\n this.cargarParametros(this.tipo)\r\n }\r\n }\r\n err_eliminarDocumento = (err: any) => {\r\n this.message(\"error\", \"No se pudo eliminar el documento\", err.message);\r\n }\r\n\r\n goToTab(tab: any) {\r\n this.tab = tab;\r\n }\r\n\r\n next(iValor: any) {\r\n if (iValor < 0) {\r\n this.nextTabPapa.emit(iValor)\r\n } else {\r\n var respuesta = \"\"\r\n if (this.files) respuesta = this.valorDocumentosPendientes(this.files[0])\r\n\r\n if (respuesta == \"\") {\r\n this.nextTabPapa.emit(iValor)\r\n } else {\r\n this.message(\"warn\", \"Ups!\", respuesta);\r\n }\r\n }\r\n }\r\n\r\n valorDocumentosPendientes(carpetas: any) {\r\n\r\n var respuesta = \"\";\r\n if (carpetas.children) {\r\n carpetas.children.forEach((carpeta: any) => {\r\n\r\n if (carpeta.Obligatorio == 1 && (!carpeta.children || carpeta.children.length == 0)) respuesta = \"Falta \" + carpeta.label\r\n })\r\n }\r\n return respuesta\r\n\r\n }\r\n\r\n filtrarDocumentos() {\r\n this.filesFilter = _.cloneDeep(this.files);\r\n for (let i = 0; i < this.files.length; i++) {\r\n let node = [];\r\n for (let j = 0; j < this.files[i].children.length; j++) {\r\n let file = this.files[i].children[j];\r\n if (file.label.toLowerCase().indexOf(this.valorFiltro.toLowerCase()) == 0) node.push(file)\r\n }\r\n this.filesFilter[i].children = node;\r\n }\r\n }\r\n ngOnDestroy() {\r\n if (this.modalReference) {\r\n this.modalReference.close();\r\n }\r\n if(this.modalReference2) {\r\n this.modalReference2.close();\r\n }\r\n }\r\n openGenerateDialog() {\r\n this.selectedDocType = null;\r\n this.selectedRange = null;\r\n this.displayGenerate = true;\r\n }\r\n \r\n generateDocument() {\r\n if (!this.selectedDocType) return;\r\n \r\n // Validación mínima: si hay params, exigir que no estén vacíos\r\n for (const p of this.dynamicParams || []) {\r\n const key = p.name;\r\n const v = this.dynamicValues?.[key];\r\n if (v === null || v === undefined || v === '') {\r\n this.message('warn', '', `Falta el parámetro ${p.description}`);\r\n return;\r\n }\r\n }\r\n \r\n // construir params\r\n const paramsToSend: any = {};\r\n for (const p of this.dynamicParams || []) {\r\n const key = p.name;\r\n const raw = this.dynamicValues?.[key];\r\n \r\n paramsToSend[p.name] =\r\n (p.type || '').toLowerCase() === 'date'\r\n ? this.toYYYYMMDD(raw)\r\n : raw;\r\n }\r\n \r\n this.enProceso = true;\r\n \r\n const payload = {\r\n params: paramsToSend\r\n };\r\n this.documentsService.generateDocument(this.idKatios,this.selectedDocType, this.Solicitud, payload).subscribe({\r\n next: () => {\r\n this.displayGenerate = false;\r\n this.message('success', '', 'Documento en generación');\r\n this.cargarParametros(this.tipo);\r\n this.enProceso = false;\r\n },\r\n error: (err: any) => {\r\n this.message('error', 'No se pudo generar el documento', err?.message || err);\r\n this.enProceso = false;\r\n }\r\n });\r\n }\r\n private toYYYYMMDD(value: any): string | null {\r\n if (!value) return null;\r\n const d = value instanceof Date ? value : new Date(value);\r\n if (isNaN(d.getTime())) return null;\r\n \r\n // ISO: 2025-12-19T05:00:00.000Z -> 2025-12-19\r\n return d.toISOString().slice(0, 10);\r\n }\r\n onDocTypeChange() {\r\n const doc = this.selectedDocType ? this.documentsToGenerateMap[this.selectedDocType] : null;\r\n \r\n this.dynamicParams = doc?.params ?? [];\r\n this.dynamicValues = {}; // reset valores\r\n \r\n // valores default opcionales\r\n for (const p of this.dynamicParams) {\r\n const key = p.name;\r\n this.dynamicValues[key] = null;\r\n }\r\n }\r\n \r\n}\r\n","<div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n</div>\r\n<!-- Toolbar superior (solo tab 1) -->\r\n<div *ngIf=\"tab==1\" class=\"doc-toolbar\">\r\n <div class=\"doc-toolbar-left\" *ngIf=\"aplFiltro\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Busqueda\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"(documentTypes?.length ?? 0) > 0\" >\r\n <button pButton type=\"button\"\r\n label=\"Generar documento\"\r\n icon=\"pi pi-file-edit\"\r\n class=\"p-button-primary\"\r\n (click)=\"openGenerateDialog()\"\r\n [disabled]=\"enProceso || !canGenerate\">\r\n </button>\r\n </div>\r\n</div>\r\n<p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n<ng-container *ngIf=\"tab==1\" class=\"tablaGestor\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\" class=\"tablaGestor\">\r\n <p-panel header=\"{{carpeta.label}}\" [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpeta.children\">\r\n <a (click)=\"VerDetalleTab(item)\">\r\n <i class=\"{{item.collapsedIcon || 'pi pi-folder'}} imagen\" [ngStyle]=\"{'color': item.children?.length > 0 ? 'green':'red' }\"></i>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children !== undefined && item.children.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length === undefined || item.children?.length == 0\">Sin documentos cargados</span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n </ng-container>\r\n <ng-container class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n<ng-container *ngIf=\"tab==2\">\r\n <div style=\"margin-block: 15px; display: flex;\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goToTab('1')\"></button>\r\n </div>\r\n <p-panel [header]=\"carpetaSeleccionada.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [style]=\"{'height':'100%'}\">\r\n <ul class=\"contacts\">\r\n <li *ngFor=\"let item of carpetaSeleccionada.children\">\r\n <p-checkbox *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" [binary]=\"true\" [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"></p-checkbox>\r\n <a (click)=\"openVisorDoc(item)\">\r\n <span class=\"imagen\" [ngStyle]=\"{'color': item.color }\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && isMobile\" class=\"frameDoc\" scrolling=\"no\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\" style=\"width:75px; height:90px;\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1' && !isMobile\" class=\"frameDoc\"\r\n style=\"width:85px; height:90px;\" [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </span>\r\n <div>\r\n <div>\r\n <span class=\"name\">{{item.label}}</span>\r\n </div>\r\n <div>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida}}</span>\r\n <span class=\"Label\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida}}</span>\r\n </div>\r\n </div>\r\n <span class=\"celular\">\r\n <i\r\n class=\"pi pi-external-link text-blue-500 text-2xl cursor-pointer\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en una nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"\r\n (keydown.space)=\"openNewWindow(item); $event.stopPropagation()\"\r\n ></i>\r\n </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </p-panel>\r\n <div class=\"div-table\" style=\"text-align: center;\">\r\n <div class=\"div-table-row\" style=\"text-align: center;\" class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.cargarFront\" [selectedDocument]=\"carpetaSeleccionada\" (onUploaded)=\"fileChange($event)\" (loadFile)=\"cargarArchivo(carpetaSeleccionada)\"></lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpetaSeleccionada?.reglas?.permisos?.borrarFront\" (click)=\"eliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"div-table\" style=\"font-size: 5px\">\r\n V1.0.3\r\n </div>\r\n</ng-container>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n<p-dialog header=\"Generar documento\"\r\n [(visible)]=\"displayGenerate\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [style]=\"{width: isMobile ? '95vw' : '520px'}\">\r\n\r\n <div class=\"gen-form\">\r\n <!-- Tipo de documento -->\r\n <div class=\"gen-field\">\r\n <label class=\"gen-label\">Tipo de documento</label>\r\n <p-dropdown\r\n class=\"gen-control\"\r\n [options]=\"documentTypes\"\r\n optionLabel=\"label\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDocType\"\r\n placeholder=\"Seleccione un tipo\"\r\n appendTo=\"body\"\r\n (onChange)=\"onDocTypeChange()\">\r\n </p-dropdown>\r\n </div>\r\n\r\n <!-- Parámetros dinámicos -->\r\n <div class=\"gen-section\" *ngIf=\"dynamicParams?.length\">\r\n <div class=\"gen-field\" *ngFor=\"let p of dynamicParams\">\r\n <label class=\"gen-label\">\r\n {{ p.description }}\r\n <span class=\"gen-required\" *ngIf=\"p.required\">*</span>\r\n </label>\r\n\r\n <!-- Date -->\r\n <p-datepicker\r\n *ngIf=\"(p.type || '').toLowerCase() === 'date'\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n [showIcon]=\"true\"\r\n appendTo=\"body\"\r\n dateFormat=\"yy-mm-dd\">\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"(p.type || '').toLowerCase() === 'nvarchar' || (p.type || '').toLowerCase() === 'string'\"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\" />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"['int','decimal','number'].includes((p.type || '').toLowerCase())\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n >\r\n </p-inputNumber>\r\n\r\n <!-- Boolean -->\r\n <div class=\"gen-control gen-checkbox\"\r\n *ngIf=\"['boolean','bit','bool'].includes((p.type || '').toLowerCase())\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-checkbox>\r\n <span class=\"gen-checkbox-label\">Sí</span>\r\n </div>\r\n\r\n <!-- helper opcional -->\r\n <small class=\"gen-help\" *ngIf=\"p.help\">{{ p.help }}</small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button pButton type=\"button\" label=\"Cancelar\" class=\"p-button-text\"\r\n (click)=\"displayGenerate=false\"></button>\r\n\r\n <button pButton type=\"button\" label=\"Generar\" icon=\"pi pi-cog\"\r\n (click)=\"generateDocument()\"\r\n [disabled]=\"!selectedDocType || enProceso\">\r\n </button>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n","/*\r\n * Public API Surface of sf-documents\r\n */\r\n\r\nexport * from './lib/sf-documents.service';\r\nexport * from './lib/sf-documents.component';\r\nexport * from './lib/gateways/document.port';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i4.SfDocumentsService","i5","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,kBAAkB,CAAA;AAC7B,IAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;AAC9C,IAAA,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE;IAEvC,IAAI,OAAO,CAAC,OAAgB,EAAA;AAC1B,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;;AAE7B,IAAA,WAAA,GAAA;wGAPW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,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,EAAA,CAAA;sBAAhB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBAEQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBAEQ,IAAI,EAAA,CAAA;sBAAZ;gBAEQ,MAAM,EAAA,CAAA;sBAAd;gBAsB8C,KAAK,EAAA,CAAA;sBAAnD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;gBAG7B,QAAQ,EAAA,CAAA;sBAAhB;;;AEzFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { InjectionToken } from "@angular/core";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
export interface DocumentGatewayService {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
getFolders(idKatios: string, data: any): Observable<any>;
|
|
5
|
+
updateStatus(idKatios: string, data: any): Observable<any>;
|
|
6
|
+
uploadFiles(idKatios: string, formData: FormData): Observable<any>;
|
|
7
|
+
generateDocument(idKatios: string, idDoc: string, noDoc: string, data: any): Observable<any>;
|
|
8
|
+
getDocumentsToGenerate(idKatios: string, noDoc: string): Observable<any>;
|
|
7
9
|
}
|
|
8
10
|
export declare const DOCUMENT_SERVICE: InjectionToken<DocumentGatewayService>;
|
|
@@ -2,6 +2,7 @@ import { ApplicationRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@an
|
|
|
2
2
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
3
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
4
4
|
import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
5
|
+
import { SfDocumentsService } from './sf-documents.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class SfDocumentsComponent implements OnDestroy, OnInit {
|
|
7
8
|
private sanitizer;
|
|
@@ -9,6 +10,7 @@ export declare class SfDocumentsComponent implements OnDestroy, OnInit {
|
|
|
9
10
|
snackBar: MessageService;
|
|
10
11
|
private appRef;
|
|
11
12
|
private confirmationService;
|
|
13
|
+
private documentService;
|
|
12
14
|
private documentsService;
|
|
13
15
|
accion: string;
|
|
14
16
|
entidad: string;
|
|
@@ -55,7 +57,16 @@ export declare class SfDocumentsComponent implements OnDestroy, OnInit {
|
|
|
55
57
|
UsuarioNdoc: any;
|
|
56
58
|
UsuarioTdoc: any;
|
|
57
59
|
idKatios: any;
|
|
58
|
-
|
|
60
|
+
displayGenerate: boolean;
|
|
61
|
+
canGenerate: boolean;
|
|
62
|
+
documentTypes: any[];
|
|
63
|
+
documentsToGenerate: any[];
|
|
64
|
+
documentsToGenerateMap: Record<string, any>;
|
|
65
|
+
dynamicParams: any[];
|
|
66
|
+
dynamicValues: Record<string, any>;
|
|
67
|
+
selectedDocType: string | null;
|
|
68
|
+
selectedRange: string | null;
|
|
69
|
+
constructor(sanitizer: DomSanitizer, dialog: DialogService, snackBar: MessageService, appRef: ApplicationRef, confirmationService: ConfirmationService, documentService: SfDocumentsService);
|
|
59
70
|
ngOnInit(): void;
|
|
60
71
|
cargarParametros(tipo: string): void;
|
|
61
72
|
expandAll(): void;
|
|
@@ -78,11 +89,11 @@ export declare class SfDocumentsComponent implements OnDestroy, OnInit {
|
|
|
78
89
|
subirImagen(data: any, fileList: any): void;
|
|
79
90
|
generarData(fileList: any): void;
|
|
80
91
|
cargarArchivo(iNodo: any): void;
|
|
81
|
-
openDoc(item: any, pdfContent: any): void
|
|
92
|
+
openDoc(item: any, pdfContent: any): Promise<void>;
|
|
82
93
|
openVisorDoc(item: any): void;
|
|
83
|
-
openNewWindow(item: any): void
|
|
84
|
-
seleccionoDocs(iNodo: any): void
|
|
85
|
-
message(
|
|
94
|
+
openNewWindow(item: any): Promise<void>;
|
|
95
|
+
seleccionoDocs(iNodo: any): Promise<void>;
|
|
96
|
+
message(severity: string, summary: string, message: any): void;
|
|
86
97
|
gotoBottom(): void;
|
|
87
98
|
VerDetalleTab(items: any): void;
|
|
88
99
|
private isEmptyString;
|
|
@@ -94,6 +105,10 @@ export declare class SfDocumentsComponent implements OnDestroy, OnInit {
|
|
|
94
105
|
valorDocumentosPendientes(carpetas: any): string;
|
|
95
106
|
filtrarDocumentos(): void;
|
|
96
107
|
ngOnDestroy(): void;
|
|
108
|
+
openGenerateDialog(): void;
|
|
109
|
+
generateDocument(): void;
|
|
110
|
+
private toYYYYMMDD;
|
|
111
|
+
onDocTypeChange(): void;
|
|
97
112
|
static ɵfac: i0.ɵɵFactoryDeclaration<SfDocumentsComponent, never>;
|
|
98
113
|
static ɵcmp: i0.ɵɵComponentDeclaration<SfDocumentsComponent, "app-sf-documents", never, { "accion": { "alias": "accion"; "required": false; }; "entidad": { "alias": "entidad"; "required": false; }; "ndoc": { "alias": "ndoc"; "required": false; }; "tdoc": { "alias": "tdoc"; "required": false; }; "tipo": { "alias": "tipo"; "required": false; }; "Kasociada": { "alias": "Kasociada"; "required": false; }; "Producto": { "alias": "Producto"; "required": false; }; "Solicitud": { "alias": "Solicitud"; "required": false; }; "oSession": { "alias": "oSession"; "required": false; }; "perfilDocumentos": { "alias": "perfilDocumentos"; "required": false; }; "subestado": { "alias": "subestado"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; "bAtras": { "alias": "bAtras"; "required": false; }; "bFinal": { "alias": "bFinal"; "required": false; }; "botones": { "alias": "botones"; "required": false; }; "aplFiltro": { "alias": "aplFiltro"; "required": false; }; "nmco": { "alias": "nmco"; "required": false; }; "server": { "alias": "server"; "required": false; }; "idKatios": { "alias": "idKatios"; "required": false; }; }, { "nextTabPapa": "nextTabPapa"; }, never, never, true, never>;
|
|
99
114
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class SfDocumentsService {
|
|
4
|
+
_loading: BehaviorSubject<boolean>;
|
|
5
|
+
loading$: import("rxjs").Observable<boolean>;
|
|
6
|
+
set loading(loading: boolean);
|
|
3
7
|
constructor();
|
|
4
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<SfDocumentsService, never>;
|
|
5
9
|
static ɵprov: i0.ɵɵInjectableDeclaration<SfDocumentsService>;
|