sf-documents 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/sf-documents.mjs +402 -95
- package/fesm2022/sf-documents.mjs.map +1 -1
- package/lib/components/folder-files/folder-files.component.d.ts +55 -0
- package/lib/gateways/document.port.d.ts +3 -0
- package/lib/models/navigation-state.model.d.ts +4 -0
- package/lib/sf-documents.component.d.ts +25 -13
- package/package.json +7 -1
- package/public-api.d.ts +2 -0
|
@@ -1,31 +1,38 @@
|
|
|
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';
|
|
4
|
-
import * as i3 from 'primeng/api';
|
|
3
|
+
import { BehaviorSubject, Subject, of } from 'rxjs';
|
|
4
|
+
import * as i3$1 from 'primeng/api';
|
|
5
5
|
import { ConfirmationService } from 'primeng/api';
|
|
6
|
-
import * as i2$
|
|
6
|
+
import * as i2$2 from 'primeng/dynamicdialog';
|
|
7
7
|
import { DialogService } from 'primeng/dynamicdialog';
|
|
8
8
|
import { ToastModule } from 'primeng/toast';
|
|
9
9
|
import * as _ from 'lodash';
|
|
10
10
|
import * as i1$1 from 'primeng/button';
|
|
11
11
|
import { ButtonModule } from 'primeng/button';
|
|
12
|
-
import * as i6 from 'primeng/confirmdialog';
|
|
12
|
+
import * as i6$1 from 'primeng/confirmdialog';
|
|
13
13
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i4 from 'primeng/panel';
|
|
15
15
|
import { PanelModule } from 'primeng/panel';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i6 from 'primeng/checkbox';
|
|
17
17
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
18
18
|
import * as i2 from 'primeng/dialog';
|
|
19
19
|
import { DialogModule } from 'primeng/dialog';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i2$1 from '@angular/common';
|
|
21
21
|
import { CommonModule } from '@angular/common';
|
|
22
|
-
import * as
|
|
22
|
+
import * as i3 from '@angular/forms';
|
|
23
23
|
import { FormsModule } from '@angular/forms';
|
|
24
24
|
import * as i1 from '@angular/platform-browser';
|
|
25
|
-
import * as
|
|
25
|
+
import * as i7 from 'primeng/inputtext';
|
|
26
26
|
import { InputTextModule } from 'primeng/inputtext';
|
|
27
27
|
import { InputIcon } from 'primeng/inputicon';
|
|
28
28
|
import { IconField } from 'primeng/iconfield';
|
|
29
|
+
import * as i8 from 'primeng/paginator';
|
|
30
|
+
import { PaginatorModule } from 'primeng/paginator';
|
|
31
|
+
import { debounceTime, distinctUntilChanged, takeUntil, tap, switchMap, finalize } from 'rxjs/operators';
|
|
32
|
+
import * as i13 from 'primeng/dropdown';
|
|
33
|
+
import { DropdownModule } from 'primeng/dropdown';
|
|
34
|
+
import * as i14 from 'primeng/datepicker';
|
|
35
|
+
import { DatePickerModule } from 'primeng/datepicker';
|
|
29
36
|
|
|
30
37
|
class SfDocumentsService {
|
|
31
38
|
_loading = new BehaviorSubject(false);
|
|
@@ -105,6 +112,193 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
105
112
|
args: ['fileInput', { static: true }]
|
|
106
113
|
}] } });
|
|
107
114
|
|
|
115
|
+
class FolderFilesComponent {
|
|
116
|
+
documentService;
|
|
117
|
+
documentsService = inject(DOCUMENT_SERVICE);
|
|
118
|
+
searchSubject = new Subject();
|
|
119
|
+
destroy$ = new Subject();
|
|
120
|
+
carpeta;
|
|
121
|
+
isMobile = false;
|
|
122
|
+
idKatios;
|
|
123
|
+
server = '';
|
|
124
|
+
subestado = '';
|
|
125
|
+
requestData;
|
|
126
|
+
useBreadcrumb = false;
|
|
127
|
+
onFileChange = new EventEmitter();
|
|
128
|
+
onCargarArchivo = new EventEmitter();
|
|
129
|
+
onEliminarMasivo = new EventEmitter();
|
|
130
|
+
onOpenVisorDoc = new EventEmitter();
|
|
131
|
+
onOpenNewWindow = new EventEmitter();
|
|
132
|
+
onBack = new EventEmitter();
|
|
133
|
+
usesApi = false;
|
|
134
|
+
items = [];
|
|
135
|
+
page = 1;
|
|
136
|
+
pageSize = 10;
|
|
137
|
+
totalRecords = 0;
|
|
138
|
+
totalPages = 0;
|
|
139
|
+
searchQuery = '';
|
|
140
|
+
docsEliminables = [];
|
|
141
|
+
totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
142
|
+
loading = false;
|
|
143
|
+
constructor(documentService) {
|
|
144
|
+
this.documentService = documentService;
|
|
145
|
+
this.searchSubject.pipe(debounceTime(400), distinctUntilChanged(), takeUntil(this.destroy$)).subscribe(() => {
|
|
146
|
+
this.page = 1;
|
|
147
|
+
this.loadFiles();
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
ngOnDestroy() {
|
|
151
|
+
this.destroy$.next();
|
|
152
|
+
this.destroy$.complete();
|
|
153
|
+
}
|
|
154
|
+
ngOnChanges(changes) {
|
|
155
|
+
if (changes['carpeta'] && this.carpeta) {
|
|
156
|
+
this.init();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
init() {
|
|
160
|
+
this.docsEliminables = [];
|
|
161
|
+
this.totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
162
|
+
this.searchQuery = '';
|
|
163
|
+
this.page = 1;
|
|
164
|
+
this.applyPermissions();
|
|
165
|
+
if (this.carpeta.children && this.carpeta.children.length > 0) {
|
|
166
|
+
// Modo children pre-cargados
|
|
167
|
+
this.usesApi = false;
|
|
168
|
+
this.items = this.carpeta.children;
|
|
169
|
+
this.items.forEach((item) => (item.delete = false));
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
// Modo API paginada
|
|
173
|
+
this.usesApi = true;
|
|
174
|
+
this.items = [];
|
|
175
|
+
this.loadFiles();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
applyPermissions() {
|
|
179
|
+
if (this.carpeta?.reglas && typeof this.carpeta.reglas === 'string') {
|
|
180
|
+
this.carpeta.reglas = JSON.parse(this.carpeta.reglas);
|
|
181
|
+
}
|
|
182
|
+
if (!this.carpeta?.reglas?.permisos?.subestados && this.carpeta?.reglas?.permisos) {
|
|
183
|
+
this.carpeta.reglas.permisos.cargarFront = this.carpeta.reglas.permisos.cargar;
|
|
184
|
+
this.carpeta.reglas.permisos.borrarFront = this.carpeta.reglas.permisos.borrar;
|
|
185
|
+
}
|
|
186
|
+
else if (this.carpeta?.reglas?.permisos?.subestados && this.subestado?.trim()) {
|
|
187
|
+
const sub = this.subestado.toLowerCase().trim();
|
|
188
|
+
this.carpeta.reglas.permisos.cargarFront = Array.isArray(this.carpeta.reglas.permisos.subestados.cargar)
|
|
189
|
+
? this.carpeta.reglas.permisos.subestados.cargar.map((c) => c.toLowerCase().trim()).includes(sub)
|
|
190
|
+
: this.carpeta.reglas.permisos.cargar;
|
|
191
|
+
this.carpeta.reglas.permisos.borrarFront = Array.isArray(this.carpeta.reglas.permisos.subestados.borrar)
|
|
192
|
+
? this.carpeta.reglas.permisos.subestados.borrar.map((b) => b.toLowerCase().trim()).includes(sub)
|
|
193
|
+
: this.carpeta.reglas.permisos.borrar;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
loadFiles() {
|
|
197
|
+
this.loading = true;
|
|
198
|
+
this.documentsService.getFilesByFolder(this.idKatios, this.carpeta.NMCo, this.requestData, this.page, this.pageSize, this.searchQuery).subscribe({
|
|
199
|
+
next: (response) => {
|
|
200
|
+
const res = response?.data ?? response;
|
|
201
|
+
this.totalRecords = res.total ?? 0;
|
|
202
|
+
this.page = res.page ?? 1;
|
|
203
|
+
this.totalPages = res.totalPages ?? 0;
|
|
204
|
+
this.items = res.items ?? [];
|
|
205
|
+
this.items.forEach((item) => (item.delete = false));
|
|
206
|
+
this.buildPaths(this.items);
|
|
207
|
+
this.loading = false;
|
|
208
|
+
},
|
|
209
|
+
error: (error) => {
|
|
210
|
+
console.error('Error loading files by folder:', error);
|
|
211
|
+
this.loading = false;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
onPageChange(event) {
|
|
216
|
+
this.page = (event.page ?? 0) + 1;
|
|
217
|
+
this.pageSize = event.rows ?? this.pageSize;
|
|
218
|
+
this.loadFiles();
|
|
219
|
+
}
|
|
220
|
+
onSearchInput() {
|
|
221
|
+
this.searchSubject.next(this.searchQuery);
|
|
222
|
+
}
|
|
223
|
+
/** Construye la ruta completa de cada archivo usando el server */
|
|
224
|
+
buildPaths(items) {
|
|
225
|
+
if (!this.server)
|
|
226
|
+
return;
|
|
227
|
+
items.forEach((item) => {
|
|
228
|
+
if (item.Path && !item.Path.startsWith('http')) {
|
|
229
|
+
let path = 'Imagenes/' + item.Path + item.label;
|
|
230
|
+
path = path.replace(/\\/g, '/');
|
|
231
|
+
item.Path = this.server + path;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
fileChange(data) {
|
|
236
|
+
this.onFileChange.emit(data);
|
|
237
|
+
}
|
|
238
|
+
cargarArchivo() {
|
|
239
|
+
this.onCargarArchivo.emit(this.carpeta);
|
|
240
|
+
}
|
|
241
|
+
openVisorDoc(item) {
|
|
242
|
+
this.onOpenVisorDoc.emit(item);
|
|
243
|
+
}
|
|
244
|
+
openNewWindow(item) {
|
|
245
|
+
this.onOpenNewWindow.emit(item);
|
|
246
|
+
}
|
|
247
|
+
goBack() {
|
|
248
|
+
this.onBack.emit();
|
|
249
|
+
}
|
|
250
|
+
onClickedCheckDelete(event, document) {
|
|
251
|
+
if (event.checked)
|
|
252
|
+
this.docsEliminables.push(document);
|
|
253
|
+
else
|
|
254
|
+
this.docsEliminables = this.docsEliminables.filter(doc => doc !== document);
|
|
255
|
+
}
|
|
256
|
+
emitEliminarMasivo() {
|
|
257
|
+
this.onEliminarMasivo.emit(this.docsEliminables);
|
|
258
|
+
}
|
|
259
|
+
refresh() {
|
|
260
|
+
if (this.usesApi) {
|
|
261
|
+
this.loadFiles();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderFilesComponent, deps: [{ token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
265
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderFilesComponent, isStandalone: true, selector: "lib-folder-files", inputs: { carpeta: "carpeta", isMobile: "isMobile", idKatios: "idKatios", server: "server", subestado: "subestado", requestData: "requestData", useBreadcrumb: "useBreadcrumb" }, outputs: { onFileChange: "onFileChange", onCargarArchivo: "onCargarArchivo", onEliminarMasivo: "onEliminarMasivo", onOpenVisorDoc: "onOpenVisorDoc", onOpenNewWindow: "onOpenNewWindow", onBack: "onBack" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ff-layout\">\r\n <!-- Header fijo -->\r\n <div class=\"ff-header\">\r\n <div class=\"ff-back-row\" *ngIf=\"!useBreadcrumb\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goBack()\"></button>\r\n </div>\r\n\r\n <!-- Barra de b\u00FAsqueda (solo modo API) -->\r\n <div *ngIf=\"usesApi\" class=\"files-toolbar\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Buscar archivos\"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n </div>\r\n </div>\r\n\r\n <!-- Panel con archivos scrollable -->\r\n <div class=\"ff-panel-wrapper\">\r\n <p-panel [header]=\"carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\">\r\n\r\n <!-- Loading -->\r\n <div *ngIf=\"loading\" style=\"text-align: center; padding: 20px;\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n </div>\r\n\r\n <!-- Lista de archivos -->\r\n <ul class=\"contacts\" *ngIf=\"!loading\">\r\n <li *ngFor=\"let item of items\">\r\n <p-checkbox *ngIf=\"carpeta?.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=\"carpeta.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpeta.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=\"carpeta.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\r\n <!-- Sin resultados -->\r\n <div *ngIf=\"!loading && items.length === 0\" style=\"text-align: center; padding: 20px; color: #999;\">\r\n Sin documentos cargados\r\n </div>\r\n </p-panel>\r\n </div>\r\n\r\n <!-- Footer fijo -->\r\n <div class=\"ff-footer\">\r\n <!-- Paginador (solo modo API) -->\r\n <p-paginator *ngIf=\"usesApi && totalRecords > 0\"\r\n [rows]=\"pageSize\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[10, 20, 50]\"\r\n (onPageChange)=\"onPageChange($event)\">\r\n </p-paginator>\r\n\r\n <!-- Botones de acci\u00F3n -->\r\n <div class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\">\r\n </lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\" (click)=\"emitEliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-header{flex-shrink:0}.ff-back-row{display:flex;margin-block:15px}.ff-panel-wrapper{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}:host ::ng-deep .ff-panel-wrapper>p-panel{flex:1;min-height:0;display:flex;flex-direction:column}:host ::ng-deep .ff-panel-wrapper>p-panel>.p-panel{flex:1;min-height:0;display:flex;flex-direction:column}:host ::ng-deep .ff-panel-wrapper>p-panel .p-panel-header{flex-shrink:0}:host ::ng-deep .ff-panel-wrapper>p-panel .p-toggleable-content,:host ::ng-deep .ff-panel-wrapper>p-panel .p-panel-content-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}:host ::ng-deep .ff-panel-wrapper>p-panel .p-panel-content{flex:1;min-height:0;overflow-y:auto}.ff-footer{flex-shrink:0;border-top:1px solid var(--surface-border, #e3e3e3)}.files-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:14px}.files-toolbar p-iconfield{flex:1}.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;border-radius:2px;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}.files-toolbar{flex-direction:column;align-items:stretch}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PanelModule }, { kind: "component", type: i4.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { 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: CheckboxModule }, { kind: "component", type: i6.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: InputTextModule }, { kind: "directive", type: i7.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: "ngmodule", type: PaginatorModule }, { kind: "component", type: i8.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "component", type: UploadDialogComponent, selector: "lib-upload-dialog", inputs: ["selectedDocument"], outputs: ["onUploaded", "loadFile"] }] });
|
|
266
|
+
}
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderFilesComponent, decorators: [{
|
|
268
|
+
type: Component,
|
|
269
|
+
args: [{ selector: 'lib-folder-files', imports: [
|
|
270
|
+
CommonModule, FormsModule, PanelModule, ButtonModule,
|
|
271
|
+
CheckboxModule, InputTextModule, InputIcon, IconField,
|
|
272
|
+
PaginatorModule, SafePipe, UploadDialogComponent
|
|
273
|
+
], standalone: true, template: "<div class=\"ff-layout\">\r\n <!-- Header fijo -->\r\n <div class=\"ff-header\">\r\n <div class=\"ff-back-row\" *ngIf=\"!useBreadcrumb\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goBack()\"></button>\r\n </div>\r\n\r\n <!-- Barra de b\u00FAsqueda (solo modo API) -->\r\n <div *ngIf=\"usesApi\" class=\"files-toolbar\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Buscar archivos\"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n </div>\r\n </div>\r\n\r\n <!-- Panel con archivos scrollable -->\r\n <div class=\"ff-panel-wrapper\">\r\n <p-panel [header]=\"carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\">\r\n\r\n <!-- Loading -->\r\n <div *ngIf=\"loading\" style=\"text-align: center; padding: 20px;\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n </div>\r\n\r\n <!-- Lista de archivos -->\r\n <ul class=\"contacts\" *ngIf=\"!loading\">\r\n <li *ngFor=\"let item of items\">\r\n <p-checkbox *ngIf=\"carpeta?.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=\"carpeta.TipoArchivo == '2'\" class=\"frameDoc\" scrolling=\"no\"\r\n [src]=\"item.Path | safe\" style=\"width:75px; height:90px;\">\r\n <img *ngIf=\"carpeta.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=\"carpeta.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\r\n <!-- Sin resultados -->\r\n <div *ngIf=\"!loading && items.length === 0\" style=\"text-align: center; padding: 20px; color: #999;\">\r\n Sin documentos cargados\r\n </div>\r\n </p-panel>\r\n </div>\r\n\r\n <!-- Footer fijo -->\r\n <div class=\"ff-footer\">\r\n <!-- Paginador (solo modo API) -->\r\n <p-paginator *ngIf=\"usesApi && totalRecords > 0\"\r\n [rows]=\"pageSize\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[10, 20, 50]\"\r\n (onPageChange)=\"onPageChange($event)\">\r\n </p-paginator>\r\n\r\n <!-- Botones de acci\u00F3n -->\r\n <div class=\"buttons\">\r\n <lib-upload-dialog *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\">\r\n </lib-upload-dialog>\r\n <button pButton type=\"button\" label=\"Eliminar\" icon=\"pi pi-trash\"\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\" (click)=\"emitEliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"></button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-header{flex-shrink:0}.ff-back-row{display:flex;margin-block:15px}.ff-panel-wrapper{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}:host ::ng-deep .ff-panel-wrapper>p-panel{flex:1;min-height:0;display:flex;flex-direction:column}:host ::ng-deep .ff-panel-wrapper>p-panel>.p-panel{flex:1;min-height:0;display:flex;flex-direction:column}:host ::ng-deep .ff-panel-wrapper>p-panel .p-panel-header{flex-shrink:0}:host ::ng-deep .ff-panel-wrapper>p-panel .p-toggleable-content,:host ::ng-deep .ff-panel-wrapper>p-panel .p-panel-content-container{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}:host ::ng-deep .ff-panel-wrapper>p-panel .p-panel-content{flex:1;min-height:0;overflow-y:auto}.ff-footer{flex-shrink:0;border-top:1px solid var(--surface-border, #e3e3e3)}.files-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:14px}.files-toolbar p-iconfield{flex:1}.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;border-radius:2px;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}.files-toolbar{flex-direction:column;align-items:stretch}}\n"] }]
|
|
274
|
+
}], ctorParameters: () => [{ type: SfDocumentsService }], propDecorators: { carpeta: [{
|
|
275
|
+
type: Input
|
|
276
|
+
}], isMobile: [{
|
|
277
|
+
type: Input
|
|
278
|
+
}], idKatios: [{
|
|
279
|
+
type: Input
|
|
280
|
+
}], server: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}], subestado: [{
|
|
283
|
+
type: Input
|
|
284
|
+
}], requestData: [{
|
|
285
|
+
type: Input
|
|
286
|
+
}], useBreadcrumb: [{
|
|
287
|
+
type: Input
|
|
288
|
+
}], onFileChange: [{
|
|
289
|
+
type: Output
|
|
290
|
+
}], onCargarArchivo: [{
|
|
291
|
+
type: Output
|
|
292
|
+
}], onEliminarMasivo: [{
|
|
293
|
+
type: Output
|
|
294
|
+
}], onOpenVisorDoc: [{
|
|
295
|
+
type: Output
|
|
296
|
+
}], onOpenNewWindow: [{
|
|
297
|
+
type: Output
|
|
298
|
+
}], onBack: [{
|
|
299
|
+
type: Output
|
|
300
|
+
}] } });
|
|
301
|
+
|
|
108
302
|
class SfDocumentsComponent {
|
|
109
303
|
sanitizer;
|
|
110
304
|
dialog;
|
|
@@ -132,6 +326,8 @@ class SfDocumentsComponent {
|
|
|
132
326
|
botones = true;
|
|
133
327
|
aplFiltro = false;
|
|
134
328
|
nmco = [];
|
|
329
|
+
useBreadcrumb = false;
|
|
330
|
+
onNavigationChange = new EventEmitter();
|
|
135
331
|
server = "";
|
|
136
332
|
valorFiltro = "";
|
|
137
333
|
tab = 1;
|
|
@@ -143,7 +339,6 @@ class SfDocumentsComponent {
|
|
|
143
339
|
modalReference;
|
|
144
340
|
modalReference2;
|
|
145
341
|
documentoSeleccionado;
|
|
146
|
-
docsEliminables = [];
|
|
147
342
|
totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
148
343
|
file;
|
|
149
344
|
urlDoc;
|
|
@@ -156,6 +351,15 @@ class SfDocumentsComponent {
|
|
|
156
351
|
UsuarioNdoc;
|
|
157
352
|
UsuarioTdoc;
|
|
158
353
|
idKatios;
|
|
354
|
+
displayGenerate = false;
|
|
355
|
+
canGenerate = true;
|
|
356
|
+
documentTypes = [];
|
|
357
|
+
documentsToGenerate = [];
|
|
358
|
+
documentsToGenerateMap = {};
|
|
359
|
+
dynamicParams = [];
|
|
360
|
+
dynamicValues = {};
|
|
361
|
+
selectedDocType = null;
|
|
362
|
+
selectedRange = null;
|
|
159
363
|
constructor(sanitizer, dialog, snackBar, appRef, confirmationService, documentService) {
|
|
160
364
|
this.sanitizer = sanitizer;
|
|
161
365
|
this.dialog = dialog;
|
|
@@ -164,7 +368,40 @@ class SfDocumentsComponent {
|
|
|
164
368
|
this.confirmationService = confirmationService;
|
|
165
369
|
this.documentService = documentService;
|
|
166
370
|
}
|
|
167
|
-
ngOnInit() {
|
|
371
|
+
// ngOnInit() {
|
|
372
|
+
// if (this.oSession != null && this.oSession.UsuarioSistema.TDOC !== undefined && this.oSession.UsuarioSistema.NDOC !== undefined) {
|
|
373
|
+
// this.idKatios = this.oSession.UsuarioSistema.IDKATIOS.trim();
|
|
374
|
+
// this.perfilDocumentos = this.oSession.UsuarioSistema.PERDOCUMENTOS.trim();
|
|
375
|
+
// }
|
|
376
|
+
// if (this.tipo && this.perfilDocumentos) {
|
|
377
|
+
// this.cargarParametros(this.tipo)
|
|
378
|
+
// }
|
|
379
|
+
// }
|
|
380
|
+
ngOnChanges(changes) {
|
|
381
|
+
this.files = [];
|
|
382
|
+
this.filesFilter = [];
|
|
383
|
+
this.imagePathInput = null;
|
|
384
|
+
this.modalReference = undefined;
|
|
385
|
+
this.modalReference2 = undefined;
|
|
386
|
+
this.carpetaSeleccionada = null;
|
|
387
|
+
this.documentoSeleccionado = null;
|
|
388
|
+
this.totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
389
|
+
this.file = null;
|
|
390
|
+
this.urlDoc = null;
|
|
391
|
+
this.pdfUrl = null;
|
|
392
|
+
this.current_path = "";
|
|
393
|
+
this.current_label = "";
|
|
394
|
+
this.scanFileList = new Array();
|
|
395
|
+
this.displayPDF = false;
|
|
396
|
+
this.displayGenerate = false;
|
|
397
|
+
this.canGenerate = true;
|
|
398
|
+
this.documentTypes = [];
|
|
399
|
+
this.documentsToGenerate = [];
|
|
400
|
+
this.documentsToGenerateMap = {};
|
|
401
|
+
this.dynamicParams = [];
|
|
402
|
+
this.dynamicValues = {};
|
|
403
|
+
this.selectedDocType = null;
|
|
404
|
+
this.selectedRange = null;
|
|
168
405
|
if (this.oSession != null && this.oSession.UsuarioSistema.TDOC !== undefined && this.oSession.UsuarioSistema.NDOC !== undefined) {
|
|
169
406
|
this.idKatios = this.oSession.UsuarioSistema.IDKATIOS.trim();
|
|
170
407
|
this.perfilDocumentos = this.oSession.UsuarioSistema.PERDOCUMENTOS.trim();
|
|
@@ -174,25 +411,43 @@ class SfDocumentsComponent {
|
|
|
174
411
|
}
|
|
175
412
|
}
|
|
176
413
|
cargarParametros(tipo) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
414
|
+
if (tipo !== '1')
|
|
415
|
+
return;
|
|
416
|
+
this.documentService.loading = true;
|
|
417
|
+
const data = {
|
|
418
|
+
action: this.accion,
|
|
419
|
+
entity: this.entidad,
|
|
420
|
+
tdoc: this.tdoc,
|
|
421
|
+
ndoc: this.ndoc,
|
|
422
|
+
request: this.Solicitud,
|
|
423
|
+
documentProfile: this.perfilDocumentos,
|
|
424
|
+
product: this.Producto
|
|
425
|
+
};
|
|
426
|
+
this.documentsService.getFolders(this.idKatios, data).pipe(tap((response) => {
|
|
427
|
+
let res = response.data;
|
|
428
|
+
if (response.data.RESPUESTA)
|
|
429
|
+
res = response.data.RESPUESTA;
|
|
430
|
+
this.okCargoArbol(res);
|
|
431
|
+
}), switchMap(() => this.Solicitud ? this.documentsService.getDocumentsToGenerate(this.idKatios, this.Solicitud) : of(null)), tap((resp) => {
|
|
432
|
+
const list = resp?.data ?? []; // según tu JSON real
|
|
433
|
+
this.documentsToGenerate = list;
|
|
434
|
+
this.documentsToGenerateMap = {};
|
|
435
|
+
list.forEach((d) => (this.documentsToGenerateMap[d.idDoc] = d));
|
|
436
|
+
// dropdown: usa idDoc pero mantén objeto completo en map
|
|
437
|
+
this.documentTypes = list.map((d) => ({
|
|
438
|
+
label: d.description,
|
|
439
|
+
code: d.idDoc
|
|
440
|
+
}));
|
|
441
|
+
}), finalize(() => {
|
|
442
|
+
this.documentService.loading = false;
|
|
443
|
+
})).subscribe({
|
|
444
|
+
error: (error) => {
|
|
445
|
+
this.errorCargarArbol(error);
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
this.tab = 1;
|
|
449
|
+
this.documentoSeleccionado = null;
|
|
450
|
+
this.emitNavigationState();
|
|
196
451
|
}
|
|
197
452
|
expandAll() {
|
|
198
453
|
this.files.forEach((node) => {
|
|
@@ -217,7 +472,10 @@ class SfDocumentsComponent {
|
|
|
217
472
|
}
|
|
218
473
|
}
|
|
219
474
|
okCargoArbol = (iArbol) => {
|
|
220
|
-
if (iArbol.CARPETA.length === undefined) {
|
|
475
|
+
if (!iArbol.CARPETA && iArbol.length === undefined) {
|
|
476
|
+
iArbol = new Array(iArbol);
|
|
477
|
+
}
|
|
478
|
+
else if (iArbol.CARPETA.length === undefined) {
|
|
221
479
|
iArbol = new Array(iArbol.CARPETA);
|
|
222
480
|
}
|
|
223
481
|
iArbol.forEach((element) => {
|
|
@@ -235,15 +493,13 @@ class SfDocumentsComponent {
|
|
|
235
493
|
this.message("error", "Error al traer la información", iError.message);
|
|
236
494
|
this.documentService.loading = false;
|
|
237
495
|
};
|
|
238
|
-
onClickedCheckDelete($event, document) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
funcOkDelDocumentMasivo = () => {
|
|
496
|
+
// onClickedCheckDelete($event: any, document: any) {
|
|
497
|
+
// if ($event.checked) this.docsEliminables.push(document);
|
|
498
|
+
// else this.docsEliminables = this.docsEliminables.filter(doc => doc !== document);
|
|
499
|
+
// }
|
|
500
|
+
funcOkDelDocumentMasivo = (docsEliminables) => {
|
|
245
501
|
this.totalDocsEliminadosApi.existoso += 1;
|
|
246
|
-
if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido ===
|
|
502
|
+
if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === docsEliminables.length) {
|
|
247
503
|
this.cargarParametros(this.tipo);
|
|
248
504
|
if (this.totalDocsEliminadosApi.fallido > 0)
|
|
249
505
|
this.message("warn", "", "Algunos documentos no pudieron ser eliminados");
|
|
@@ -251,30 +507,30 @@ class SfDocumentsComponent {
|
|
|
251
507
|
this.message("success", "", "Documentos eliminados satisfactoriamente");
|
|
252
508
|
}
|
|
253
509
|
};
|
|
254
|
-
funcErrDelDocumentMasivo = () => {
|
|
510
|
+
funcErrDelDocumentMasivo = (docsEliminables) => {
|
|
255
511
|
this.totalDocsEliminadosApi.fallido += 1;
|
|
256
|
-
if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido ===
|
|
512
|
+
if (this.totalDocsEliminadosApi.existoso + this.totalDocsEliminadosApi.fallido === docsEliminables.length) {
|
|
257
513
|
this.cargarParametros(this.tipo);
|
|
258
514
|
this.message("warn", "", "Algunos documentos no pudieron ser eliminados");
|
|
259
515
|
}
|
|
260
516
|
};
|
|
261
|
-
eliminarMasivo() {
|
|
517
|
+
eliminarMasivo(docsEliminables) {
|
|
262
518
|
this.confirmationService.confirm({
|
|
263
|
-
message: `¿Desea eliminar los ${
|
|
519
|
+
message: `¿Desea eliminar los ${docsEliminables.length} documentos seleccionados?`,
|
|
264
520
|
acceptLabel: 'Si',
|
|
265
521
|
rejectLabel: 'No',
|
|
266
522
|
accept: () => {
|
|
267
523
|
this.documentService.loading = true;
|
|
268
524
|
this.totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
269
|
-
|
|
525
|
+
docsEliminables.forEach(doc => {
|
|
270
526
|
let data = { "code": doc.codigo, "status": "DES" };
|
|
271
527
|
this.documentsService.updateStatus(this.idKatios, data).subscribe({
|
|
272
528
|
next: (response) => {
|
|
273
|
-
this.funcOkDelDocumentMasivo();
|
|
529
|
+
this.funcOkDelDocumentMasivo(docsEliminables);
|
|
274
530
|
},
|
|
275
531
|
error: (error) => {
|
|
276
532
|
this.documentService.loading = false;
|
|
277
|
-
this.funcErrDelDocumentMasivo();
|
|
533
|
+
this.funcErrDelDocumentMasivo(docsEliminables);
|
|
278
534
|
}
|
|
279
535
|
});
|
|
280
536
|
});
|
|
@@ -513,55 +769,36 @@ class SfDocumentsComponent {
|
|
|
513
769
|
gotoBottom() {
|
|
514
770
|
window.scrollBy(0, this.panel.nativeElement.scrollHeight);
|
|
515
771
|
}
|
|
772
|
+
get requestData() {
|
|
773
|
+
return {
|
|
774
|
+
action: this.accion,
|
|
775
|
+
entity: this.entidad,
|
|
776
|
+
tdoc: this.tdoc,
|
|
777
|
+
ndoc: this.ndoc,
|
|
778
|
+
request: this.Solicitud,
|
|
779
|
+
documentProfile: this.perfilDocumentos,
|
|
780
|
+
product: this.Producto
|
|
781
|
+
};
|
|
782
|
+
}
|
|
516
783
|
VerDetalleTab(items) {
|
|
517
|
-
if (items?.reglas && typeof (items.reglas) == 'string')
|
|
518
|
-
items.reglas = JSON.parse(items.reglas);
|
|
519
|
-
if (!items?.reglas?.permisos?.subestados && items?.reglas?.permisos) {
|
|
520
|
-
items.reglas.permisos.cargarFront = items.reglas.permisos.cargar;
|
|
521
|
-
items.reglas.permisos.borrarFront = items.reglas.permisos.borrar;
|
|
522
|
-
}
|
|
523
|
-
else if (items?.reglas?.permisos?.subestados && !this.isEmptyString(this.subestado)) {
|
|
524
|
-
items.reglas.permisos.cargarFront = Array.isArray(items.reglas.permisos.subestados.cargar) ? items.reglas.permisos.subestados.cargar.map((c) => c.toLowerCase().trim()).includes(this.subestado.toLowerCase().trim()) : items.reglas.permisos.cargar;
|
|
525
|
-
items.reglas.permisos.borrarFront = Array.isArray(items.reglas.permisos.subestados.borrar) ? items.reglas.permisos.subestados.borrar.map((b) => b.toLowerCase().trim()).includes(this.subestado.toLowerCase().trim()) : items.reglas.permisos.borrar;
|
|
526
|
-
}
|
|
527
784
|
this.carpetaSeleccionada = items;
|
|
528
|
-
this.docsEliminables = [];
|
|
529
785
|
this.totalDocsEliminadosApi = { existoso: 0, fallido: 0 };
|
|
530
|
-
this.carpetaSeleccionada.children.forEach((element) => element.delete = false);
|
|
531
786
|
this.tab = 2;
|
|
787
|
+
this.emitNavigationState();
|
|
532
788
|
}
|
|
533
|
-
isEmptyString(str) {
|
|
534
|
-
return str === undefined || str === null || str.trim() === '';
|
|
535
|
-
}
|
|
536
|
-
eliminarDocumento(docEliminar, e, funcOkDelDocument = this.ok_eliminarDocumento, funcErrDelDocument = this.err_eliminarDocumento) {
|
|
537
|
-
e.stopPropagation();
|
|
538
|
-
this.confirmationService.confirm({
|
|
539
|
-
message: `¿Desea eliminar el documento?`,
|
|
540
|
-
accept: () => {
|
|
541
|
-
let data = { "code": docEliminar.codigo, "status": "DES" };
|
|
542
|
-
this.documentsService.updateStatus(this.idKatios, data).subscribe({
|
|
543
|
-
next: (response) => {
|
|
544
|
-
funcOkDelDocument();
|
|
545
|
-
},
|
|
546
|
-
error: (error) => {
|
|
547
|
-
this.documentService.loading = false;
|
|
548
|
-
funcErrDelDocument(error);
|
|
549
|
-
}
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
ok_eliminarDocumento = () => {
|
|
555
|
-
this.message("success", "", "Documento eliminado satisfactoriamente");
|
|
556
|
-
if (this.tipo !== undefined) {
|
|
557
|
-
this.cargarParametros(this.tipo);
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
err_eliminarDocumento = (err) => {
|
|
561
|
-
this.message("error", "No se pudo eliminar el documento", err.message);
|
|
562
|
-
};
|
|
563
789
|
goToTab(tab) {
|
|
564
790
|
this.tab = tab;
|
|
791
|
+
this.emitNavigationState();
|
|
792
|
+
}
|
|
793
|
+
emitNavigationState() {
|
|
794
|
+
if (!this.useBreadcrumb)
|
|
795
|
+
return;
|
|
796
|
+
const state = { tab: this.tab };
|
|
797
|
+
if (this.tab === 2 && this.carpetaSeleccionada) {
|
|
798
|
+
state.folderLabel = (this.carpetaSeleccionada.label || '')
|
|
799
|
+
.replace('#toolbar=0&navpanes=0&statusbar=0', '');
|
|
800
|
+
}
|
|
801
|
+
this.onNavigationChange.emit(state);
|
|
565
802
|
}
|
|
566
803
|
next(iValor) {
|
|
567
804
|
if (iValor < 0) {
|
|
@@ -609,15 +846,81 @@ class SfDocumentsComponent {
|
|
|
609
846
|
this.modalReference2.close();
|
|
610
847
|
}
|
|
611
848
|
}
|
|
612
|
-
|
|
613
|
-
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 <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\r\n\r\n", 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: 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"] }] });
|
|
849
|
+
openGenerateDialog() {
|
|
850
|
+
this.selectedDocType = null;
|
|
851
|
+
this.selectedRange = null;
|
|
852
|
+
this.displayGenerate = true;
|
|
853
|
+
}
|
|
854
|
+
generateDocument() {
|
|
855
|
+
if (!this.selectedDocType)
|
|
856
|
+
return;
|
|
857
|
+
// Validación mínima: si hay params, exigir que no estén vacíos
|
|
858
|
+
for (const p of this.dynamicParams || []) {
|
|
859
|
+
const key = p.name;
|
|
860
|
+
const v = this.dynamicValues?.[key];
|
|
861
|
+
if (v === null || v === undefined || v === '') {
|
|
862
|
+
this.message('warn', '', `Falta el parámetro ${p.description}`);
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
// construir params
|
|
867
|
+
const paramsToSend = {};
|
|
868
|
+
for (const p of this.dynamicParams || []) {
|
|
869
|
+
const key = p.name;
|
|
870
|
+
const raw = this.dynamicValues?.[key];
|
|
871
|
+
paramsToSend[p.name] =
|
|
872
|
+
(p.type || '').toLowerCase() === 'date'
|
|
873
|
+
? this.toYYYYMMDD(raw)
|
|
874
|
+
: raw;
|
|
875
|
+
}
|
|
876
|
+
this.enProceso = true;
|
|
877
|
+
const payload = {
|
|
878
|
+
params: paramsToSend
|
|
879
|
+
};
|
|
880
|
+
this.documentsService.generateDocument(this.idKatios, this.selectedDocType, this.Solicitud, payload).subscribe({
|
|
881
|
+
next: () => {
|
|
882
|
+
this.displayGenerate = false;
|
|
883
|
+
this.message('success', '', 'Documento en generación');
|
|
884
|
+
this.cargarParametros(this.tipo);
|
|
885
|
+
this.enProceso = false;
|
|
886
|
+
},
|
|
887
|
+
error: (err) => {
|
|
888
|
+
this.message('error', 'No se pudo generar el documento', err?.message || err);
|
|
889
|
+
this.enProceso = false;
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
toYYYYMMDD(value) {
|
|
894
|
+
if (!value)
|
|
895
|
+
return null;
|
|
896
|
+
const d = value instanceof Date ? value : new Date(value);
|
|
897
|
+
if (isNaN(d.getTime()))
|
|
898
|
+
return null;
|
|
899
|
+
// ISO: 2025-12-19T05:00:00.000Z -> 2025-12-19
|
|
900
|
+
return d.toISOString().slice(0, 10);
|
|
901
|
+
}
|
|
902
|
+
onDocTypeChange() {
|
|
903
|
+
const doc = this.selectedDocType ? this.documentsToGenerateMap[this.selectedDocType] : null;
|
|
904
|
+
this.dynamicParams = doc?.params ?? [];
|
|
905
|
+
this.dynamicValues = {}; // reset valores
|
|
906
|
+
// valores default opcionales
|
|
907
|
+
for (const p of this.dynamicParams) {
|
|
908
|
+
const key = p.name;
|
|
909
|
+
this.dynamicValues[key] = null;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, deps: [{ token: i1.DomSanitizer }, { token: i2$2.DialogService }, { token: i3$1.MessageService }, { token: i0.ApplicationRef }, { token: i3$1.ConfirmationService }, { token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
913
|
+
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", useBreadcrumb: "useBreadcrumb", server: "server", idKatios: "idKatios" }, outputs: { nextTabPapa: "nextTabPapa", onNavigationChange: "onNavigationChange" }, providers: [DialogService, ConfirmationService], viewQueries: [{ propertyName: "panel", first: true, predicate: ["pdf"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div class=\"sf-doc-layout\">\r\n <div class=\"sf-doc-fixed\">\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)\" >\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 </div>\r\n <p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n <div class=\"sf-doc-scrollable\" *ngIf=\"tab==1\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\">\r\n <p-panel header=\"{{carpeta.label}}\">\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 || item.total > 0) ? 'green':'red' }\"></i>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"(!item.children || item.children.length === 0) && item.fileCount\">Documentos cargados:\r\n {{item.fileCount}}</span>\r\n <span class=\"email\" *ngIf=\"(!item.children || item.children.length === 0) && !item.fileCount\">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 *ngIf=\"botones\">\r\n <div class=\"buttons\">\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 </ng-container>\r\n </div>\r\n <div class=\"sf-doc-scrollable sf-doc-scrollable--files\" *ngIf=\"tab==2\">\r\n <lib-folder-files\r\n [carpeta]=\"carpetaSeleccionada\"\r\n [isMobile]=\"isMobile\"\r\n [idKatios]=\"idKatios\"\r\n [server]=\"server\"\r\n [subestado]=\"subestado\"\r\n [requestData]=\"requestData\"\r\n [useBreadcrumb]=\"useBreadcrumb\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onOpenVisorDoc)=\"openVisorDoc($event)\"\r\n (onOpenNewWindow)=\"openNewWindow($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\">\r\n </lib-folder-files>\r\n </div>\r\n</div>\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: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-fixed{flex-shrink:0}.sf-doc-scrollable{flex:1;min-height:0;overflow-y:auto}.sf-doc-scrollable--files{overflow:hidden;display:flex;flex-direction:column}:host ::ng-deep .sf-doc-scrollable--files>lib-folder-files{flex:1;min-height:0}.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$1.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$1.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: i4.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: i6.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: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.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: i7.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: FolderFilesComponent, selector: "lib-folder-files", inputs: ["carpeta", "isMobile", "idKatios", "server", "subestado", "requestData", "useBreadcrumb"], outputs: ["onFileChange", "onCargarArchivo", "onEliminarMasivo", "onOpenVisorDoc", "onOpenNewWindow", "onBack"] }, { 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"] }] });
|
|
614
914
|
}
|
|
615
915
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, decorators: [{
|
|
616
916
|
type: Component,
|
|
617
|
-
args: [{ selector: 'app-sf-documents', imports: [
|
|
618
|
-
|
|
619
|
-
], 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 <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\r\n\r\n", 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"] }]
|
|
620
|
-
|
|
917
|
+
args: [{ selector: 'app-sf-documents', imports: [
|
|
918
|
+
ToastModule, ButtonModule, ConfirmDialogModule, PanelModule, CheckboxModule,
|
|
919
|
+
DialogModule, CommonModule, FormsModule, SafePipe, InputTextModule, InputIcon,
|
|
920
|
+
IconField, FolderFilesComponent,
|
|
921
|
+
DropdownModule, DatePickerModule
|
|
922
|
+
], providers: [DialogService, ConfirmationService], standalone: true, template: "<div class=\"sf-doc-layout\">\r\n <div class=\"sf-doc-fixed\">\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)\" >\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 </div>\r\n <p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n <div class=\"sf-doc-scrollable\" *ngIf=\"tab==1\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\">\r\n <p-panel header=\"{{carpeta.label}}\">\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 || item.total > 0) ? 'green':'red' }\"></i>\r\n <span class=\"name\">{{item.label}}</span>\r\n <span class=\"email\" *ngIf=\"item.children?.length > 0\">Documentos cargados:\r\n {{item.children.length}}</span>\r\n <span class=\"email\" *ngIf=\"(!item.children || item.children.length === 0) && item.fileCount\">Documentos cargados:\r\n {{item.fileCount}}</span>\r\n <span class=\"email\" *ngIf=\"(!item.children || item.children.length === 0) && !item.fileCount\">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 *ngIf=\"botones\">\r\n <div class=\"buttons\">\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 </ng-container>\r\n </div>\r\n <div class=\"sf-doc-scrollable sf-doc-scrollable--files\" *ngIf=\"tab==2\">\r\n <lib-folder-files\r\n [carpeta]=\"carpetaSeleccionada\"\r\n [isMobile]=\"isMobile\"\r\n [idKatios]=\"idKatios\"\r\n [server]=\"server\"\r\n [subestado]=\"subestado\"\r\n [requestData]=\"requestData\"\r\n [useBreadcrumb]=\"useBreadcrumb\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onOpenVisorDoc)=\"openVisorDoc($event)\"\r\n (onOpenNewWindow)=\"openNewWindow($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\">\r\n </lib-folder-files>\r\n </div>\r\n</div>\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: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-fixed{flex-shrink:0}.sf-doc-scrollable{flex:1;min-height:0;overflow-y:auto}.sf-doc-scrollable--files{overflow:hidden;display:flex;flex-direction:column}:host ::ng-deep .sf-doc-scrollable--files>lib-folder-files{flex:1;min-height:0}.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"] }]
|
|
923
|
+
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i2$2.DialogService }, { type: i3$1.MessageService }, { type: i0.ApplicationRef }, { type: i3$1.ConfirmationService }, { type: SfDocumentsService }], propDecorators: { accion: [{
|
|
621
924
|
type: Input
|
|
622
925
|
}], entidad: [{
|
|
623
926
|
type: Input
|
|
@@ -653,6 +956,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
653
956
|
type: Input
|
|
654
957
|
}], nmco: [{
|
|
655
958
|
type: Input
|
|
959
|
+
}], useBreadcrumb: [{
|
|
960
|
+
type: Input
|
|
961
|
+
}], onNavigationChange: [{
|
|
962
|
+
type: Output
|
|
656
963
|
}], server: [{
|
|
657
964
|
type: Input
|
|
658
965
|
}], panel: [{
|
|
@@ -670,5 +977,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
670
977
|
* Generated bundle index. Do not edit.
|
|
671
978
|
*/
|
|
672
979
|
|
|
673
|
-
export { DOCUMENT_SERVICE, SfDocumentsComponent, SfDocumentsService };
|
|
980
|
+
export { DOCUMENT_SERVICE, FolderFilesComponent, SfDocumentsComponent, SfDocumentsService };
|
|
674
981
|
//# sourceMappingURL=sf-documents.mjs.map
|