@sfinges/sf-solicitud 0.1.4 → 0.1.6

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.
@@ -222,11 +222,11 @@ class ApplicationPersonComponent {
222
222
  return holder ? `${holder.documentType ?? ''}|${holder.documentNumber}` : null;
223
223
  }
224
224
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ApplicationPersonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
225
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: ApplicationPersonComponent, isStandalone: true, selector: "lib-application-person", inputs: { parties: { classPropertyName: "parties", publicName: "parties", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<p-card>\n @if (holder(); as titular) {\n <div class=\"sfs-person-head\">\n <div class=\"sfs-person-avatar\" aria-hidden=\"true\">{{ initials() }}</div>\n <div class=\"sfs-person-main\">\n <div class=\"sfs-person-name\">\n <h2 class=\"sfs-title\">{{ titular.name || '\u2014' }}</h2>\n @if (holderIdentity(); as identity) {\n <p-tag [value]=\"identity.label\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n }\n </div>\n <div class=\"sfs-person-facts\">\n <span>Documento {{ titular.documentNumber || '\u2014' }}</span>\n <span>{{ titular.age != null ? (titular.age | number: '1.0-0' : locale) + ' a\u00F1os' : 'Edad: \u2014' }}</span>\n <span><i class=\"pi pi-mobile\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Celular: </span> {{ titular.phone || '\u2014' }}</span>\n <span class=\"sfs-break\"><i class=\"pi pi-envelope\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Correo: </span> {{ titular.email || '\u2014' }}</span>\n @if (others().length) {\n <span>{{ others().length }} {{ others().length === 1 ? 'persona m\u00E1s' : 'personas m\u00E1s' }} en la solicitud</span>\n }\n </div>\n </div>\n <!-- pButton y no p-button: el componente no deja poner aria-expanded en su <button>. -->\n <button pButton type=\"button\" class=\"sfs-person-toggle\" severity=\"secondary\" [text]=\"true\" label=\"Datos de la persona\" aria-label=\"Datos de la persona\"\n [icon]=\"expanded() ? 'pi pi-chevron-up' : 'pi pi-chevron-down'\" iconPos=\"right\"\n [attr.aria-expanded]=\"expanded()\" [attr.aria-controls]=\"ids.more\"\n (click)=\"toggle()\"></button>\n </div>\n\n @if (expanded()) {\n <div [id]=\"ids.more\" class=\"sfs-person-more\">\n <section [attr.aria-labelledby]=\"ids.prefix + '-general'\">\n <h3 [id]=\"ids.prefix + '-general'\" class=\"sfs-section-title\"><i class=\"pi pi-id-card\" aria-hidden=\"true\"></i> Informaci\u00F3n general</h3>\n @switch (personState()) {\n @case ('loading') {\n <div class=\"sfs-person-grid\" aria-busy=\"true\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8]; track i) { <p-skeleton height=\"2.5rem\"></p-skeleton> }\n </div>\n }\n @case ('empty') {\n <p-message severity=\"info\" text=\"La persona no est\u00E1 registrada: se muestran solo los datos de la solicitud.\"></p-message>\n }\n @case ('missing') {\n <p-message severity=\"warn\" text=\"El titular no tiene documento en la solicitud: no se pueden consultar sus datos.\"></p-message>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar los datos de la persona.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadPerson()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <dl class=\"sfs-person-grid sfs-dl\">\n @for (field of generalFields(); track field.label) {\n <div class=\"sfs-field\">\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n }\n </section>\n\n @if (personState() === 'ready') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-contact'\">\n <h3 [id]=\"ids.prefix + '-contact'\" class=\"sfs-section-title\"><i class=\"pi pi-phone\" aria-hidden=\"true\"></i> Informaci\u00F3n de contacto</h3>\n <p-table [value]=\"contacts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Tipo</th><th>Descripci\u00F3n</th><th>Valor</th></tr>\n </ng-template>\n <ng-template #body let-c>\n <tr>\n <td>{{ c.type || '\u2014' }}</td>\n <td>{{ c.description || '\u2014' }}</td>\n <td class=\"sfs-break\">\n {{ c.value || '\u2014' }}\n @if (c.primary) { <span class=\"sfs-tag-gap\"><p-tag value=\"Principal\" severity=\"info\"></p-tag></span> }\n </td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene medios de contacto registrados.</td></tr>\n </ng-template>\n </p-table>\n </section>\n\n <section [attr.aria-labelledby]=\"ids.prefix + '-address'\">\n <h3 [id]=\"ids.prefix + '-address'\" class=\"sfs-section-title\"><i class=\"pi pi-home\" aria-hidden=\"true\"></i> Direcciones</h3>\n <p-table [value]=\"addresses()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Direcci\u00F3n</th><th>Pa\u00EDs</th><th>Ciudad</th><th>Barrio</th><th>Tel\u00E9fono</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.address || '\u2014' }}</td>\n <td>{{ a.country || '\u2014' }}</td>\n <td>{{ a.city || '\u2014' }}</td>\n <td>{{ a.neighborhood || '\u2014' }}</td>\n <td>{{ a.phone || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La persona no tiene direcciones registradas.</td></tr>\n </ng-template>\n </p-table>\n </section>\n }\n\n @if (hasAccounts && accountsState() !== 'missing') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-accounts'\">\n <h3 [id]=\"ids.prefix + '-accounts'\" class=\"sfs-section-title\"><i class=\"pi pi-wallet\" aria-hidden=\"true\"></i> Cuentas</h3>\n @switch (accountsState()) {\n @case ('loading') { <p-skeleton height=\"5rem\" aria-busy=\"true\"></p-skeleton> }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar las cuentas.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadAccounts()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <p-table [value]=\"accounts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Banco</th><th>Tipo de cuenta</th><th>N\u00FAmero</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.bank || '\u2014' }}</td>\n <td>{{ a.accountType || '\u2014' }}</td>\n <td>{{ a.number || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene cuentas registradas.</td></tr>\n </ng-template>\n </p-table>\n }\n }\n </section>\n }\n\n @if (others().length) {\n <section [attr.aria-labelledby]=\"ids.prefix + '-others'\">\n <h3 [id]=\"ids.prefix + '-others'\" class=\"sfs-section-title\"><i class=\"pi pi-users\" aria-hidden=\"true\"></i> Otras personas de la solicitud</h3>\n <p-table [value]=\"others()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\" dataKey=\"documentNumber\">\n <ng-template #header>\n <tr><th>Rol</th><th>Documento</th><th>Nombre</th><th>Identidad</th><th>Edad</th><th>Celular</th><th>Correo</th></tr>\n </ng-template>\n <ng-template #body let-p>\n <tr>\n <td>{{ p.role || '\u2014' }}</td>\n <td>{{ p.documentNumber || '\u2014' }}</td>\n <td>{{ p.name || '\u2014' }}</td>\n <td class=\"sfs-nowrap\">\n @if (identityView(p.identity); as identity) {\n <p-tag [value]=\"identity.short\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n } @else { \u2014 }\n </td>\n <td>{{ p.age != null ? (p.age | number: '1.0-0' : locale) : '\u2014' }}</td>\n <td>{{ p.phone || '\u2014' }}</td>\n <td class=\"sfs-break\">{{ p.email || '\u2014' }}</td>\n </tr>\n </ng-template>\n </p-table>\n </section>\n }\n </div>\n }\n } @else {\n <p-message severity=\"info\" text=\"La solicitud no tiene titular registrado.\"></p-message>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}\n", ".sfs-person-head{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-person-avatar{display:flex;align-items:center;justify-content:center;width:3.5rem;height:3.5rem;flex-shrink:0;border-radius:50%;font-size:1.25rem;font-weight:700;color:var(--primary-color, var(--p-primary-color));background:var(--p-highlight-background)}.sfs-person-main{display:flex;flex-direction:column;gap:.25rem;flex:1 1 14rem;min-width:0}@media (max-width: 575px){:host ::ng-deep .sfs-person-toggle.p-button{width:100%;justify-content:space-between}}.sfs-person-name{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .75rem}.sfs-person-facts{display:flex;flex-wrap:wrap;gap:.25rem 1rem;font-size:.875rem;color:var(--p-text-muted-color)}.sfs-person-facts i{font-size:.8rem}.sfs-person-more{display:flex;flex-direction:column;gap:1.25rem;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--p-content-border-color)}.sfs-person-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem 1rem}@media (min-width: 768px){.sfs-person-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.sfs-dl{margin:0}.sfs-field{display:flex;flex-direction:column;min-width:0}.sfs-field dt{font-size:.8rem;color:var(--p-text-muted-color)}.sfs-field dd{margin:0;overflow-wrap:anywhere}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i3$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i5.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i7.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }] });
225
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: ApplicationPersonComponent, isStandalone: true, selector: "lib-application-person", inputs: { parties: { classPropertyName: "parties", publicName: "parties", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<p-card>\n @if (holder(); as titular) {\n <div class=\"sfs-person-head\">\n <div class=\"sfs-person-avatar\" aria-hidden=\"true\">{{ initials() }}</div>\n <div class=\"sfs-person-main\">\n <div class=\"sfs-person-name\">\n <h2 class=\"sfs-title\">{{ titular.name || '\u2014' }}</h2>\n @if (holderIdentity(); as identity) {\n <p-tag [value]=\"identity.label\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n }\n </div>\n <div class=\"sfs-person-facts\">\n <span>Documento {{ titular.documentNumber || '\u2014' }}</span>\n <span>{{ titular.age != null ? (titular.age | number: '1.0-0' : locale) + ' a\u00F1os' : 'Edad: \u2014' }}</span>\n <span><i class=\"pi pi-mobile\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Celular: </span> {{ titular.phone || '\u2014' }}</span>\n <span class=\"sfs-break\"><i class=\"pi pi-envelope\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Correo: </span> {{ titular.email || '\u2014' }}</span>\n @if (others().length) {\n <span>{{ others().length }} {{ others().length === 1 ? 'persona m\u00E1s' : 'personas m\u00E1s' }} en la solicitud</span>\n }\n </div>\n </div>\n <!-- pButton y no p-button: el componente no deja poner aria-expanded en su <button>. -->\n <button pButton type=\"button\" class=\"sfs-person-toggle\" severity=\"secondary\" [text]=\"true\" label=\"Datos de la persona\" aria-label=\"Datos de la persona\"\n [icon]=\"expanded() ? 'pi pi-chevron-up' : 'pi pi-chevron-down'\" iconPos=\"right\"\n [attr.aria-expanded]=\"expanded()\" [attr.aria-controls]=\"ids.more\"\n (click)=\"toggle()\"></button>\n </div>\n\n @if (expanded()) {\n <div [id]=\"ids.more\" class=\"sfs-person-more\">\n <section [attr.aria-labelledby]=\"ids.prefix + '-general'\">\n <h3 [id]=\"ids.prefix + '-general'\" class=\"sfs-section-title\"><i class=\"pi pi-id-card\" aria-hidden=\"true\"></i> Informaci\u00F3n general</h3>\n @switch (personState()) {\n @case ('loading') {\n <div class=\"sfs-person-grid\" aria-busy=\"true\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8]; track i) { <p-skeleton height=\"2.5rem\"></p-skeleton> }\n </div>\n }\n @case ('empty') {\n <p-message severity=\"info\" text=\"La persona no est\u00E1 registrada: se muestran solo los datos de la solicitud.\"></p-message>\n }\n @case ('missing') {\n <p-message severity=\"warn\" text=\"El titular no tiene documento en la solicitud: no se pueden consultar sus datos.\"></p-message>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar los datos de la persona.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadPerson()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <dl class=\"sfs-person-grid sfs-dl\">\n @for (field of generalFields(); track field.label) {\n <div class=\"sfs-field\">\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n }\n </section>\n\n @if (personState() === 'ready') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-contact'\">\n <h3 [id]=\"ids.prefix + '-contact'\" class=\"sfs-section-title\"><i class=\"pi pi-phone\" aria-hidden=\"true\"></i> Informaci\u00F3n de contacto</h3>\n <p-table [value]=\"contacts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Tipo</th><th>Descripci\u00F3n</th><th>Valor</th></tr>\n </ng-template>\n <ng-template #body let-c>\n <tr>\n <td>{{ c.type || '\u2014' }}</td>\n <td>{{ c.description || '\u2014' }}</td>\n <td class=\"sfs-break\">\n {{ c.value || '\u2014' }}\n @if (c.primary) { <span class=\"sfs-tag-gap\"><p-tag value=\"Principal\" severity=\"info\"></p-tag></span> }\n </td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene medios de contacto registrados.</td></tr>\n </ng-template>\n </p-table>\n </section>\n\n <section [attr.aria-labelledby]=\"ids.prefix + '-address'\">\n <h3 [id]=\"ids.prefix + '-address'\" class=\"sfs-section-title\"><i class=\"pi pi-home\" aria-hidden=\"true\"></i> Direcciones</h3>\n <p-table [value]=\"addresses()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Direcci\u00F3n</th><th>Pa\u00EDs</th><th>Ciudad</th><th>Barrio</th><th>Tel\u00E9fono</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.address || '\u2014' }}</td>\n <td>{{ a.country || '\u2014' }}</td>\n <td>{{ a.city || '\u2014' }}</td>\n <td>{{ a.neighborhood || '\u2014' }}</td>\n <td>{{ a.phone || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La persona no tiene direcciones registradas.</td></tr>\n </ng-template>\n </p-table>\n </section>\n }\n\n @if (hasAccounts && accountsState() !== 'missing') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-accounts'\">\n <h3 [id]=\"ids.prefix + '-accounts'\" class=\"sfs-section-title\"><i class=\"pi pi-wallet\" aria-hidden=\"true\"></i> Cuentas</h3>\n @switch (accountsState()) {\n @case ('loading') { <p-skeleton height=\"5rem\" aria-busy=\"true\"></p-skeleton> }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar las cuentas.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadAccounts()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <p-table [value]=\"accounts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Banco</th><th>Tipo de cuenta</th><th>N\u00FAmero</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.bank || '\u2014' }}</td>\n <td>{{ a.accountType || '\u2014' }}</td>\n <td>{{ a.number || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene cuentas registradas.</td></tr>\n </ng-template>\n </p-table>\n }\n }\n </section>\n }\n\n @if (others().length) {\n <section [attr.aria-labelledby]=\"ids.prefix + '-others'\">\n <h3 [id]=\"ids.prefix + '-others'\" class=\"sfs-section-title\"><i class=\"pi pi-users\" aria-hidden=\"true\"></i> Otras personas de la solicitud</h3>\n <p-table [value]=\"others()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\" dataKey=\"documentNumber\">\n <ng-template #header>\n <tr><th>Rol</th><th>Documento</th><th>Nombre</th><th>Identidad</th><th>Edad</th><th>Celular</th><th>Correo</th></tr>\n </ng-template>\n <ng-template #body let-p>\n <tr>\n <td>{{ p.role || '\u2014' }}</td>\n <td>{{ p.documentNumber || '\u2014' }}</td>\n <td>{{ p.name || '\u2014' }}</td>\n <td class=\"sfs-nowrap\">\n @if (identityView(p.identity); as identity) {\n <p-tag [value]=\"identity.short\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n } @else { \u2014 }\n </td>\n <td>{{ p.age != null ? (p.age | number: '1.0-0' : locale) : '\u2014' }}</td>\n <td>{{ p.phone || '\u2014' }}</td>\n <td class=\"sfs-break\">{{ p.email || '\u2014' }}</td>\n </tr>\n </ng-template>\n </p-table>\n </section>\n }\n </div>\n }\n } @else {\n <p-message severity=\"info\" text=\"La solicitud no tiene titular registrado.\"></p-message>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}@media (max-width: 575px){:host ::ng-deep .sfs-stack-table .p-datatable-table-container{overflow:visible!important}:host ::ng-deep .sfs-stack-table table,:host ::ng-deep .sfs-stack-table tbody{display:block;width:100%}:host ::ng-deep .sfs-stack-table thead{display:block!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}:host ::ng-deep .sfs-stack-table tbody tr{display:flex;flex-direction:column;margin-bottom:.5rem;padding:.5rem .75rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-content-border-radius, 6px)}:host ::ng-deep .sfs-stack-table tbody td{display:flex;align-items:center;justify-content:flex-end;gap:.375rem;padding:.3rem 0;border:0;text-align:right}:host ::ng-deep .sfs-stack-table tbody td[data-label]:before{content:attr(data-label);margin-right:auto;padding-right:1rem;color:var(--p-text-muted-color);text-align:left}:host ::ng-deep .sfs-stack-table tbody td.sfs-stack-title{order:-1;display:block;font-weight:600;text-align:left}:host ::ng-deep .sfs-stack-table tfoot,:host ::ng-deep .sfs-stack-table .sfs-stack-hide{display:none}}\n", ".sfs-person-head{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-person-avatar{display:flex;align-items:center;justify-content:center;width:3.5rem;height:3.5rem;flex-shrink:0;border-radius:50%;font-size:1.25rem;font-weight:700;color:var(--primary-color, var(--p-primary-color));background:var(--p-highlight-background)}.sfs-person-main{display:flex;flex-direction:column;gap:.25rem;flex:1 1 14rem;min-width:0}@media (max-width: 575px){:host ::ng-deep .sfs-person-toggle.p-button{width:100%;justify-content:space-between}}.sfs-person-name{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .75rem}.sfs-person-facts{display:flex;flex-wrap:wrap;gap:.25rem 1rem;font-size:.875rem;color:var(--p-text-muted-color)}.sfs-person-facts i{font-size:.8rem}.sfs-person-more{display:flex;flex-direction:column;gap:1.25rem;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--p-content-border-color)}.sfs-person-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem 1rem}@media (min-width: 768px){.sfs-person-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.sfs-dl{margin:0}.sfs-field{display:flex;flex-direction:column;min-width:0}.sfs-field dt{font-size:.8rem;color:var(--p-text-muted-color)}.sfs-field dd{margin:0;overflow-wrap:anywhere}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i3$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i5.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i7.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }] });
226
226
  }
227
227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ApplicationPersonComponent, decorators: [{
228
228
  type: Component,
229
- args: [{ selector: 'lib-application-person', imports: [CommonModule, ButtonModule, CardModule, MessageModule, SkeletonModule, TableModule, TagModule], template: "<p-card>\n @if (holder(); as titular) {\n <div class=\"sfs-person-head\">\n <div class=\"sfs-person-avatar\" aria-hidden=\"true\">{{ initials() }}</div>\n <div class=\"sfs-person-main\">\n <div class=\"sfs-person-name\">\n <h2 class=\"sfs-title\">{{ titular.name || '\u2014' }}</h2>\n @if (holderIdentity(); as identity) {\n <p-tag [value]=\"identity.label\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n }\n </div>\n <div class=\"sfs-person-facts\">\n <span>Documento {{ titular.documentNumber || '\u2014' }}</span>\n <span>{{ titular.age != null ? (titular.age | number: '1.0-0' : locale) + ' a\u00F1os' : 'Edad: \u2014' }}</span>\n <span><i class=\"pi pi-mobile\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Celular: </span> {{ titular.phone || '\u2014' }}</span>\n <span class=\"sfs-break\"><i class=\"pi pi-envelope\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Correo: </span> {{ titular.email || '\u2014' }}</span>\n @if (others().length) {\n <span>{{ others().length }} {{ others().length === 1 ? 'persona m\u00E1s' : 'personas m\u00E1s' }} en la solicitud</span>\n }\n </div>\n </div>\n <!-- pButton y no p-button: el componente no deja poner aria-expanded en su <button>. -->\n <button pButton type=\"button\" class=\"sfs-person-toggle\" severity=\"secondary\" [text]=\"true\" label=\"Datos de la persona\" aria-label=\"Datos de la persona\"\n [icon]=\"expanded() ? 'pi pi-chevron-up' : 'pi pi-chevron-down'\" iconPos=\"right\"\n [attr.aria-expanded]=\"expanded()\" [attr.aria-controls]=\"ids.more\"\n (click)=\"toggle()\"></button>\n </div>\n\n @if (expanded()) {\n <div [id]=\"ids.more\" class=\"sfs-person-more\">\n <section [attr.aria-labelledby]=\"ids.prefix + '-general'\">\n <h3 [id]=\"ids.prefix + '-general'\" class=\"sfs-section-title\"><i class=\"pi pi-id-card\" aria-hidden=\"true\"></i> Informaci\u00F3n general</h3>\n @switch (personState()) {\n @case ('loading') {\n <div class=\"sfs-person-grid\" aria-busy=\"true\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8]; track i) { <p-skeleton height=\"2.5rem\"></p-skeleton> }\n </div>\n }\n @case ('empty') {\n <p-message severity=\"info\" text=\"La persona no est\u00E1 registrada: se muestran solo los datos de la solicitud.\"></p-message>\n }\n @case ('missing') {\n <p-message severity=\"warn\" text=\"El titular no tiene documento en la solicitud: no se pueden consultar sus datos.\"></p-message>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar los datos de la persona.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadPerson()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <dl class=\"sfs-person-grid sfs-dl\">\n @for (field of generalFields(); track field.label) {\n <div class=\"sfs-field\">\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n }\n </section>\n\n @if (personState() === 'ready') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-contact'\">\n <h3 [id]=\"ids.prefix + '-contact'\" class=\"sfs-section-title\"><i class=\"pi pi-phone\" aria-hidden=\"true\"></i> Informaci\u00F3n de contacto</h3>\n <p-table [value]=\"contacts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Tipo</th><th>Descripci\u00F3n</th><th>Valor</th></tr>\n </ng-template>\n <ng-template #body let-c>\n <tr>\n <td>{{ c.type || '\u2014' }}</td>\n <td>{{ c.description || '\u2014' }}</td>\n <td class=\"sfs-break\">\n {{ c.value || '\u2014' }}\n @if (c.primary) { <span class=\"sfs-tag-gap\"><p-tag value=\"Principal\" severity=\"info\"></p-tag></span> }\n </td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene medios de contacto registrados.</td></tr>\n </ng-template>\n </p-table>\n </section>\n\n <section [attr.aria-labelledby]=\"ids.prefix + '-address'\">\n <h3 [id]=\"ids.prefix + '-address'\" class=\"sfs-section-title\"><i class=\"pi pi-home\" aria-hidden=\"true\"></i> Direcciones</h3>\n <p-table [value]=\"addresses()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Direcci\u00F3n</th><th>Pa\u00EDs</th><th>Ciudad</th><th>Barrio</th><th>Tel\u00E9fono</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.address || '\u2014' }}</td>\n <td>{{ a.country || '\u2014' }}</td>\n <td>{{ a.city || '\u2014' }}</td>\n <td>{{ a.neighborhood || '\u2014' }}</td>\n <td>{{ a.phone || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La persona no tiene direcciones registradas.</td></tr>\n </ng-template>\n </p-table>\n </section>\n }\n\n @if (hasAccounts && accountsState() !== 'missing') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-accounts'\">\n <h3 [id]=\"ids.prefix + '-accounts'\" class=\"sfs-section-title\"><i class=\"pi pi-wallet\" aria-hidden=\"true\"></i> Cuentas</h3>\n @switch (accountsState()) {\n @case ('loading') { <p-skeleton height=\"5rem\" aria-busy=\"true\"></p-skeleton> }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar las cuentas.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadAccounts()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <p-table [value]=\"accounts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Banco</th><th>Tipo de cuenta</th><th>N\u00FAmero</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.bank || '\u2014' }}</td>\n <td>{{ a.accountType || '\u2014' }}</td>\n <td>{{ a.number || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene cuentas registradas.</td></tr>\n </ng-template>\n </p-table>\n }\n }\n </section>\n }\n\n @if (others().length) {\n <section [attr.aria-labelledby]=\"ids.prefix + '-others'\">\n <h3 [id]=\"ids.prefix + '-others'\" class=\"sfs-section-title\"><i class=\"pi pi-users\" aria-hidden=\"true\"></i> Otras personas de la solicitud</h3>\n <p-table [value]=\"others()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\" dataKey=\"documentNumber\">\n <ng-template #header>\n <tr><th>Rol</th><th>Documento</th><th>Nombre</th><th>Identidad</th><th>Edad</th><th>Celular</th><th>Correo</th></tr>\n </ng-template>\n <ng-template #body let-p>\n <tr>\n <td>{{ p.role || '\u2014' }}</td>\n <td>{{ p.documentNumber || '\u2014' }}</td>\n <td>{{ p.name || '\u2014' }}</td>\n <td class=\"sfs-nowrap\">\n @if (identityView(p.identity); as identity) {\n <p-tag [value]=\"identity.short\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n } @else { \u2014 }\n </td>\n <td>{{ p.age != null ? (p.age | number: '1.0-0' : locale) : '\u2014' }}</td>\n <td>{{ p.phone || '\u2014' }}</td>\n <td class=\"sfs-break\">{{ p.email || '\u2014' }}</td>\n </tr>\n </ng-template>\n </p-table>\n </section>\n }\n </div>\n }\n } @else {\n <p-message severity=\"info\" text=\"La solicitud no tiene titular registrado.\"></p-message>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}\n", ".sfs-person-head{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-person-avatar{display:flex;align-items:center;justify-content:center;width:3.5rem;height:3.5rem;flex-shrink:0;border-radius:50%;font-size:1.25rem;font-weight:700;color:var(--primary-color, var(--p-primary-color));background:var(--p-highlight-background)}.sfs-person-main{display:flex;flex-direction:column;gap:.25rem;flex:1 1 14rem;min-width:0}@media (max-width: 575px){:host ::ng-deep .sfs-person-toggle.p-button{width:100%;justify-content:space-between}}.sfs-person-name{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .75rem}.sfs-person-facts{display:flex;flex-wrap:wrap;gap:.25rem 1rem;font-size:.875rem;color:var(--p-text-muted-color)}.sfs-person-facts i{font-size:.8rem}.sfs-person-more{display:flex;flex-direction:column;gap:1.25rem;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--p-content-border-color)}.sfs-person-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem 1rem}@media (min-width: 768px){.sfs-person-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.sfs-dl{margin:0}.sfs-field{display:flex;flex-direction:column;min-width:0}.sfs-field dt{font-size:.8rem;color:var(--p-text-muted-color)}.sfs-field dd{margin:0;overflow-wrap:anywhere}\n"] }]
229
+ args: [{ selector: 'lib-application-person', imports: [CommonModule, ButtonModule, CardModule, MessageModule, SkeletonModule, TableModule, TagModule], template: "<p-card>\n @if (holder(); as titular) {\n <div class=\"sfs-person-head\">\n <div class=\"sfs-person-avatar\" aria-hidden=\"true\">{{ initials() }}</div>\n <div class=\"sfs-person-main\">\n <div class=\"sfs-person-name\">\n <h2 class=\"sfs-title\">{{ titular.name || '\u2014' }}</h2>\n @if (holderIdentity(); as identity) {\n <p-tag [value]=\"identity.label\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n }\n </div>\n <div class=\"sfs-person-facts\">\n <span>Documento {{ titular.documentNumber || '\u2014' }}</span>\n <span>{{ titular.age != null ? (titular.age | number: '1.0-0' : locale) + ' a\u00F1os' : 'Edad: \u2014' }}</span>\n <span><i class=\"pi pi-mobile\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Celular: </span> {{ titular.phone || '\u2014' }}</span>\n <span class=\"sfs-break\"><i class=\"pi pi-envelope\" aria-hidden=\"true\"></i><span class=\"sfs-sr-only\">Correo: </span> {{ titular.email || '\u2014' }}</span>\n @if (others().length) {\n <span>{{ others().length }} {{ others().length === 1 ? 'persona m\u00E1s' : 'personas m\u00E1s' }} en la solicitud</span>\n }\n </div>\n </div>\n <!-- pButton y no p-button: el componente no deja poner aria-expanded en su <button>. -->\n <button pButton type=\"button\" class=\"sfs-person-toggle\" severity=\"secondary\" [text]=\"true\" label=\"Datos de la persona\" aria-label=\"Datos de la persona\"\n [icon]=\"expanded() ? 'pi pi-chevron-up' : 'pi pi-chevron-down'\" iconPos=\"right\"\n [attr.aria-expanded]=\"expanded()\" [attr.aria-controls]=\"ids.more\"\n (click)=\"toggle()\"></button>\n </div>\n\n @if (expanded()) {\n <div [id]=\"ids.more\" class=\"sfs-person-more\">\n <section [attr.aria-labelledby]=\"ids.prefix + '-general'\">\n <h3 [id]=\"ids.prefix + '-general'\" class=\"sfs-section-title\"><i class=\"pi pi-id-card\" aria-hidden=\"true\"></i> Informaci\u00F3n general</h3>\n @switch (personState()) {\n @case ('loading') {\n <div class=\"sfs-person-grid\" aria-busy=\"true\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8]; track i) { <p-skeleton height=\"2.5rem\"></p-skeleton> }\n </div>\n }\n @case ('empty') {\n <p-message severity=\"info\" text=\"La persona no est\u00E1 registrada: se muestran solo los datos de la solicitud.\"></p-message>\n }\n @case ('missing') {\n <p-message severity=\"warn\" text=\"El titular no tiene documento en la solicitud: no se pueden consultar sus datos.\"></p-message>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar los datos de la persona.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadPerson()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <dl class=\"sfs-person-grid sfs-dl\">\n @for (field of generalFields(); track field.label) {\n <div class=\"sfs-field\">\n <dt>{{ field.label }}</dt>\n <dd>{{ field.value }}</dd>\n </div>\n }\n </dl>\n }\n }\n </section>\n\n @if (personState() === 'ready') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-contact'\">\n <h3 [id]=\"ids.prefix + '-contact'\" class=\"sfs-section-title\"><i class=\"pi pi-phone\" aria-hidden=\"true\"></i> Informaci\u00F3n de contacto</h3>\n <p-table [value]=\"contacts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Tipo</th><th>Descripci\u00F3n</th><th>Valor</th></tr>\n </ng-template>\n <ng-template #body let-c>\n <tr>\n <td>{{ c.type || '\u2014' }}</td>\n <td>{{ c.description || '\u2014' }}</td>\n <td class=\"sfs-break\">\n {{ c.value || '\u2014' }}\n @if (c.primary) { <span class=\"sfs-tag-gap\"><p-tag value=\"Principal\" severity=\"info\"></p-tag></span> }\n </td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene medios de contacto registrados.</td></tr>\n </ng-template>\n </p-table>\n </section>\n\n <section [attr.aria-labelledby]=\"ids.prefix + '-address'\">\n <h3 [id]=\"ids.prefix + '-address'\" class=\"sfs-section-title\"><i class=\"pi pi-home\" aria-hidden=\"true\"></i> Direcciones</h3>\n <p-table [value]=\"addresses()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Direcci\u00F3n</th><th>Pa\u00EDs</th><th>Ciudad</th><th>Barrio</th><th>Tel\u00E9fono</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.address || '\u2014' }}</td>\n <td>{{ a.country || '\u2014' }}</td>\n <td>{{ a.city || '\u2014' }}</td>\n <td>{{ a.neighborhood || '\u2014' }}</td>\n <td>{{ a.phone || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La persona no tiene direcciones registradas.</td></tr>\n </ng-template>\n </p-table>\n </section>\n }\n\n @if (hasAccounts && accountsState() !== 'missing') {\n <section [attr.aria-labelledby]=\"ids.prefix + '-accounts'\">\n <h3 [id]=\"ids.prefix + '-accounts'\" class=\"sfs-section-title\"><i class=\"pi pi-wallet\" aria-hidden=\"true\"></i> Cuentas</h3>\n @switch (accountsState()) {\n @case ('loading') { <p-skeleton height=\"5rem\" aria-busy=\"true\"></p-skeleton> }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron cargar las cuentas.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"loadAccounts()\"></p-button>\n </div>\n </p-message>\n }\n @case ('ready') {\n <p-table [value]=\"accounts()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\">\n <ng-template #header>\n <tr><th>Banco</th><th>Tipo de cuenta</th><th>N\u00FAmero</th></tr>\n </ng-template>\n <ng-template #body let-a>\n <tr>\n <td>{{ a.bank || '\u2014' }}</td>\n <td>{{ a.accountType || '\u2014' }}</td>\n <td>{{ a.number || '\u2014' }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"3\">La persona no tiene cuentas registradas.</td></tr>\n </ng-template>\n </p-table>\n }\n }\n </section>\n }\n\n @if (others().length) {\n <section [attr.aria-labelledby]=\"ids.prefix + '-others'\">\n <h3 [id]=\"ids.prefix + '-others'\" class=\"sfs-section-title\"><i class=\"pi pi-users\" aria-hidden=\"true\"></i> Otras personas de la solicitud</h3>\n <p-table [value]=\"others()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\" dataKey=\"documentNumber\">\n <ng-template #header>\n <tr><th>Rol</th><th>Documento</th><th>Nombre</th><th>Identidad</th><th>Edad</th><th>Celular</th><th>Correo</th></tr>\n </ng-template>\n <ng-template #body let-p>\n <tr>\n <td>{{ p.role || '\u2014' }}</td>\n <td>{{ p.documentNumber || '\u2014' }}</td>\n <td>{{ p.name || '\u2014' }}</td>\n <td class=\"sfs-nowrap\">\n @if (identityView(p.identity); as identity) {\n <p-tag [value]=\"identity.short\" [icon]=\"identity.icon\" [severity]=\"identity.severity\"></p-tag>\n } @else { \u2014 }\n </td>\n <td>{{ p.age != null ? (p.age | number: '1.0-0' : locale) : '\u2014' }}</td>\n <td>{{ p.phone || '\u2014' }}</td>\n <td class=\"sfs-break\">{{ p.email || '\u2014' }}</td>\n </tr>\n </ng-template>\n </p-table>\n </section>\n }\n </div>\n }\n } @else {\n <p-message severity=\"info\" text=\"La solicitud no tiene titular registrado.\"></p-message>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}@media (max-width: 575px){:host ::ng-deep .sfs-stack-table .p-datatable-table-container{overflow:visible!important}:host ::ng-deep .sfs-stack-table table,:host ::ng-deep .sfs-stack-table tbody{display:block;width:100%}:host ::ng-deep .sfs-stack-table thead{display:block!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}:host ::ng-deep .sfs-stack-table tbody tr{display:flex;flex-direction:column;margin-bottom:.5rem;padding:.5rem .75rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-content-border-radius, 6px)}:host ::ng-deep .sfs-stack-table tbody td{display:flex;align-items:center;justify-content:flex-end;gap:.375rem;padding:.3rem 0;border:0;text-align:right}:host ::ng-deep .sfs-stack-table tbody td[data-label]:before{content:attr(data-label);margin-right:auto;padding-right:1rem;color:var(--p-text-muted-color);text-align:left}:host ::ng-deep .sfs-stack-table tbody td.sfs-stack-title{order:-1;display:block;font-weight:600;text-align:left}:host ::ng-deep .sfs-stack-table tfoot,:host ::ng-deep .sfs-stack-table .sfs-stack-hide{display:none}}\n", ".sfs-person-head{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-person-avatar{display:flex;align-items:center;justify-content:center;width:3.5rem;height:3.5rem;flex-shrink:0;border-radius:50%;font-size:1.25rem;font-weight:700;color:var(--primary-color, var(--p-primary-color));background:var(--p-highlight-background)}.sfs-person-main{display:flex;flex-direction:column;gap:.25rem;flex:1 1 14rem;min-width:0}@media (max-width: 575px){:host ::ng-deep .sfs-person-toggle.p-button{width:100%;justify-content:space-between}}.sfs-person-name{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .75rem}.sfs-person-facts{display:flex;flex-wrap:wrap;gap:.25rem 1rem;font-size:.875rem;color:var(--p-text-muted-color)}.sfs-person-facts i{font-size:.8rem}.sfs-person-more{display:flex;flex-direction:column;gap:1.25rem;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--p-content-border-color)}.sfs-person-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem 1rem}@media (min-width: 768px){.sfs-person-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.sfs-dl{margin:0}.sfs-field{display:flex;flex-direction:column;min-width:0}.sfs-field dt{font-size:.8rem;color:var(--p-text-muted-color)}.sfs-field dd{margin:0;overflow-wrap:anywhere}\n"] }]
230
230
  }], ctorParameters: () => [] });
231
231
 
232
232
  /** Métodos de cargo que se configuran en pesos; el resto es un porcentaje (fracción en el core). */
@@ -642,7 +642,7 @@ class LineSimulatorComponent {
642
642
  return type === 'ADMIN' ? 'Crédito' : 'Cuota';
643
643
  }
644
644
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LineSimulatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
645
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: LineSimulatorComponent, isStandalone: true, selector: "lib-line-simulator", inputs: { capacity: { classPropertyName: "capacity", publicName: "capacity", isSignal: true, isRequired: true, transformFunction: null }, capacityEditable: { classPropertyName: "capacityEditable", publicName: "capacityEditable", isSignal: true, isRequired: false, transformFunction: null }, simulation: { classPropertyName: "simulation", publicName: "simulation", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, saved: { classPropertyName: "saved", publicName: "saved", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, editableCharges: { classPropertyName: "editableCharges", publicName: "editableCharges", isSignal: true, isRequired: false, transformFunction: null }, showSave: { classPropertyName: "showSave", publicName: "showSave", isSignal: true, isRequired: false, transformFunction: null }, saveBlockedReason: { classPropertyName: "saveBlockedReason", publicName: "saveBlockedReason", isSignal: true, isRequired: false, transformFunction: null }, saving: { classPropertyName: "saving", publicName: "saving", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { simulate: "simulate", save: "save", retry: "retry", lineChange: "lineChange", unsavedChange: "unsavedChange" }, ngImport: i0, template: "<div class=\"sfs-stack\">\n <!-- Capacidad de pago -->\n <section [attr.aria-labelledby]=\"ids.capacityTitle\">\n <h3 [id]=\"ids.capacityTitle\" class=\"sfs-subtitle sfs-gap-bottom\">Capacidad de pago</h3>\n @if (capacityEditable()) {\n <div class=\"sfs-capacity-grid\">\n @for (field of capacityFields; track field.key) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.capacity + field.key\">{{ field.label }}</label>\n <p-inputnumber [inputId]=\"ids.capacity + field.key\" [ngModel]=\"currentCapacity()[field.key]\" (ngModelChange)=\"setCapacity(field.key, $event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\" [fluid]=\"true\"></p-inputnumber>\n </div>\n }\n <div class=\"sfs-control sfs-control--check\">\n <p-checkbox [inputId]=\"ids.garnishment\" [binary]=\"true\" [ngModel]=\"currentCapacity().hasGarnishment\" (ngModelChange)=\"setGarnishment($event)\"></p-checkbox>\n <label [for]=\"ids.garnishment\">Tiene embargo</label>\n </div>\n </div>\n }\n <!-- Indicadores en grilla: varios por fila en escritorio, para que la capacidad no ocupe media pantalla. -->\n @if (!capacityEditable() || simulation()) {\n <dl class=\"sfs-metrics\" [class.sfs-gap-top]=\"capacityEditable()\">\n @if (!capacityEditable()) {\n <div><dt>Ingresos</dt><dd>{{ capacity().income | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Descuentos de ley</dt><dd>{{ capacity().legalDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otras afiliaciones</dt><dd>{{ capacity().otherAffiliations | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otros descuentos</dt><dd>{{ capacity().otherDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Compras de cartera</dt><dd>{{ capacity().purchasesValue | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Embargo</dt><dd>{{ capacity().hasGarnishment ? 'S\u00ED' : 'No' }}</dd></div>\n }\n @if (simulation(); as s) {\n <div><dt>Cuota disponible</dt><dd class=\"sfs-strong\">{{ s.capacity.availableInstallment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Monto m\u00E1ximo</dt><dd class=\"sfs-strong\">{{ s.capacity.maxAmount != null ? (s.capacity.maxAmount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) : '\u2014' }}</dd></div>\n }\n </dl>\n }\n </section>\n\n @switch (state()) {\n @case ('loading') {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"12rem\"></p-skeleton>\n </div>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>{{ errorMessage() || 'No se pudo simular la solicitud.' }}</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retrySimulation()\"></p-button>\n </div>\n </p-message>\n @if (capacityEditable() && pendingChanges()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n }\n }\n @case ('idle') {\n @if (capacityEditable()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Simular\" icon=\"pi pi-calculator\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n } @else {\n <p class=\"sfs-muted sfs-no-top\">Todav\u00EDa no hay una simulaci\u00F3n para esta solicitud.</p>\n }\n }\n @case ('ready') {\n @if (simulation()?.warnings?.length) {\n <p-message severity=\"warn\">\n <ul class=\"sfs-list\">\n @for (w of simulation()?.warnings ?? []; track $index) { <li>{{ w }}</li> }\n </ul>\n </p-message>\n }\n\n @if (!lineOptions().length) {\n <p-message severity=\"info\" text=\"El simulador no devolvi\u00F3 l\u00EDneas para esta solicitud. Revise la pagadur\u00EDa, el producto y la capacidad de pago.\"></p-message>\n }\n\n <!-- L\u00EDnea, plazo, monto y tasa en una sola fila en escritorio. p-select pone el inputId en un span: el nombre\n accesible va por ariaLabelledBy. -->\n <div class=\"sfs-conditions\">\n <div class=\"sfs-control sfs-conditions__line\">\n <label [id]=\"ids.lineLabel\" [for]=\"ids.line\" class=\"sfs-strong\">L\u00EDnea</label>\n <p-select [inputId]=\"ids.line\" [ariaLabelledBy]=\"ids.lineLabel\" [options]=\"lineOptions()\" optionLabel=\"label\" optionValue=\"value\" optionDisabled=\"disabled\"\n [ngModel]=\"selectedLine()\" (ngModelChange)=\"chooseLine($event)\" placeholder=\"Seleccione una l\u00EDnea\" [fluid]=\"true\"></p-select>\n </div>\n @if (line(); as l) {\n @if (!l.error) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.term\">Plazo (cuotas)</label>\n <p-inputnumber [inputId]=\"ids.term\" [ngModel]=\"termInput()\" (ngModelChange)=\"termInput.set($event)\"\n [min]=\"simulation()?.minTerm ?? 1\" [max]=\"simulation()?.maxTerm ?? 600\" [useGrouping]=\"false\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control\">\n <label [for]=\"ids.amount\">Monto</label>\n <p-inputnumber [inputId]=\"ids.amount\" [ngModel]=\"amountInput()\" (ngModelChange)=\"amountInput.set($event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control sfs-conditions__rate\">\n <span>Tasa</span>\n <span class=\"sfs-strong\">{{ l.rate | number: '1.0-4' : locale }} % M.V.</span>\n </div>\n }\n }\n </div>\n @if (saved()?.line && saved()?.line !== selectedLine()) {\n <small class=\"sfs-muted sfs-no-gap\">La l\u00EDnea guardada es {{ savedLineName() }}. Al guardar se cambia por la elegida.</small>\n }\n\n @if (line(); as l) {\n @if (l.error) {\n <p-message severity=\"error\" text=\"Esta l\u00EDnea no se pudo simular. Elija otra o intente m\u00E1s tarde.\"></p-message>\n } @else {\n <!-- Cargos de la l\u00EDnea, con lo guardado al lado -->\n <p-table [value]=\"visibleChargeRows()\" size=\"small\" [scrollable]=\"true\" dataKey=\"name\">\n <ng-template #header>\n <tr>\n <th>Cargo</th>\n <th>Tipo</th>\n <th class=\"sfs-right\">Guardado</th>\n <th class=\"sfs-right\">Configurado</th>\n <th class=\"sfs-right\">Valor</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td>{{ row.label }}</td>\n <td>{{ chargeTypeLabel(row.type) }}</td>\n <td class=\"sfs-right sfs-nowrap\">\n @if (row.savedInput === null) { \u2014 }\n @else { {{ row.percentage ? (row.savedInput | number: '1.0-4' : locale) + ' %' : (row.savedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }} }\n </td>\n <td class=\"sfs-right\">\n @if (row.editable) {\n <label [for]=\"row.id\" class=\"sfs-sr-only\">{{ row.label }}</label>\n <p-inputnumber [inputId]=\"row.id\" [ngModel]=\"chargeInputs()[row.name]\" (ngModelChange)=\"setChargeInput(row.name, $event)\"\n [min]=\"0\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"row.percentage ? 4 : 0\" [locale]=\"locale\"\n [suffix]=\"row.percentage ? ' %' : ''\" [prefix]=\"row.percentage ? '' : '$ '\" inputStyleClass=\"sfs-charge-input\"></p-inputnumber>\n } @else {\n {{ row.percentage ? (row.simulatedInput | number: '1.0-4' : locale) + ' %' : (row.simulatedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }}\n }\n </td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La l\u00EDnea no tiene cargos.</td></tr>\n </ng-template>\n </p-table>\n @if (zeroChargesCount()) {\n <!-- Los cargos en cero (sin guardado, sin configurado y sin valor) ocupan espacio y no cambian nada. -->\n <div class=\"sfs-no-gap\">\n <p-button [label]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver ' + zeroChargesCount() + (zeroChargesCount() === 1 ? ' cargo en cero' : ' cargos en cero')\"\n [icon]=\"showZeroCharges() ? 'pi pi-eye-slash' : 'pi pi-eye'\" [text]=\"true\" size=\"small\" severity=\"secondary\"\n [ariaLabel]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver los cargos en cero'\"\n (onClick)=\"showZeroCharges.set(!showZeroCharges())\"></p-button>\n </div>\n }\n\n <!-- Resultado frente a lo guardado -->\n <section [attr.aria-labelledby]=\"ids.resultTitle\">\n <div class=\"sfs-head\">\n <h3 [id]=\"ids.resultTitle\" class=\"sfs-subtitle\">Resultado</h3>\n <p-tag [value]=\"l.viable ? 'Viable' : 'No viable'\" [severity]=\"l.viable ? 'success' : 'warn'\"></p-tag>\n </div>\n <p-table [value]=\"comparison()\" size=\"small\" [scrollable]=\"true\" dataKey=\"label\">\n <ng-template #header>\n <tr><th>Concepto</th><th class=\"sfs-right\">Guardado</th><th class=\"sfs-right\">Simulaci\u00F3n</th></tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td>{{ row.label }}</td>\n <td class=\"sfs-right sfs-nowrap\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.saved, kind: row.kind }\"></ng-container>\n </td>\n <td class=\"sfs-right sfs-nowrap\">\n @if (row.changed) { <span class=\"sfs-tag-before\"><p-tag value=\"Cambia\" severity=\"warn\"></p-tag></span> }\n <span [class.sfs-strong]=\"row.changed\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.simulated, kind: row.kind }\"></ng-container>\n </span>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (!l.viable && l.viabilityReasons.length) {\n <ul class=\"sfs-list sfs-gap-top\">\n @for (reason of l.viabilityReasons; track $index) { <li>{{ reason }}</li> }\n </ul>\n }\n </section>\n\n <!-- Acciones -->\n <div class=\"sfs-actions\">\n @if (canEdit() || capacityEditable()) {\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\"\n [disabled]=\"!pendingChanges() || hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n }\n @if (showSave()) {\n <!-- pButton y no p-button: sin poder guardar el bot\u00F3n queda aria-disabled (no disabled) para que el\n motivo se vea con Tab y con el mouse; openConfirm() corta el clic cuando hay motivo. -->\n <button pButton type=\"button\" label=\"Guardar condiciones\" aria-label=\"Guardar condiciones\"\n [icon]=\"saveUnavailableReason() ? 'pi pi-lock' : 'pi pi-save'\"\n [class.sfs-unavailable]=\"!!saveUnavailableReason()\"\n [attr.aria-disabled]=\"saveUnavailableReason() ? 'true' : null\"\n [attr.aria-describedby]=\"saveUnavailableReason() ? ids.saveReason : null\"\n [pTooltip]=\"saveUnavailableReason() ?? ''\" [tooltipDisabled]=\"!saveUnavailableReason()\" tooltipPosition=\"top\" tooltipEvent=\"both\"\n (click)=\"openConfirm()\"></button>\n @if (saveUnavailableReason()) {\n <span [id]=\"ids.saveReason\" class=\"sfs-sr-only\">{{ saveUnavailableReason() }}</span>\n }\n }\n </div>\n }\n }\n }\n }\n</div>\n\n<!-- Siempre montada: anuncia el resultado de cada simulaci\u00F3n (la de arriba se destruye mientras carga). -->\n<div class=\"sfs-sr-only\" role=\"status\" aria-live=\"polite\">{{ liveMessage() }}</div>\n\n<!-- Un valor de la comparaci\u00F3n, en su formato -->\n<ng-template #valueTpl let-value let-kind=\"kind\">\n @if (value === null || value === undefined || value === '') { \u2014 }\n @else {\n @switch (kind) {\n @case ('money') { {{ value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }} }\n @case ('rate') { {{ value | number: '1.0-4' : locale }} % M.V. }\n @case ('term') { {{ value }} cuotas }\n @default { {{ value }} }\n }\n }\n</ng-template>\n\n<!-- Confirmaci\u00F3n: cambia l\u00EDnea, monto, plazo y cargos de la solicitud -->\n<p-dialog header=\"Guardar condiciones\" [visible]=\"confirmVisible()\" (visibleChange)=\"confirmVisible.set($event)\" (onHide)=\"restoreConfirmFocus()\"\n [modal]=\"true\" [draggable]=\"false\" [closable]=\"!saving()\" [style]=\"{ width: '32rem', maxWidth: '95vw' }\">\n @if (confirmVisible() && line(); as l) {\n <p class=\"sfs-no-top\">\n Se guardar\u00E1n la l\u00EDnea <strong>{{ l.lineName || l.line }}</strong>,\n un monto de <strong>{{ l.amount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>\n a <strong>{{ l.term }} cuotas</strong> con una tasa de <strong>{{ l.rate | number: '1.0-4' : locale }} % M.V.</strong> y una cuota de <strong>{{ l.installment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>,\n con un giro al cliente de <strong>{{ l.transfer | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>.\n </p>\n @if (!l.viable) {\n <p-message severity=\"warn\" text=\"La l\u00EDnea no es viable con la capacidad de pago de la solicitud.\"></p-message>\n }\n }\n <ng-template #footer>\n <p-button label=\"Cancelar\" severity=\"secondary\" [text]=\"true\" [disabled]=\"saving()\" (onClick)=\"confirmVisible.set(false)\"></p-button>\n <p-button label=\"Guardar condiciones\" icon=\"pi pi-save\" [loading]=\"saving()\" (onClick)=\"confirmSave()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}\n", ".sfs-control{display:flex;flex-direction:column;gap:.25rem;min-width:0}.sfs-control--check{flex-direction:row;align-items:center;gap:.5rem;align-self:end;min-height:2.75rem}.sfs-capacity-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem}@media (min-width: 576px){.sfs-capacity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}.sfs-conditions{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem;align-items:end}@media (min-width: 576px){.sfs-conditions{grid-template-columns:repeat(2,minmax(0,1fr))}.sfs-conditions__line{grid-column:1 / -1}}@media (min-width: 992px){.sfs-conditions{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) max-content}.sfs-conditions__line{grid-column:auto}}.sfs-conditions__rate{justify-content:flex-end;min-height:2.5rem;padding-bottom:.5rem}.sfs-metrics{display:grid;grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr));gap:.5rem 1rem;margin:0}.sfs-metrics dt{font-size:.8125rem;color:var(--p-text-muted-color)}.sfs-metrics dd{margin:0;font-variant-numeric:tabular-nums}.sfs-no-gap{margin-top:-.75rem}.sfs-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}.sfs-list{margin:0;padding-left:1rem}.sfs-gap-top{margin-top:.5rem}.sfs-gap-bottom{margin-bottom:.5rem}.sfs-no-top{margin-top:0}.sfs-tag-before{margin-right:.5rem}:host ::ng-deep .sfs-charge-input{width:6.5rem;padding-block:.25rem;text-align:right}:host ::ng-deep .sfs-unavailable.p-button{opacity:var(--p-disabled-opacity);cursor:default}:host ::ng-deep .sfs-unavailable.p-button:hover,:host ::ng-deep .sfs-unavailable.p-button:active{background:var(--button-color, var(--p-button-primary-background));border-color:var(--button-color, var(--p-button-primary-border-color))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i4$1.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: i5$1.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: InputNumberModule }, { kind: "component", type: i6$1.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled", "fluid"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i8.Select, selector: "p-select", 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", "size", "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: SkeletonModule }, { kind: "component", type: i5.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i7.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i12.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
645
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: LineSimulatorComponent, isStandalone: true, selector: "lib-line-simulator", inputs: { capacity: { classPropertyName: "capacity", publicName: "capacity", isSignal: true, isRequired: true, transformFunction: null }, capacityEditable: { classPropertyName: "capacityEditable", publicName: "capacityEditable", isSignal: true, isRequired: false, transformFunction: null }, simulation: { classPropertyName: "simulation", publicName: "simulation", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, saved: { classPropertyName: "saved", publicName: "saved", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, editableCharges: { classPropertyName: "editableCharges", publicName: "editableCharges", isSignal: true, isRequired: false, transformFunction: null }, showSave: { classPropertyName: "showSave", publicName: "showSave", isSignal: true, isRequired: false, transformFunction: null }, saveBlockedReason: { classPropertyName: "saveBlockedReason", publicName: "saveBlockedReason", isSignal: true, isRequired: false, transformFunction: null }, saving: { classPropertyName: "saving", publicName: "saving", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { simulate: "simulate", save: "save", retry: "retry", lineChange: "lineChange", unsavedChange: "unsavedChange" }, ngImport: i0, template: "<div class=\"sfs-stack\">\n <!-- Capacidad de pago -->\n <section [attr.aria-labelledby]=\"ids.capacityTitle\">\n <h3 [id]=\"ids.capacityTitle\" class=\"sfs-subtitle sfs-gap-bottom\">Capacidad de pago</h3>\n @if (capacityEditable()) {\n <div class=\"sfs-capacity-grid\">\n @for (field of capacityFields; track field.key) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.capacity + field.key\">{{ field.label }}</label>\n <p-inputnumber [inputId]=\"ids.capacity + field.key\" [ngModel]=\"currentCapacity()[field.key]\" (ngModelChange)=\"setCapacity(field.key, $event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\" [fluid]=\"true\"></p-inputnumber>\n </div>\n }\n <div class=\"sfs-control sfs-control--check\">\n <p-checkbox [inputId]=\"ids.garnishment\" [binary]=\"true\" [ngModel]=\"currentCapacity().hasGarnishment\" (ngModelChange)=\"setGarnishment($event)\"></p-checkbox>\n <label [for]=\"ids.garnishment\">Tiene embargo</label>\n </div>\n </div>\n }\n <!-- Indicadores en grilla: varios por fila en escritorio, para que la capacidad no ocupe media pantalla. -->\n @if (!capacityEditable() || simulation()) {\n <dl class=\"sfs-metrics\" [class.sfs-gap-top]=\"capacityEditable()\">\n @if (!capacityEditable()) {\n <div><dt>Ingresos</dt><dd>{{ capacity().income | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Descuentos de ley</dt><dd>{{ capacity().legalDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otras afiliaciones</dt><dd>{{ capacity().otherAffiliations | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otros descuentos</dt><dd>{{ capacity().otherDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Compras de cartera</dt><dd>{{ capacity().purchasesValue | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Embargo</dt><dd>{{ capacity().hasGarnishment ? 'S\u00ED' : 'No' }}</dd></div>\n }\n @if (simulation(); as s) {\n <div><dt>Cuota disponible</dt><dd class=\"sfs-strong\">{{ s.capacity.availableInstallment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Monto m\u00E1ximo</dt><dd class=\"sfs-strong\">{{ s.capacity.maxAmount != null ? (s.capacity.maxAmount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) : '\u2014' }}</dd></div>\n }\n </dl>\n }\n </section>\n\n @switch (state()) {\n @case ('loading') {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"12rem\"></p-skeleton>\n </div>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>{{ errorMessage() || 'No se pudo simular la solicitud.' }}</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retrySimulation()\"></p-button>\n </div>\n </p-message>\n @if (capacityEditable() && pendingChanges()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n }\n }\n @case ('idle') {\n @if (capacityEditable()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Simular\" icon=\"pi pi-calculator\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n } @else {\n <p class=\"sfs-muted sfs-no-top\">Todav\u00EDa no hay una simulaci\u00F3n para esta solicitud.</p>\n }\n }\n @case ('ready') {\n @if (simulation()?.warnings?.length) {\n <p-message severity=\"warn\">\n <ul class=\"sfs-list\">\n @for (w of simulation()?.warnings ?? []; track $index) { <li>{{ w }}</li> }\n </ul>\n </p-message>\n }\n\n @if (!lineOptions().length) {\n <p-message severity=\"info\" text=\"El simulador no devolvi\u00F3 l\u00EDneas para esta solicitud. Revise la pagadur\u00EDa, el producto y la capacidad de pago.\"></p-message>\n }\n\n <!-- L\u00EDnea, plazo, monto y tasa en una sola fila en escritorio. p-select pone el inputId en un span: el nombre\n accesible va por ariaLabelledBy. -->\n <div class=\"sfs-conditions\">\n <div class=\"sfs-control sfs-conditions__line\">\n <label [id]=\"ids.lineLabel\" [for]=\"ids.line\" class=\"sfs-strong\">L\u00EDnea</label>\n <p-select [inputId]=\"ids.line\" [ariaLabelledBy]=\"ids.lineLabel\" [options]=\"lineOptions()\" optionLabel=\"label\" optionValue=\"value\" optionDisabled=\"disabled\"\n [ngModel]=\"selectedLine()\" (ngModelChange)=\"chooseLine($event)\" placeholder=\"Seleccione una l\u00EDnea\" [fluid]=\"true\"></p-select>\n </div>\n @if (line(); as l) {\n @if (!l.error) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.term\">Plazo (cuotas)</label>\n <p-inputnumber [inputId]=\"ids.term\" [ngModel]=\"termInput()\" (ngModelChange)=\"termInput.set($event)\"\n [min]=\"simulation()?.minTerm ?? 1\" [max]=\"simulation()?.maxTerm ?? 600\" [useGrouping]=\"false\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control\">\n <label [for]=\"ids.amount\">Monto</label>\n <p-inputnumber [inputId]=\"ids.amount\" [ngModel]=\"amountInput()\" (ngModelChange)=\"amountInput.set($event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control sfs-conditions__rate\">\n <span>Tasa</span>\n <span class=\"sfs-strong\">{{ l.rate | number: '1.0-4' : locale }} % M.V.</span>\n </div>\n }\n }\n </div>\n @if (saved()?.line && saved()?.line !== selectedLine()) {\n <small class=\"sfs-muted sfs-no-gap\">La l\u00EDnea guardada es {{ savedLineName() }}. Al guardar se cambia por la elegida.</small>\n }\n\n @if (line(); as l) {\n @if (l.error) {\n <p-message severity=\"error\" text=\"Esta l\u00EDnea no se pudo simular. Elija otra o intente m\u00E1s tarde.\"></p-message>\n } @else {\n <!-- Cargos de la l\u00EDnea, con lo guardado al lado -->\n <p-table [value]=\"visibleChargeRows()\" size=\"small\" [scrollable]=\"true\" dataKey=\"name\" styleClass=\"sfs-stack-table\">\n <ng-template #header>\n <tr>\n <th>Cargo</th>\n <th>Tipo</th>\n <th class=\"sfs-right\">Guardado</th>\n <th class=\"sfs-right\">Configurado</th>\n <th class=\"sfs-right\">Valor</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td class=\"sfs-stack-title\">{{ row.label }}</td>\n <td data-label=\"Tipo\">{{ chargeTypeLabel(row.type) }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Guardado\">\n @if (row.savedInput === null) { \u2014 }\n @else { {{ row.percentage ? (row.savedInput | number: '1.0-4' : locale) + ' %' : (row.savedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }} }\n </td>\n <td class=\"sfs-right\" data-label=\"Configurado\">\n @if (row.editable) {\n <label [for]=\"row.id\" class=\"sfs-sr-only\">{{ row.label }}</label>\n <p-inputnumber [inputId]=\"row.id\" [ngModel]=\"chargeInputs()[row.name]\" (ngModelChange)=\"setChargeInput(row.name, $event)\"\n [min]=\"0\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"row.percentage ? 4 : 0\" [locale]=\"locale\"\n [suffix]=\"row.percentage ? ' %' : ''\" [prefix]=\"row.percentage ? '' : '$ '\" inputStyleClass=\"sfs-charge-input\"></p-inputnumber>\n } @else {\n {{ row.percentage ? (row.simulatedInput | number: '1.0-4' : locale) + ' %' : (row.simulatedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }}\n }\n </td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Valor\">{{ row.value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La l\u00EDnea no tiene cargos.</td></tr>\n </ng-template>\n </p-table>\n @if (zeroChargesCount()) {\n <!-- Los cargos en cero (sin guardado, sin configurado y sin valor) ocupan espacio y no cambian nada. -->\n <div class=\"sfs-no-gap\">\n <p-button [label]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver ' + zeroChargesCount() + (zeroChargesCount() === 1 ? ' cargo en cero' : ' cargos en cero')\"\n [icon]=\"showZeroCharges() ? 'pi pi-eye-slash' : 'pi pi-eye'\" [text]=\"true\" size=\"small\" severity=\"secondary\"\n [ariaLabel]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver los cargos en cero'\"\n (onClick)=\"showZeroCharges.set(!showZeroCharges())\"></p-button>\n </div>\n }\n\n <!-- Resultado frente a lo guardado -->\n <section [attr.aria-labelledby]=\"ids.resultTitle\">\n <div class=\"sfs-head\">\n <h3 [id]=\"ids.resultTitle\" class=\"sfs-subtitle\">Resultado</h3>\n <p-tag [value]=\"l.viable ? 'Viable' : 'No viable'\" [severity]=\"l.viable ? 'success' : 'warn'\"></p-tag>\n </div>\n <p-table [value]=\"comparison()\" size=\"small\" [scrollable]=\"true\" dataKey=\"label\" styleClass=\"sfs-stack-table\">\n <ng-template #header>\n <tr><th>Concepto</th><th class=\"sfs-right\">Guardado</th><th class=\"sfs-right\">Simulaci\u00F3n</th></tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td class=\"sfs-stack-title\">{{ row.label }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Guardado\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.saved, kind: row.kind }\"></ng-container>\n </td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Simulaci\u00F3n\">\n @if (row.changed) { <span class=\"sfs-tag-before\"><p-tag value=\"Cambia\" severity=\"warn\"></p-tag></span> }\n <span [class.sfs-strong]=\"row.changed\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.simulated, kind: row.kind }\"></ng-container>\n </span>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (!l.viable && l.viabilityReasons.length) {\n <ul class=\"sfs-list sfs-gap-top\">\n @for (reason of l.viabilityReasons; track $index) { <li>{{ reason }}</li> }\n </ul>\n }\n </section>\n\n <!-- Acciones -->\n <div class=\"sfs-actions\">\n @if (canEdit() || capacityEditable()) {\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\"\n [disabled]=\"!pendingChanges() || hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n }\n @if (showSave()) {\n <!-- pButton y no p-button: sin poder guardar el bot\u00F3n queda aria-disabled (no disabled) para que el\n motivo se vea con Tab y con el mouse; openConfirm() corta el clic cuando hay motivo. -->\n <button pButton type=\"button\" label=\"Guardar condiciones\" aria-label=\"Guardar condiciones\"\n [icon]=\"saveUnavailableReason() ? 'pi pi-lock' : 'pi pi-save'\"\n [class.sfs-unavailable]=\"!!saveUnavailableReason()\"\n [attr.aria-disabled]=\"saveUnavailableReason() ? 'true' : null\"\n [attr.aria-describedby]=\"saveUnavailableReason() ? ids.saveReason : null\"\n [pTooltip]=\"saveUnavailableReason() ?? ''\" [tooltipDisabled]=\"!saveUnavailableReason()\" tooltipPosition=\"top\" tooltipEvent=\"both\"\n (click)=\"openConfirm()\"></button>\n @if (saveUnavailableReason()) {\n <span [id]=\"ids.saveReason\" class=\"sfs-sr-only\">{{ saveUnavailableReason() }}</span>\n }\n }\n </div>\n }\n }\n }\n }\n</div>\n\n<!-- Siempre montada: anuncia el resultado de cada simulaci\u00F3n (la de arriba se destruye mientras carga). -->\n<div class=\"sfs-sr-only\" role=\"status\" aria-live=\"polite\">{{ liveMessage() }}</div>\n\n<!-- Un valor de la comparaci\u00F3n, en su formato -->\n<ng-template #valueTpl let-value let-kind=\"kind\">\n @if (value === null || value === undefined || value === '') { \u2014 }\n @else {\n @switch (kind) {\n @case ('money') { {{ value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }} }\n @case ('rate') { {{ value | number: '1.0-4' : locale }} % M.V. }\n @case ('term') { {{ value }} cuotas }\n @default { {{ value }} }\n }\n }\n</ng-template>\n\n<!-- Confirmaci\u00F3n: cambia l\u00EDnea, monto, plazo y cargos de la solicitud -->\n<p-dialog header=\"Guardar condiciones\" [visible]=\"confirmVisible()\" (visibleChange)=\"confirmVisible.set($event)\" (onHide)=\"restoreConfirmFocus()\"\n [modal]=\"true\" [draggable]=\"false\" [closable]=\"!saving()\" [style]=\"{ width: '32rem', maxWidth: '95vw' }\">\n @if (confirmVisible() && line(); as l) {\n <p class=\"sfs-no-top\">\n Se guardar\u00E1n la l\u00EDnea <strong>{{ l.lineName || l.line }}</strong>,\n un monto de <strong>{{ l.amount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>\n a <strong>{{ l.term }} cuotas</strong> con una tasa de <strong>{{ l.rate | number: '1.0-4' : locale }} % M.V.</strong> y una cuota de <strong>{{ l.installment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>,\n con un giro al cliente de <strong>{{ l.transfer | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>.\n </p>\n @if (!l.viable) {\n <p-message severity=\"warn\" text=\"La l\u00EDnea no es viable con la capacidad de pago de la solicitud.\"></p-message>\n }\n }\n <ng-template #footer>\n <p-button label=\"Cancelar\" severity=\"secondary\" [text]=\"true\" [disabled]=\"saving()\" (onClick)=\"confirmVisible.set(false)\"></p-button>\n <p-button label=\"Guardar condiciones\" icon=\"pi pi-save\" [loading]=\"saving()\" (onClick)=\"confirmSave()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}@media (max-width: 575px){:host ::ng-deep .sfs-stack-table .p-datatable-table-container{overflow:visible!important}:host ::ng-deep .sfs-stack-table table,:host ::ng-deep .sfs-stack-table tbody{display:block;width:100%}:host ::ng-deep .sfs-stack-table thead{display:block!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}:host ::ng-deep .sfs-stack-table tbody tr{display:flex;flex-direction:column;margin-bottom:.5rem;padding:.5rem .75rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-content-border-radius, 6px)}:host ::ng-deep .sfs-stack-table tbody td{display:flex;align-items:center;justify-content:flex-end;gap:.375rem;padding:.3rem 0;border:0;text-align:right}:host ::ng-deep .sfs-stack-table tbody td[data-label]:before{content:attr(data-label);margin-right:auto;padding-right:1rem;color:var(--p-text-muted-color);text-align:left}:host ::ng-deep .sfs-stack-table tbody td.sfs-stack-title{order:-1;display:block;font-weight:600;text-align:left}:host ::ng-deep .sfs-stack-table tfoot,:host ::ng-deep .sfs-stack-table .sfs-stack-hide{display:none}}\n", ".sfs-control{display:flex;flex-direction:column;gap:.25rem;min-width:0}.sfs-control--check{flex-direction:row;align-items:center;gap:.5rem;align-self:end;min-height:2.75rem}.sfs-capacity-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem}@media (min-width: 576px){.sfs-capacity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}.sfs-conditions{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem;align-items:end}@media (min-width: 576px){.sfs-conditions{grid-template-columns:repeat(2,minmax(0,1fr))}.sfs-conditions__line{grid-column:1 / -1}}@media (min-width: 992px){.sfs-conditions{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) max-content}.sfs-conditions__line{grid-column:auto}}.sfs-conditions__rate{justify-content:flex-end;min-height:2.5rem;padding-bottom:.5rem}.sfs-metrics{display:grid;grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr));gap:.5rem 1rem;margin:0}.sfs-metrics dt{font-size:.8125rem;color:var(--p-text-muted-color)}.sfs-metrics dd{margin:0;font-variant-numeric:tabular-nums}.sfs-no-gap{margin-top:-.75rem}.sfs-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}.sfs-list{margin:0;padding-left:1rem}.sfs-gap-top{margin-top:.5rem}.sfs-gap-bottom{margin-bottom:.5rem}.sfs-no-top{margin-top:0}.sfs-tag-before{margin-right:.5rem}:host ::ng-deep .sfs-charge-input{width:6.5rem;padding-block:.25rem;text-align:right}:host ::ng-deep .sfs-unavailable.p-button{opacity:var(--p-disabled-opacity);cursor:default}:host ::ng-deep .sfs-unavailable.p-button:hover,:host ::ng-deep .sfs-unavailable.p-button:active{background:var(--button-color, var(--p-button-primary-background));border-color:var(--button-color, var(--p-button-primary-border-color))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i4$1.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: i5$1.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: InputNumberModule }, { kind: "component", type: i6$1.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled", "fluid"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i8.Select, selector: "p-select", 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", "size", "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: SkeletonModule }, { kind: "component", type: i5.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i7.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i12.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
646
646
  }
647
647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LineSimulatorComponent, decorators: [{
648
648
  type: Component,
@@ -659,7 +659,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
659
659
  TableModule,
660
660
  TagModule,
661
661
  TooltipModule
662
- ], template: "<div class=\"sfs-stack\">\n <!-- Capacidad de pago -->\n <section [attr.aria-labelledby]=\"ids.capacityTitle\">\n <h3 [id]=\"ids.capacityTitle\" class=\"sfs-subtitle sfs-gap-bottom\">Capacidad de pago</h3>\n @if (capacityEditable()) {\n <div class=\"sfs-capacity-grid\">\n @for (field of capacityFields; track field.key) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.capacity + field.key\">{{ field.label }}</label>\n <p-inputnumber [inputId]=\"ids.capacity + field.key\" [ngModel]=\"currentCapacity()[field.key]\" (ngModelChange)=\"setCapacity(field.key, $event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\" [fluid]=\"true\"></p-inputnumber>\n </div>\n }\n <div class=\"sfs-control sfs-control--check\">\n <p-checkbox [inputId]=\"ids.garnishment\" [binary]=\"true\" [ngModel]=\"currentCapacity().hasGarnishment\" (ngModelChange)=\"setGarnishment($event)\"></p-checkbox>\n <label [for]=\"ids.garnishment\">Tiene embargo</label>\n </div>\n </div>\n }\n <!-- Indicadores en grilla: varios por fila en escritorio, para que la capacidad no ocupe media pantalla. -->\n @if (!capacityEditable() || simulation()) {\n <dl class=\"sfs-metrics\" [class.sfs-gap-top]=\"capacityEditable()\">\n @if (!capacityEditable()) {\n <div><dt>Ingresos</dt><dd>{{ capacity().income | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Descuentos de ley</dt><dd>{{ capacity().legalDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otras afiliaciones</dt><dd>{{ capacity().otherAffiliations | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otros descuentos</dt><dd>{{ capacity().otherDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Compras de cartera</dt><dd>{{ capacity().purchasesValue | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Embargo</dt><dd>{{ capacity().hasGarnishment ? 'S\u00ED' : 'No' }}</dd></div>\n }\n @if (simulation(); as s) {\n <div><dt>Cuota disponible</dt><dd class=\"sfs-strong\">{{ s.capacity.availableInstallment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Monto m\u00E1ximo</dt><dd class=\"sfs-strong\">{{ s.capacity.maxAmount != null ? (s.capacity.maxAmount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) : '\u2014' }}</dd></div>\n }\n </dl>\n }\n </section>\n\n @switch (state()) {\n @case ('loading') {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"12rem\"></p-skeleton>\n </div>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>{{ errorMessage() || 'No se pudo simular la solicitud.' }}</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retrySimulation()\"></p-button>\n </div>\n </p-message>\n @if (capacityEditable() && pendingChanges()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n }\n }\n @case ('idle') {\n @if (capacityEditable()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Simular\" icon=\"pi pi-calculator\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n } @else {\n <p class=\"sfs-muted sfs-no-top\">Todav\u00EDa no hay una simulaci\u00F3n para esta solicitud.</p>\n }\n }\n @case ('ready') {\n @if (simulation()?.warnings?.length) {\n <p-message severity=\"warn\">\n <ul class=\"sfs-list\">\n @for (w of simulation()?.warnings ?? []; track $index) { <li>{{ w }}</li> }\n </ul>\n </p-message>\n }\n\n @if (!lineOptions().length) {\n <p-message severity=\"info\" text=\"El simulador no devolvi\u00F3 l\u00EDneas para esta solicitud. Revise la pagadur\u00EDa, el producto y la capacidad de pago.\"></p-message>\n }\n\n <!-- L\u00EDnea, plazo, monto y tasa en una sola fila en escritorio. p-select pone el inputId en un span: el nombre\n accesible va por ariaLabelledBy. -->\n <div class=\"sfs-conditions\">\n <div class=\"sfs-control sfs-conditions__line\">\n <label [id]=\"ids.lineLabel\" [for]=\"ids.line\" class=\"sfs-strong\">L\u00EDnea</label>\n <p-select [inputId]=\"ids.line\" [ariaLabelledBy]=\"ids.lineLabel\" [options]=\"lineOptions()\" optionLabel=\"label\" optionValue=\"value\" optionDisabled=\"disabled\"\n [ngModel]=\"selectedLine()\" (ngModelChange)=\"chooseLine($event)\" placeholder=\"Seleccione una l\u00EDnea\" [fluid]=\"true\"></p-select>\n </div>\n @if (line(); as l) {\n @if (!l.error) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.term\">Plazo (cuotas)</label>\n <p-inputnumber [inputId]=\"ids.term\" [ngModel]=\"termInput()\" (ngModelChange)=\"termInput.set($event)\"\n [min]=\"simulation()?.minTerm ?? 1\" [max]=\"simulation()?.maxTerm ?? 600\" [useGrouping]=\"false\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control\">\n <label [for]=\"ids.amount\">Monto</label>\n <p-inputnumber [inputId]=\"ids.amount\" [ngModel]=\"amountInput()\" (ngModelChange)=\"amountInput.set($event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control sfs-conditions__rate\">\n <span>Tasa</span>\n <span class=\"sfs-strong\">{{ l.rate | number: '1.0-4' : locale }} % M.V.</span>\n </div>\n }\n }\n </div>\n @if (saved()?.line && saved()?.line !== selectedLine()) {\n <small class=\"sfs-muted sfs-no-gap\">La l\u00EDnea guardada es {{ savedLineName() }}. Al guardar se cambia por la elegida.</small>\n }\n\n @if (line(); as l) {\n @if (l.error) {\n <p-message severity=\"error\" text=\"Esta l\u00EDnea no se pudo simular. Elija otra o intente m\u00E1s tarde.\"></p-message>\n } @else {\n <!-- Cargos de la l\u00EDnea, con lo guardado al lado -->\n <p-table [value]=\"visibleChargeRows()\" size=\"small\" [scrollable]=\"true\" dataKey=\"name\">\n <ng-template #header>\n <tr>\n <th>Cargo</th>\n <th>Tipo</th>\n <th class=\"sfs-right\">Guardado</th>\n <th class=\"sfs-right\">Configurado</th>\n <th class=\"sfs-right\">Valor</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td>{{ row.label }}</td>\n <td>{{ chargeTypeLabel(row.type) }}</td>\n <td class=\"sfs-right sfs-nowrap\">\n @if (row.savedInput === null) { \u2014 }\n @else { {{ row.percentage ? (row.savedInput | number: '1.0-4' : locale) + ' %' : (row.savedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }} }\n </td>\n <td class=\"sfs-right\">\n @if (row.editable) {\n <label [for]=\"row.id\" class=\"sfs-sr-only\">{{ row.label }}</label>\n <p-inputnumber [inputId]=\"row.id\" [ngModel]=\"chargeInputs()[row.name]\" (ngModelChange)=\"setChargeInput(row.name, $event)\"\n [min]=\"0\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"row.percentage ? 4 : 0\" [locale]=\"locale\"\n [suffix]=\"row.percentage ? ' %' : ''\" [prefix]=\"row.percentage ? '' : '$ '\" inputStyleClass=\"sfs-charge-input\"></p-inputnumber>\n } @else {\n {{ row.percentage ? (row.simulatedInput | number: '1.0-4' : locale) + ' %' : (row.simulatedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }}\n }\n </td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La l\u00EDnea no tiene cargos.</td></tr>\n </ng-template>\n </p-table>\n @if (zeroChargesCount()) {\n <!-- Los cargos en cero (sin guardado, sin configurado y sin valor) ocupan espacio y no cambian nada. -->\n <div class=\"sfs-no-gap\">\n <p-button [label]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver ' + zeroChargesCount() + (zeroChargesCount() === 1 ? ' cargo en cero' : ' cargos en cero')\"\n [icon]=\"showZeroCharges() ? 'pi pi-eye-slash' : 'pi pi-eye'\" [text]=\"true\" size=\"small\" severity=\"secondary\"\n [ariaLabel]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver los cargos en cero'\"\n (onClick)=\"showZeroCharges.set(!showZeroCharges())\"></p-button>\n </div>\n }\n\n <!-- Resultado frente a lo guardado -->\n <section [attr.aria-labelledby]=\"ids.resultTitle\">\n <div class=\"sfs-head\">\n <h3 [id]=\"ids.resultTitle\" class=\"sfs-subtitle\">Resultado</h3>\n <p-tag [value]=\"l.viable ? 'Viable' : 'No viable'\" [severity]=\"l.viable ? 'success' : 'warn'\"></p-tag>\n </div>\n <p-table [value]=\"comparison()\" size=\"small\" [scrollable]=\"true\" dataKey=\"label\">\n <ng-template #header>\n <tr><th>Concepto</th><th class=\"sfs-right\">Guardado</th><th class=\"sfs-right\">Simulaci\u00F3n</th></tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td>{{ row.label }}</td>\n <td class=\"sfs-right sfs-nowrap\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.saved, kind: row.kind }\"></ng-container>\n </td>\n <td class=\"sfs-right sfs-nowrap\">\n @if (row.changed) { <span class=\"sfs-tag-before\"><p-tag value=\"Cambia\" severity=\"warn\"></p-tag></span> }\n <span [class.sfs-strong]=\"row.changed\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.simulated, kind: row.kind }\"></ng-container>\n </span>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (!l.viable && l.viabilityReasons.length) {\n <ul class=\"sfs-list sfs-gap-top\">\n @for (reason of l.viabilityReasons; track $index) { <li>{{ reason }}</li> }\n </ul>\n }\n </section>\n\n <!-- Acciones -->\n <div class=\"sfs-actions\">\n @if (canEdit() || capacityEditable()) {\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\"\n [disabled]=\"!pendingChanges() || hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n }\n @if (showSave()) {\n <!-- pButton y no p-button: sin poder guardar el bot\u00F3n queda aria-disabled (no disabled) para que el\n motivo se vea con Tab y con el mouse; openConfirm() corta el clic cuando hay motivo. -->\n <button pButton type=\"button\" label=\"Guardar condiciones\" aria-label=\"Guardar condiciones\"\n [icon]=\"saveUnavailableReason() ? 'pi pi-lock' : 'pi pi-save'\"\n [class.sfs-unavailable]=\"!!saveUnavailableReason()\"\n [attr.aria-disabled]=\"saveUnavailableReason() ? 'true' : null\"\n [attr.aria-describedby]=\"saveUnavailableReason() ? ids.saveReason : null\"\n [pTooltip]=\"saveUnavailableReason() ?? ''\" [tooltipDisabled]=\"!saveUnavailableReason()\" tooltipPosition=\"top\" tooltipEvent=\"both\"\n (click)=\"openConfirm()\"></button>\n @if (saveUnavailableReason()) {\n <span [id]=\"ids.saveReason\" class=\"sfs-sr-only\">{{ saveUnavailableReason() }}</span>\n }\n }\n </div>\n }\n }\n }\n }\n</div>\n\n<!-- Siempre montada: anuncia el resultado de cada simulaci\u00F3n (la de arriba se destruye mientras carga). -->\n<div class=\"sfs-sr-only\" role=\"status\" aria-live=\"polite\">{{ liveMessage() }}</div>\n\n<!-- Un valor de la comparaci\u00F3n, en su formato -->\n<ng-template #valueTpl let-value let-kind=\"kind\">\n @if (value === null || value === undefined || value === '') { \u2014 }\n @else {\n @switch (kind) {\n @case ('money') { {{ value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }} }\n @case ('rate') { {{ value | number: '1.0-4' : locale }} % M.V. }\n @case ('term') { {{ value }} cuotas }\n @default { {{ value }} }\n }\n }\n</ng-template>\n\n<!-- Confirmaci\u00F3n: cambia l\u00EDnea, monto, plazo y cargos de la solicitud -->\n<p-dialog header=\"Guardar condiciones\" [visible]=\"confirmVisible()\" (visibleChange)=\"confirmVisible.set($event)\" (onHide)=\"restoreConfirmFocus()\"\n [modal]=\"true\" [draggable]=\"false\" [closable]=\"!saving()\" [style]=\"{ width: '32rem', maxWidth: '95vw' }\">\n @if (confirmVisible() && line(); as l) {\n <p class=\"sfs-no-top\">\n Se guardar\u00E1n la l\u00EDnea <strong>{{ l.lineName || l.line }}</strong>,\n un monto de <strong>{{ l.amount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>\n a <strong>{{ l.term }} cuotas</strong> con una tasa de <strong>{{ l.rate | number: '1.0-4' : locale }} % M.V.</strong> y una cuota de <strong>{{ l.installment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>,\n con un giro al cliente de <strong>{{ l.transfer | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>.\n </p>\n @if (!l.viable) {\n <p-message severity=\"warn\" text=\"La l\u00EDnea no es viable con la capacidad de pago de la solicitud.\"></p-message>\n }\n }\n <ng-template #footer>\n <p-button label=\"Cancelar\" severity=\"secondary\" [text]=\"true\" [disabled]=\"saving()\" (onClick)=\"confirmVisible.set(false)\"></p-button>\n <p-button label=\"Guardar condiciones\" icon=\"pi pi-save\" [loading]=\"saving()\" (onClick)=\"confirmSave()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}\n", ".sfs-control{display:flex;flex-direction:column;gap:.25rem;min-width:0}.sfs-control--check{flex-direction:row;align-items:center;gap:.5rem;align-self:end;min-height:2.75rem}.sfs-capacity-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem}@media (min-width: 576px){.sfs-capacity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}.sfs-conditions{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem;align-items:end}@media (min-width: 576px){.sfs-conditions{grid-template-columns:repeat(2,minmax(0,1fr))}.sfs-conditions__line{grid-column:1 / -1}}@media (min-width: 992px){.sfs-conditions{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) max-content}.sfs-conditions__line{grid-column:auto}}.sfs-conditions__rate{justify-content:flex-end;min-height:2.5rem;padding-bottom:.5rem}.sfs-metrics{display:grid;grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr));gap:.5rem 1rem;margin:0}.sfs-metrics dt{font-size:.8125rem;color:var(--p-text-muted-color)}.sfs-metrics dd{margin:0;font-variant-numeric:tabular-nums}.sfs-no-gap{margin-top:-.75rem}.sfs-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}.sfs-list{margin:0;padding-left:1rem}.sfs-gap-top{margin-top:.5rem}.sfs-gap-bottom{margin-bottom:.5rem}.sfs-no-top{margin-top:0}.sfs-tag-before{margin-right:.5rem}:host ::ng-deep .sfs-charge-input{width:6.5rem;padding-block:.25rem;text-align:right}:host ::ng-deep .sfs-unavailable.p-button{opacity:var(--p-disabled-opacity);cursor:default}:host ::ng-deep .sfs-unavailable.p-button:hover,:host ::ng-deep .sfs-unavailable.p-button:active{background:var(--button-color, var(--p-button-primary-background));border-color:var(--button-color, var(--p-button-primary-border-color))}\n"] }]
662
+ ], template: "<div class=\"sfs-stack\">\n <!-- Capacidad de pago -->\n <section [attr.aria-labelledby]=\"ids.capacityTitle\">\n <h3 [id]=\"ids.capacityTitle\" class=\"sfs-subtitle sfs-gap-bottom\">Capacidad de pago</h3>\n @if (capacityEditable()) {\n <div class=\"sfs-capacity-grid\">\n @for (field of capacityFields; track field.key) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.capacity + field.key\">{{ field.label }}</label>\n <p-inputnumber [inputId]=\"ids.capacity + field.key\" [ngModel]=\"currentCapacity()[field.key]\" (ngModelChange)=\"setCapacity(field.key, $event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\" [fluid]=\"true\"></p-inputnumber>\n </div>\n }\n <div class=\"sfs-control sfs-control--check\">\n <p-checkbox [inputId]=\"ids.garnishment\" [binary]=\"true\" [ngModel]=\"currentCapacity().hasGarnishment\" (ngModelChange)=\"setGarnishment($event)\"></p-checkbox>\n <label [for]=\"ids.garnishment\">Tiene embargo</label>\n </div>\n </div>\n }\n <!-- Indicadores en grilla: varios por fila en escritorio, para que la capacidad no ocupe media pantalla. -->\n @if (!capacityEditable() || simulation()) {\n <dl class=\"sfs-metrics\" [class.sfs-gap-top]=\"capacityEditable()\">\n @if (!capacityEditable()) {\n <div><dt>Ingresos</dt><dd>{{ capacity().income | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Descuentos de ley</dt><dd>{{ capacity().legalDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otras afiliaciones</dt><dd>{{ capacity().otherAffiliations | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Otros descuentos</dt><dd>{{ capacity().otherDeductions | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Compras de cartera</dt><dd>{{ capacity().purchasesValue | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Embargo</dt><dd>{{ capacity().hasGarnishment ? 'S\u00ED' : 'No' }}</dd></div>\n }\n @if (simulation(); as s) {\n <div><dt>Cuota disponible</dt><dd class=\"sfs-strong\">{{ s.capacity.availableInstallment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</dd></div>\n <div><dt>Monto m\u00E1ximo</dt><dd class=\"sfs-strong\">{{ s.capacity.maxAmount != null ? (s.capacity.maxAmount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) : '\u2014' }}</dd></div>\n }\n </dl>\n }\n </section>\n\n @switch (state()) {\n @case ('loading') {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"12rem\"></p-skeleton>\n </div>\n }\n @case ('error') {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>{{ errorMessage() || 'No se pudo simular la solicitud.' }}</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retrySimulation()\"></p-button>\n </div>\n </p-message>\n @if (capacityEditable() && pendingChanges()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n }\n }\n @case ('idle') {\n @if (capacityEditable()) {\n <div class=\"sfs-actions\">\n <p-button label=\"Simular\" icon=\"pi pi-calculator\" [disabled]=\"hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n </div>\n } @else {\n <p class=\"sfs-muted sfs-no-top\">Todav\u00EDa no hay una simulaci\u00F3n para esta solicitud.</p>\n }\n }\n @case ('ready') {\n @if (simulation()?.warnings?.length) {\n <p-message severity=\"warn\">\n <ul class=\"sfs-list\">\n @for (w of simulation()?.warnings ?? []; track $index) { <li>{{ w }}</li> }\n </ul>\n </p-message>\n }\n\n @if (!lineOptions().length) {\n <p-message severity=\"info\" text=\"El simulador no devolvi\u00F3 l\u00EDneas para esta solicitud. Revise la pagadur\u00EDa, el producto y la capacidad de pago.\"></p-message>\n }\n\n <!-- L\u00EDnea, plazo, monto y tasa en una sola fila en escritorio. p-select pone el inputId en un span: el nombre\n accesible va por ariaLabelledBy. -->\n <div class=\"sfs-conditions\">\n <div class=\"sfs-control sfs-conditions__line\">\n <label [id]=\"ids.lineLabel\" [for]=\"ids.line\" class=\"sfs-strong\">L\u00EDnea</label>\n <p-select [inputId]=\"ids.line\" [ariaLabelledBy]=\"ids.lineLabel\" [options]=\"lineOptions()\" optionLabel=\"label\" optionValue=\"value\" optionDisabled=\"disabled\"\n [ngModel]=\"selectedLine()\" (ngModelChange)=\"chooseLine($event)\" placeholder=\"Seleccione una l\u00EDnea\" [fluid]=\"true\"></p-select>\n </div>\n @if (line(); as l) {\n @if (!l.error) {\n <div class=\"sfs-control\">\n <label [for]=\"ids.term\">Plazo (cuotas)</label>\n <p-inputnumber [inputId]=\"ids.term\" [ngModel]=\"termInput()\" (ngModelChange)=\"termInput.set($event)\"\n [min]=\"simulation()?.minTerm ?? 1\" [max]=\"simulation()?.maxTerm ?? 600\" [useGrouping]=\"false\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control\">\n <label [for]=\"ids.amount\">Monto</label>\n <p-inputnumber [inputId]=\"ids.amount\" [ngModel]=\"amountInput()\" (ngModelChange)=\"amountInput.set($event)\"\n mode=\"currency\" currency=\"COP\" [locale]=\"locale\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"0\" [min]=\"0\"\n [disabled]=\"!canEdit()\" [fluid]=\"true\"></p-inputnumber>\n </div>\n <div class=\"sfs-control sfs-conditions__rate\">\n <span>Tasa</span>\n <span class=\"sfs-strong\">{{ l.rate | number: '1.0-4' : locale }} % M.V.</span>\n </div>\n }\n }\n </div>\n @if (saved()?.line && saved()?.line !== selectedLine()) {\n <small class=\"sfs-muted sfs-no-gap\">La l\u00EDnea guardada es {{ savedLineName() }}. Al guardar se cambia por la elegida.</small>\n }\n\n @if (line(); as l) {\n @if (l.error) {\n <p-message severity=\"error\" text=\"Esta l\u00EDnea no se pudo simular. Elija otra o intente m\u00E1s tarde.\"></p-message>\n } @else {\n <!-- Cargos de la l\u00EDnea, con lo guardado al lado -->\n <p-table [value]=\"visibleChargeRows()\" size=\"small\" [scrollable]=\"true\" dataKey=\"name\" styleClass=\"sfs-stack-table\">\n <ng-template #header>\n <tr>\n <th>Cargo</th>\n <th>Tipo</th>\n <th class=\"sfs-right\">Guardado</th>\n <th class=\"sfs-right\">Configurado</th>\n <th class=\"sfs-right\">Valor</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td class=\"sfs-stack-title\">{{ row.label }}</td>\n <td data-label=\"Tipo\">{{ chargeTypeLabel(row.type) }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Guardado\">\n @if (row.savedInput === null) { \u2014 }\n @else { {{ row.percentage ? (row.savedInput | number: '1.0-4' : locale) + ' %' : (row.savedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }} }\n </td>\n <td class=\"sfs-right\" data-label=\"Configurado\">\n @if (row.editable) {\n <label [for]=\"row.id\" class=\"sfs-sr-only\">{{ row.label }}</label>\n <p-inputnumber [inputId]=\"row.id\" [ngModel]=\"chargeInputs()[row.name]\" (ngModelChange)=\"setChargeInput(row.name, $event)\"\n [min]=\"0\" [minFractionDigits]=\"0\" [maxFractionDigits]=\"row.percentage ? 4 : 0\" [locale]=\"locale\"\n [suffix]=\"row.percentage ? ' %' : ''\" [prefix]=\"row.percentage ? '' : '$ '\" inputStyleClass=\"sfs-charge-input\"></p-inputnumber>\n } @else {\n {{ row.percentage ? (row.simulatedInput | number: '1.0-4' : locale) + ' %' : (row.simulatedInput | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale) }}\n }\n </td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Valor\">{{ row.value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"5\">La l\u00EDnea no tiene cargos.</td></tr>\n </ng-template>\n </p-table>\n @if (zeroChargesCount()) {\n <!-- Los cargos en cero (sin guardado, sin configurado y sin valor) ocupan espacio y no cambian nada. -->\n <div class=\"sfs-no-gap\">\n <p-button [label]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver ' + zeroChargesCount() + (zeroChargesCount() === 1 ? ' cargo en cero' : ' cargos en cero')\"\n [icon]=\"showZeroCharges() ? 'pi pi-eye-slash' : 'pi pi-eye'\" [text]=\"true\" size=\"small\" severity=\"secondary\"\n [ariaLabel]=\"showZeroCharges() ? 'Ocultar los cargos en cero' : 'Ver los cargos en cero'\"\n (onClick)=\"showZeroCharges.set(!showZeroCharges())\"></p-button>\n </div>\n }\n\n <!-- Resultado frente a lo guardado -->\n <section [attr.aria-labelledby]=\"ids.resultTitle\">\n <div class=\"sfs-head\">\n <h3 [id]=\"ids.resultTitle\" class=\"sfs-subtitle\">Resultado</h3>\n <p-tag [value]=\"l.viable ? 'Viable' : 'No viable'\" [severity]=\"l.viable ? 'success' : 'warn'\"></p-tag>\n </div>\n <p-table [value]=\"comparison()\" size=\"small\" [scrollable]=\"true\" dataKey=\"label\" styleClass=\"sfs-stack-table\">\n <ng-template #header>\n <tr><th>Concepto</th><th class=\"sfs-right\">Guardado</th><th class=\"sfs-right\">Simulaci\u00F3n</th></tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td class=\"sfs-stack-title\">{{ row.label }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Guardado\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.saved, kind: row.kind }\"></ng-container>\n </td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Simulaci\u00F3n\">\n @if (row.changed) { <span class=\"sfs-tag-before\"><p-tag value=\"Cambia\" severity=\"warn\"></p-tag></span> }\n <span [class.sfs-strong]=\"row.changed\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: row.simulated, kind: row.kind }\"></ng-container>\n </span>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (!l.viable && l.viabilityReasons.length) {\n <ul class=\"sfs-list sfs-gap-top\">\n @for (reason of l.viabilityReasons; track $index) { <li>{{ reason }}</li> }\n </ul>\n }\n </section>\n\n <!-- Acciones -->\n <div class=\"sfs-actions\">\n @if (canEdit() || capacityEditable()) {\n <p-button label=\"Recalcular\" icon=\"pi pi-calculator\" severity=\"secondary\" [text]=\"true\"\n [disabled]=\"!pendingChanges() || hasNegativeInput()\" (onClick)=\"recalculate()\"></p-button>\n }\n @if (showSave()) {\n <!-- pButton y no p-button: sin poder guardar el bot\u00F3n queda aria-disabled (no disabled) para que el\n motivo se vea con Tab y con el mouse; openConfirm() corta el clic cuando hay motivo. -->\n <button pButton type=\"button\" label=\"Guardar condiciones\" aria-label=\"Guardar condiciones\"\n [icon]=\"saveUnavailableReason() ? 'pi pi-lock' : 'pi pi-save'\"\n [class.sfs-unavailable]=\"!!saveUnavailableReason()\"\n [attr.aria-disabled]=\"saveUnavailableReason() ? 'true' : null\"\n [attr.aria-describedby]=\"saveUnavailableReason() ? ids.saveReason : null\"\n [pTooltip]=\"saveUnavailableReason() ?? ''\" [tooltipDisabled]=\"!saveUnavailableReason()\" tooltipPosition=\"top\" tooltipEvent=\"both\"\n (click)=\"openConfirm()\"></button>\n @if (saveUnavailableReason()) {\n <span [id]=\"ids.saveReason\" class=\"sfs-sr-only\">{{ saveUnavailableReason() }}</span>\n }\n }\n </div>\n }\n }\n }\n }\n</div>\n\n<!-- Siempre montada: anuncia el resultado de cada simulaci\u00F3n (la de arriba se destruye mientras carga). -->\n<div class=\"sfs-sr-only\" role=\"status\" aria-live=\"polite\">{{ liveMessage() }}</div>\n\n<!-- Un valor de la comparaci\u00F3n, en su formato -->\n<ng-template #valueTpl let-value let-kind=\"kind\">\n @if (value === null || value === undefined || value === '') { \u2014 }\n @else {\n @switch (kind) {\n @case ('money') { {{ value | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }} }\n @case ('rate') { {{ value | number: '1.0-4' : locale }} % M.V. }\n @case ('term') { {{ value }} cuotas }\n @default { {{ value }} }\n }\n }\n</ng-template>\n\n<!-- Confirmaci\u00F3n: cambia l\u00EDnea, monto, plazo y cargos de la solicitud -->\n<p-dialog header=\"Guardar condiciones\" [visible]=\"confirmVisible()\" (visibleChange)=\"confirmVisible.set($event)\" (onHide)=\"restoreConfirmFocus()\"\n [modal]=\"true\" [draggable]=\"false\" [closable]=\"!saving()\" [style]=\"{ width: '32rem', maxWidth: '95vw' }\">\n @if (confirmVisible() && line(); as l) {\n <p class=\"sfs-no-top\">\n Se guardar\u00E1n la l\u00EDnea <strong>{{ l.lineName || l.line }}</strong>,\n un monto de <strong>{{ l.amount | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>\n a <strong>{{ l.term }} cuotas</strong> con una tasa de <strong>{{ l.rate | number: '1.0-4' : locale }} % M.V.</strong> y una cuota de <strong>{{ l.installment | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>,\n con un giro al cliente de <strong>{{ l.transfer | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong>.\n </p>\n @if (!l.viable) {\n <p-message severity=\"warn\" text=\"La l\u00EDnea no es viable con la capacidad de pago de la solicitud.\"></p-message>\n }\n }\n <ng-template #footer>\n <p-button label=\"Cancelar\" severity=\"secondary\" [text]=\"true\" [disabled]=\"saving()\" (onClick)=\"confirmVisible.set(false)\"></p-button>\n <p-button label=\"Guardar condiciones\" icon=\"pi pi-save\" [loading]=\"saving()\" (onClick)=\"confirmSave()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}@media (max-width: 575px){:host ::ng-deep .sfs-stack-table .p-datatable-table-container{overflow:visible!important}:host ::ng-deep .sfs-stack-table table,:host ::ng-deep .sfs-stack-table tbody{display:block;width:100%}:host ::ng-deep .sfs-stack-table thead{display:block!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}:host ::ng-deep .sfs-stack-table tbody tr{display:flex;flex-direction:column;margin-bottom:.5rem;padding:.5rem .75rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-content-border-radius, 6px)}:host ::ng-deep .sfs-stack-table tbody td{display:flex;align-items:center;justify-content:flex-end;gap:.375rem;padding:.3rem 0;border:0;text-align:right}:host ::ng-deep .sfs-stack-table tbody td[data-label]:before{content:attr(data-label);margin-right:auto;padding-right:1rem;color:var(--p-text-muted-color);text-align:left}:host ::ng-deep .sfs-stack-table tbody td.sfs-stack-title{order:-1;display:block;font-weight:600;text-align:left}:host ::ng-deep .sfs-stack-table tfoot,:host ::ng-deep .sfs-stack-table .sfs-stack-hide{display:none}}\n", ".sfs-control{display:flex;flex-direction:column;gap:.25rem;min-width:0}.sfs-control--check{flex-direction:row;align-items:center;gap:.5rem;align-self:end;min-height:2.75rem}.sfs-capacity-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem}@media (min-width: 576px){.sfs-capacity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}.sfs-conditions{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem;align-items:end}@media (min-width: 576px){.sfs-conditions{grid-template-columns:repeat(2,minmax(0,1fr))}.sfs-conditions__line{grid-column:1 / -1}}@media (min-width: 992px){.sfs-conditions{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) max-content}.sfs-conditions__line{grid-column:auto}}.sfs-conditions__rate{justify-content:flex-end;min-height:2.5rem;padding-bottom:.5rem}.sfs-metrics{display:grid;grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr));gap:.5rem 1rem;margin:0}.sfs-metrics dt{font-size:.8125rem;color:var(--p-text-muted-color)}.sfs-metrics dd{margin:0;font-variant-numeric:tabular-nums}.sfs-no-gap{margin-top:-.75rem}.sfs-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}.sfs-list{margin:0;padding-left:1rem}.sfs-gap-top{margin-top:.5rem}.sfs-gap-bottom{margin-bottom:.5rem}.sfs-no-top{margin-top:0}.sfs-tag-before{margin-right:.5rem}:host ::ng-deep .sfs-charge-input{width:6.5rem;padding-block:.25rem;text-align:right}:host ::ng-deep .sfs-unavailable.p-button{opacity:var(--p-disabled-opacity);cursor:default}:host ::ng-deep .sfs-unavailable.p-button:hover,:host ::ng-deep .sfs-unavailable.p-button:active{background:var(--button-color, var(--p-button-primary-background));border-color:var(--button-color, var(--p-button-primary-border-color))}\n"] }]
663
663
  }], ctorParameters: () => [] });
664
664
  /** Un valor configurado del core (fracción o pesos) en la unidad de la pantalla (% o pesos). */
665
665
  function toScreenUnit(value, percentage) {
@@ -717,11 +717,11 @@ class DebtBuyoutsComponent {
717
717
  return [row.Entidad, row.NumeroObligacion].filter((part) => !!part?.toString().trim()).join(' ') || `compra ${row.IdPrstmsCC}`;
718
718
  }
719
719
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DebtBuyoutsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
720
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: DebtBuyoutsComponent, isStandalone: true, selector: "lib-debt-buyouts", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, buyouts: { classPropertyName: "buyouts", publicName: "buyouts", isSignal: true, isRequired: false, transformFunction: null }, simulatedValue: { classPropertyName: "simulatedValue", publicName: "simulatedValue", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, saving: { classPropertyName: "saving", publicName: "saving", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { retry: "retry", mark: "mark" }, ngImport: i0, template: "<p-card>\n <div class=\"sfs-head\">\n <h2 class=\"sfs-title\">Compras de cartera</h2>\n @if (!loading() && !failed() && rows().length) {\n <span class=\"sfs-muted\">\n {{ toBuy().length }} de {{ rows().length }} {{ rows().length === 1 ? 'obligaci\u00F3n' : 'obligaciones' }} para comprar\n </span>\n }\n </div>\n\n @if (loading()) {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"8rem\"></p-skeleton>\n </div>\n } @else if (failed()) {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron leer las compras de cartera de la solicitud.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retry.emit()\"></p-button>\n </div>\n </p-message>\n } @else {\n <div class=\"sfs-stack\" [attr.aria-busy]=\"saving() ? 'true' : null\">\n @if (canEdit() && rows().length) {\n <p class=\"sfs-muted\" style=\"margin: 0\">Al marcar \"Comprar\" el valor de compras de cartera del simulador pasa a ser la suma de los saldos marcados y la solicitud se vuelve a simular.</p>\n }\n @if (mismatch()) {\n <p-message severity=\"warn\">\n Las obligaciones marcadas para comprar suman {{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }},\n pero la solicitud se simula con compras de cartera por {{ simulatedValue() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}.\n </p-message>\n }\n\n <p-table [value]=\"rows()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\" dataKey=\"IdPrstmsCC\">\n <ng-template #header>\n <tr>\n <th>Comprar</th>\n <th>Desprendible</th>\n <th>Entidad</th>\n <th>Obligaci\u00F3n</th>\n <th>Origen</th>\n <th>Estado</th>\n <th>Vence</th>\n <th class=\"sfs-right\">Cuota</th>\n <th class=\"sfs-right\">Saldo</th>\n <th class=\"sfs-right\">Mora</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td>\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Comprar\" [disabled]=\"saving()\"\n [ariaLabel]=\"'Comprar ' + rowName(row)\" (onChange)=\"markBuy(row, $event.checked)\"></p-checkbox>\n } @else {\n <p-tag [value]=\"row.Comprar ? 'Comprar' : 'No comprar'\" [severity]=\"row.Comprar ? 'success' : 'secondary'\"></p-tag>\n }\n </td>\n <td>\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Desprendible\" [disabled]=\"saving()\"\n [ariaLabel]=\"rowName(row) + ' aparece en el desprendible'\" (onChange)=\"markPayslip(row, $event.checked)\"></p-checkbox>\n } @else {\n {{ row.Desprendible ? 'S\u00ED' : 'No' }}\n }\n </td>\n <td>\n {{ row.Entidad || '\u2014' }}\n @if (row.NitEntidad) { <br /><small class=\"sfs-muted\">NIT {{ row.NitEntidad }}</small> }\n </td>\n <td>{{ row.NumeroObligacion || '\u2014' }}</td>\n <td>\n {{ row.Buro || '\u2014' }}\n @if (row.Sector) { <br /><small class=\"sfs-muted\">{{ row.Sector }}</small> }\n </td>\n <td>{{ row.EstadoObligacion || '\u2014' }}</td>\n <td class=\"sfs-nowrap\">{{ row.FechaVencimiento || '\u2014' }}</td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.ValorCuota | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.SaldoActual | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.SaldoMora | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #footer>\n @if (rows().length) {\n <tr>\n <td colspan=\"7\" class=\"sfs-strong\">Total para comprar</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ installmentsToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td></td>\n </tr>\n }\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"10\">La solicitud no tiene compras de cartera registradas.</td></tr>\n </ng-template>\n </p-table>\n </div>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i3$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i4$1.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: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i5.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i7.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }] });
720
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: DebtBuyoutsComponent, isStandalone: true, selector: "lib-debt-buyouts", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, buyouts: { classPropertyName: "buyouts", publicName: "buyouts", isSignal: true, isRequired: false, transformFunction: null }, simulatedValue: { classPropertyName: "simulatedValue", publicName: "simulatedValue", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, saving: { classPropertyName: "saving", publicName: "saving", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { retry: "retry", mark: "mark" }, ngImport: i0, template: "<p-card>\n <div class=\"sfs-head\">\n <h2 class=\"sfs-title\">Compras de cartera</h2>\n @if (!loading() && !failed() && rows().length) {\n <span class=\"sfs-muted\">\n {{ toBuy().length }} de {{ rows().length }} {{ rows().length === 1 ? 'obligaci\u00F3n' : 'obligaciones' }} para comprar\n @if (toBuy().length) { \u00B7 <strong>{{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong> }\n </span>\n }\n </div>\n\n @if (loading()) {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"8rem\"></p-skeleton>\n </div>\n } @else if (failed()) {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron leer las compras de cartera de la solicitud.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retry.emit()\"></p-button>\n </div>\n </p-message>\n } @else {\n <div class=\"sfs-stack\" [attr.aria-busy]=\"saving() ? 'true' : null\">\n @if (canEdit() && rows().length) {\n <p class=\"sfs-muted\" style=\"margin: 0\">Al marcar \"Comprar\" el valor de compras de cartera del simulador pasa a ser la suma de los saldos marcados y la solicitud se vuelve a simular.</p>\n }\n @if (mismatch()) {\n <p-message severity=\"warn\">\n Las obligaciones marcadas para comprar suman {{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }},\n pero la solicitud se simula con compras de cartera por {{ simulatedValue() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}.\n </p-message>\n }\n\n <p-table [value]=\"rows()\" styleClass=\"p-datatable-sm sfs-stack-table\" [scrollable]=\"true\" dataKey=\"IdPrstmsCC\">\n <ng-template #header>\n <tr>\n <th>Comprar</th>\n <th>Desprendible</th>\n <th>Entidad</th>\n <th>Obligaci\u00F3n</th>\n <th>Origen</th>\n <th>Estado</th>\n <th>Vence</th>\n <th class=\"sfs-right\">Cuota</th>\n <th class=\"sfs-right\">Saldo</th>\n <th class=\"sfs-right\">Mora</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td data-label=\"Comprar\">\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Comprar\" [disabled]=\"saving()\"\n [ariaLabel]=\"'Comprar ' + rowName(row)\" (onChange)=\"markBuy(row, $event.checked)\"></p-checkbox>\n } @else {\n <p-tag [value]=\"row.Comprar ? 'Comprar' : 'No comprar'\" [severity]=\"row.Comprar ? 'success' : 'secondary'\"></p-tag>\n }\n </td>\n <td data-label=\"Desprendible\">\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Desprendible\" [disabled]=\"saving()\"\n [ariaLabel]=\"rowName(row) + ' aparece en el desprendible'\" (onChange)=\"markPayslip(row, $event.checked)\"></p-checkbox>\n } @else {\n {{ row.Desprendible ? 'S\u00ED' : 'No' }}\n }\n </td>\n <td class=\"sfs-stack-title\">\n {{ row.Entidad || '\u2014' }}\n @if (row.NitEntidad) { <br /><small class=\"sfs-muted\">NIT {{ row.NitEntidad }}</small> }\n </td>\n <td data-label=\"Obligaci\u00F3n\">{{ row.NumeroObligacion || '\u2014' }}</td>\n <td data-label=\"Origen\">\n {{ row.Buro || '\u2014' }}\n @if (row.Sector) { <br /><small class=\"sfs-muted\">{{ row.Sector }}</small> }\n </td>\n <td data-label=\"Estado\">{{ row.EstadoObligacion || '\u2014' }}</td>\n <td class=\"sfs-nowrap\" data-label=\"Vence\">{{ row.FechaVencimiento || '\u2014' }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Cuota\">{{ row.ValorCuota | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Saldo\">{{ row.SaldoActual | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Mora\">{{ row.SaldoMora | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #footer>\n @if (rows().length) {\n <tr class=\"sfs-stack-hide\">\n <td colspan=\"7\" class=\"sfs-strong\">Total para comprar</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ installmentsToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td></td>\n </tr>\n }\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"10\">La solicitud no tiene compras de cartera registradas.</td></tr>\n </ng-template>\n </p-table>\n </div>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}@media (max-width: 575px){:host ::ng-deep .sfs-stack-table .p-datatable-table-container{overflow:visible!important}:host ::ng-deep .sfs-stack-table table,:host ::ng-deep .sfs-stack-table tbody{display:block;width:100%}:host ::ng-deep .sfs-stack-table thead{display:block!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}:host ::ng-deep .sfs-stack-table tbody tr{display:flex;flex-direction:column;margin-bottom:.5rem;padding:.5rem .75rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-content-border-radius, 6px)}:host ::ng-deep .sfs-stack-table tbody td{display:flex;align-items:center;justify-content:flex-end;gap:.375rem;padding:.3rem 0;border:0;text-align:right}:host ::ng-deep .sfs-stack-table tbody td[data-label]:before{content:attr(data-label);margin-right:auto;padding-right:1rem;color:var(--p-text-muted-color);text-align:left}:host ::ng-deep .sfs-stack-table tbody td.sfs-stack-title{order:-1;display:block;font-weight:600;text-align:left}:host ::ng-deep .sfs-stack-table tfoot,:host ::ng-deep .sfs-stack-table .sfs-stack-hide{display:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i3$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i4$1.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: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i5.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i7.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }] });
721
721
  }
722
722
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DebtBuyoutsComponent, decorators: [{
723
723
  type: Component,
724
- args: [{ selector: 'lib-debt-buyouts', imports: [CommonModule, FormsModule, ButtonModule, CardModule, CheckboxModule, MessageModule, SkeletonModule, TableModule, TagModule], template: "<p-card>\n <div class=\"sfs-head\">\n <h2 class=\"sfs-title\">Compras de cartera</h2>\n @if (!loading() && !failed() && rows().length) {\n <span class=\"sfs-muted\">\n {{ toBuy().length }} de {{ rows().length }} {{ rows().length === 1 ? 'obligaci\u00F3n' : 'obligaciones' }} para comprar\n </span>\n }\n </div>\n\n @if (loading()) {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"8rem\"></p-skeleton>\n </div>\n } @else if (failed()) {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron leer las compras de cartera de la solicitud.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retry.emit()\"></p-button>\n </div>\n </p-message>\n } @else {\n <div class=\"sfs-stack\" [attr.aria-busy]=\"saving() ? 'true' : null\">\n @if (canEdit() && rows().length) {\n <p class=\"sfs-muted\" style=\"margin: 0\">Al marcar \"Comprar\" el valor de compras de cartera del simulador pasa a ser la suma de los saldos marcados y la solicitud se vuelve a simular.</p>\n }\n @if (mismatch()) {\n <p-message severity=\"warn\">\n Las obligaciones marcadas para comprar suman {{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }},\n pero la solicitud se simula con compras de cartera por {{ simulatedValue() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}.\n </p-message>\n }\n\n <p-table [value]=\"rows()\" styleClass=\"p-datatable-sm\" [scrollable]=\"true\" dataKey=\"IdPrstmsCC\">\n <ng-template #header>\n <tr>\n <th>Comprar</th>\n <th>Desprendible</th>\n <th>Entidad</th>\n <th>Obligaci\u00F3n</th>\n <th>Origen</th>\n <th>Estado</th>\n <th>Vence</th>\n <th class=\"sfs-right\">Cuota</th>\n <th class=\"sfs-right\">Saldo</th>\n <th class=\"sfs-right\">Mora</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td>\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Comprar\" [disabled]=\"saving()\"\n [ariaLabel]=\"'Comprar ' + rowName(row)\" (onChange)=\"markBuy(row, $event.checked)\"></p-checkbox>\n } @else {\n <p-tag [value]=\"row.Comprar ? 'Comprar' : 'No comprar'\" [severity]=\"row.Comprar ? 'success' : 'secondary'\"></p-tag>\n }\n </td>\n <td>\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Desprendible\" [disabled]=\"saving()\"\n [ariaLabel]=\"rowName(row) + ' aparece en el desprendible'\" (onChange)=\"markPayslip(row, $event.checked)\"></p-checkbox>\n } @else {\n {{ row.Desprendible ? 'S\u00ED' : 'No' }}\n }\n </td>\n <td>\n {{ row.Entidad || '\u2014' }}\n @if (row.NitEntidad) { <br /><small class=\"sfs-muted\">NIT {{ row.NitEntidad }}</small> }\n </td>\n <td>{{ row.NumeroObligacion || '\u2014' }}</td>\n <td>\n {{ row.Buro || '\u2014' }}\n @if (row.Sector) { <br /><small class=\"sfs-muted\">{{ row.Sector }}</small> }\n </td>\n <td>{{ row.EstadoObligacion || '\u2014' }}</td>\n <td class=\"sfs-nowrap\">{{ row.FechaVencimiento || '\u2014' }}</td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.ValorCuota | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.SaldoActual | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\">{{ row.SaldoMora | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #footer>\n @if (rows().length) {\n <tr>\n <td colspan=\"7\" class=\"sfs-strong\">Total para comprar</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ installmentsToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td></td>\n </tr>\n }\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"10\">La solicitud no tiene compras de cartera registradas.</td></tr>\n </ng-template>\n </p-table>\n </div>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}\n"] }]
724
+ args: [{ selector: 'lib-debt-buyouts', imports: [CommonModule, FormsModule, ButtonModule, CardModule, CheckboxModule, MessageModule, SkeletonModule, TableModule, TagModule], template: "<p-card>\n <div class=\"sfs-head\">\n <h2 class=\"sfs-title\">Compras de cartera</h2>\n @if (!loading() && !failed() && rows().length) {\n <span class=\"sfs-muted\">\n {{ toBuy().length }} de {{ rows().length }} {{ rows().length === 1 ? 'obligaci\u00F3n' : 'obligaciones' }} para comprar\n @if (toBuy().length) { \u00B7 <strong>{{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</strong> }\n </span>\n }\n </div>\n\n @if (loading()) {\n <div class=\"sfs-stack\" aria-busy=\"true\">\n <p-skeleton height=\"2.5rem\"></p-skeleton>\n <p-skeleton height=\"8rem\"></p-skeleton>\n </div>\n } @else if (failed()) {\n <p-message severity=\"error\">\n <div class=\"sfs-inline\">\n <span>No se pudieron leer las compras de cartera de la solicitud.</span>\n <p-button label=\"Reintentar\" icon=\"pi pi-refresh\" [text]=\"true\" (onClick)=\"retry.emit()\"></p-button>\n </div>\n </p-message>\n } @else {\n <div class=\"sfs-stack\" [attr.aria-busy]=\"saving() ? 'true' : null\">\n @if (canEdit() && rows().length) {\n <p class=\"sfs-muted\" style=\"margin: 0\">Al marcar \"Comprar\" el valor de compras de cartera del simulador pasa a ser la suma de los saldos marcados y la solicitud se vuelve a simular.</p>\n }\n @if (mismatch()) {\n <p-message severity=\"warn\">\n Las obligaciones marcadas para comprar suman {{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }},\n pero la solicitud se simula con compras de cartera por {{ simulatedValue() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}.\n </p-message>\n }\n\n <p-table [value]=\"rows()\" styleClass=\"p-datatable-sm sfs-stack-table\" [scrollable]=\"true\" dataKey=\"IdPrstmsCC\">\n <ng-template #header>\n <tr>\n <th>Comprar</th>\n <th>Desprendible</th>\n <th>Entidad</th>\n <th>Obligaci\u00F3n</th>\n <th>Origen</th>\n <th>Estado</th>\n <th>Vence</th>\n <th class=\"sfs-right\">Cuota</th>\n <th class=\"sfs-right\">Saldo</th>\n <th class=\"sfs-right\">Mora</th>\n </tr>\n </ng-template>\n <ng-template #body let-row>\n <tr>\n <td data-label=\"Comprar\">\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Comprar\" [disabled]=\"saving()\"\n [ariaLabel]=\"'Comprar ' + rowName(row)\" (onChange)=\"markBuy(row, $event.checked)\"></p-checkbox>\n } @else {\n <p-tag [value]=\"row.Comprar ? 'Comprar' : 'No comprar'\" [severity]=\"row.Comprar ? 'success' : 'secondary'\"></p-tag>\n }\n </td>\n <td data-label=\"Desprendible\">\n @if (canEdit()) {\n <p-checkbox [binary]=\"true\" [ngModel]=\"row.Desprendible\" [disabled]=\"saving()\"\n [ariaLabel]=\"rowName(row) + ' aparece en el desprendible'\" (onChange)=\"markPayslip(row, $event.checked)\"></p-checkbox>\n } @else {\n {{ row.Desprendible ? 'S\u00ED' : 'No' }}\n }\n </td>\n <td class=\"sfs-stack-title\">\n {{ row.Entidad || '\u2014' }}\n @if (row.NitEntidad) { <br /><small class=\"sfs-muted\">NIT {{ row.NitEntidad }}</small> }\n </td>\n <td data-label=\"Obligaci\u00F3n\">{{ row.NumeroObligacion || '\u2014' }}</td>\n <td data-label=\"Origen\">\n {{ row.Buro || '\u2014' }}\n @if (row.Sector) { <br /><small class=\"sfs-muted\">{{ row.Sector }}</small> }\n </td>\n <td data-label=\"Estado\">{{ row.EstadoObligacion || '\u2014' }}</td>\n <td class=\"sfs-nowrap\" data-label=\"Vence\">{{ row.FechaVencimiento || '\u2014' }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Cuota\">{{ row.ValorCuota | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Saldo\">{{ row.SaldoActual | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap\" data-label=\"Mora\">{{ row.SaldoMora | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n </tr>\n </ng-template>\n <ng-template #footer>\n @if (rows().length) {\n <tr class=\"sfs-stack-hide\">\n <td colspan=\"7\" class=\"sfs-strong\">Total para comprar</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ installmentsToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td class=\"sfs-right sfs-nowrap sfs-strong\">{{ totalToBuy() | currency: 'COP' : 'symbol-narrow' : '1.0-0' : locale }}</td>\n <td></td>\n </tr>\n }\n </ng-template>\n <ng-template #emptymessage>\n <tr><td colspan=\"10\">La solicitud no tiene compras de cartera registradas.</td></tr>\n </ng-template>\n </p-table>\n </div>\n }\n</p-card>\n", styles: [".sfs-title{margin:0;font-size:1.125rem;font-weight:600}.sfs-subtitle{margin:0;font-size:1rem;font-weight:600}.sfs-muted{color:var(--p-text-muted-color)}.sfs-section-title{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:1rem;font-weight:600}.sfs-section-title i{color:var(--primary-color, var(--p-primary-color))}.sfs-inline{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.sfs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.sfs-break{overflow-wrap:anywhere}.sfs-nowrap{white-space:nowrap}.sfs-right{text-align:right}.sfs-strong{font-weight:600}.sfs-tag-gap{margin-left:.5rem}.sfs-stack{display:flex;flex-direction:column;gap:1rem}.sfs-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sfs-summary{display:grid;grid-template-columns:minmax(8rem,max-content) 1fr;gap:.25rem 1rem;margin:0}.sfs-summary dt{color:var(--p-text-muted-color)}.sfs-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}@media (max-width: 575px){:host ::ng-deep .sfs-stack-table .p-datatable-table-container{overflow:visible!important}:host ::ng-deep .sfs-stack-table table,:host ::ng-deep .sfs-stack-table tbody{display:block;width:100%}:host ::ng-deep .sfs-stack-table thead{display:block!important;position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}:host ::ng-deep .sfs-stack-table tbody tr{display:flex;flex-direction:column;margin-bottom:.5rem;padding:.5rem .75rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-content-border-radius, 6px)}:host ::ng-deep .sfs-stack-table tbody td{display:flex;align-items:center;justify-content:flex-end;gap:.375rem;padding:.3rem 0;border:0;text-align:right}:host ::ng-deep .sfs-stack-table tbody td[data-label]:before{content:attr(data-label);margin-right:auto;padding-right:1rem;color:var(--p-text-muted-color);text-align:left}:host ::ng-deep .sfs-stack-table tbody td.sfs-stack-title{order:-1;display:block;font-weight:600;text-align:left}:host ::ng-deep .sfs-stack-table tfoot,:host ::ng-deep .sfs-stack-table .sfs-stack-hide{display:none}}\n"] }]
725
725
  }], ctorParameters: () => [] });
726
726
 
727
727
  /*