Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rows are not displayed #1811

Open
luis-cosillo opened this issue Oct 5, 2024 · 0 comments
Open

Rows are not displayed #1811

luis-cosillo opened this issue Oct 5, 2024 · 0 comments
Labels
feature request Use to ask for feature request

Comments

@luis-cosillo
Copy link

luis-cosillo commented Oct 5, 2024

me html

Cliente Descripcion
Estado
Documento Otro Documento
Fecha 1 Fecha 2
Monto 1 Monto 2
nombre 1 nombre 2
Tipo Serie
Indicadores
{{ item.codCli }} | {{ item.nombreCliente }} {{ item.codSin }} | {{ item.claveNotificacion }} | {{ item.numSin }}
{{ item.documento }} {{ item.otroDocumento }}
{{ getFecha(item.fecha1) }} {{ getFecha(item.fecha2) }}
{{ formatNumberPrefix(item.pendiente, 2) }} {{ formatNumberPrefix(item.pagado, 2) }}
{{ item.nombre1 }} {{ item.nombre 2}}
{{ item.tipo }} {{ item.serie }}
menu commit

and me code:
datosDataTable() {
const that = this;
let lastPage = this._notificacion.pageIndex * this._notificacion.pageSize;
this.dtOptions = {
...this._global.parametrosDatatable(),
displayStart: lastPage,
serverSide: true,
processing: true,
searching: false,
paging: true,
pageLength: this._notificacion.pageSize,
ajax: (dataTablesParameters: any, callback, settings) => {
lastPage = dataTablesParameters.start;
const _page: number = dataTablesParameters.start / dataTablesParameters.length;
this._notificacion.pageIndex = _page;

            const respuesta = this._busqueda.filtrosProcesar();

            const _filtro: ResultFilters = {
                pagina: this._notificacion.pageIndex,
                filas: this._notificacion.pageSize,
                textFilter: this._busqueda.textoFiltrado,
                esAsegurado: this._notificacion.opcionEsCliente,
                filters: respuesta,
            };

            this._notificacion.getSiniestros(_filtro).subscribe({
                next: _lista => {
                    this._notificacion.totalRegistros = _lista.recordsTotal;
                    this._notificacion.totalPaginas = _lista.totalPaginas;
                    this.listaSiniestros = _lista.data;

                    console.log('dataTablesParameters: ', dataTablesParameters);
                    console.log('listaSiniestros: ', _lista.data);
                    console.log('settings: ', settings);

                    this.actualizaColorNotificacion();
                    callback({
                        draw: dataTablesParameters.draw,
                        recordsTotal: this._notificacion.totalRegistros,
                        recordsFiltered: this._notificacion.totalRegistros,
                    });
                },
                error: error => {
                    this.listaSiniestros = [];

                    this._global.mostrarNotificacion(
                        glob.enumTipoNotificacion.errores,
                        this.getTituloPantalla(),
                        'Error al obtener los datos',
                        '.main-content'
                    );

                    callback({
                        draw: dataTablesParameters.draw,
                        recordsTotal: 0,
                        recordsFiltered: 0,
                        data: [],
                    });
                },
            });
        },
        columnDefs: [
            { orderable: false, targets: 0, className: 'largo_info_cliente' },
            { orderable: true, targets: 1, className: 'largo_etapas' },
            { orderable: true, targets: 2, className: 'largo_columnas' },
            { orderable: true, targets: 3, className: 'largo_columnas' },
            { orderable: true, targets: 4, className: 'largo_columnas' },
            { orderable: true, targets: 5, className: 'largo_info_ajustador' },
            { orderable: true, targets: 6, className: 'largo_columnas' },
            { orderable: false, targets: 7, className: 'largo_columnas' },
        ],
        scrollX: true,
        responsive: false,
    };
}

It stopped working after updating and the html ng-for doesn't render the rows now

@luis-cosillo luis-cosillo added the feature request Use to ask for feature request label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Use to ask for feature request
Projects
None yet
Development

No branches or pull requests

1 participant