Skip to content

Instantly share code, notes, and snippets.

@roniewill
Last active April 25, 2019 13:20
Show Gist options
  • Save roniewill/88143d8e126c6d03a7f17d24fec3fd4d to your computer and use it in GitHub Desktop.
Save roniewill/88143d8e126c6d03a7f17d24fec3fd4d to your computer and use it in GitHub Desktop.
confirmSelectedAll() {
const modalRef = this.modalConfirm.open(ModalConfirmComponent);
modalRef.componentInstance.message = `Deseja realmente carregar todos as ${
this.pagination.total_count
} Cobranças?`;
modalRef.result.then(result => {
if (result) {
this.paramsUpdate = {
per_page: this.pagination.total_count
};
// this.loadBillings();
/* setTimeout(() => {
this.selectAllBilling(this.isHeaderChecked);
this.notificationService.add(
'Concluído',
'Todas as Cobranças foram carregadas e selecionadas',
'success'
);
}, 500); */
this.billingService.get(this.params).subscribe(() => {
this.selectAllBilling(this.isHeaderChecked);
this.notificationService.add(
'Concluído',
'Todas as Cobranças foram carregadas e selecionadas',
'success'
);
});
}
});
}
selectAllBilling(value: boolean) {
if (value) {
this.ngxDatatable.onHeaderSelect(value);
} else {
value = false;
this.ngxDatatable.onHeaderSelect(value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment