diff --git a/app/Views/hr_access_controll.php b/app/Views/hr_access_controll.php index e86a03e3..c1e078fe 100644 --- a/app/Views/hr_access_controll.php +++ b/app/Views/hr_access_controll.php @@ -53,7 +53,7 @@ margin-left: 8px !important; } - $value) { + $value) { $key = $key + 1; ?> @@ -207,7 +207,7 @@ - $policies) { + $policies) { $statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active'; $statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive'; // if ( @@ -272,7 +272,7 @@ - $policies) { + $policies) { $statusText = $policies['policy_status'] == 1 ? 'Active' : 'In-Active'; $statusClass = $policies['policy_status'] == 1 ? 'active' : 'inactive'; // if( @@ -334,7 +334,7 @@ - $cd) { ?> + $cd) { ?>
Excel', + title: 'HR-Activity', + filename: function () { + return 'HR-Activity-' + (typeof moment !== 'undefined' ? moment().format('DD-MM-YYYY') : 'export'); + }, + sheetName: 'HR-Activity', + className: 'btn hr-activity-excel-btn', + attr: { + id: 'hrActivityExcelBtn', + title: 'Export HR Activity to Excel' + }, + exportOptions: { + columns: [0, 1, 2, 3, 4] + }, + action: function (e, dt, button, config) { + if (!dt.data().any()) { + if (typeof toastr !== 'undefined' && toastr.warning) { + toastr.warning('No data available to export.', 'Warning'); + } else { + alert('No data available to export.'); + } + return; + } + // Use DataTables built-in excelHtml5 action + $.fn.dataTable.ext.buttons.excelHtml5.action.call(this, e, dt, button, config); + } } ] });