Adds buttons to all data tables that allow export via excel and CSV. Need to find a way to allow translations

This commit is contained in:
Whinis 2026-02-03 23:00:42 -05:00
parent 851055bdb4
commit 35262a25f1

View file

@ -122,12 +122,22 @@ export default class extends Controller {
header: $(window).width() >= 768, //Only enable fixedHeaders on devices with big screen. Fixes scrolling issues on smartphones.
headerOffset: $("#navbar").outerHeight()
},
buttons: [{
"extend": 'colvis',
'className': 'mr-2 btn-outline-secondary',
'columns': ':not(.no-colvis)',
"text": "<i class='fa fa-cog'></i>"
}],
buttons: [
{
"extend": 'colvis',
'className': 'mr-2 btn-outline-secondary',
'columns': ':not(.no-colvis)',
"text": "<i class='fa fa-cog'></i>"
},
{
text: 'CSV',
action: $.fn.initDataTables.exportBtnAction('csv', settings),
},
{
text: 'Excel',
action: $.fn.initDataTables.exportBtnAction('excel', settings),
}
],
rowCallback: this._rowCallback.bind(this),