diff --git a/Resources/views/pencatatan/detail_jaminan/show.blade.php b/Resources/views/pencatatan/detail_jaminan/show.blade.php index bcc29c7..9700240 100644 --- a/Resources/views/pencatatan/detail_jaminan/show.blade.php +++ b/Resources/views/pencatatan/detail_jaminan/show.blade.php @@ -53,6 +53,57 @@ Add Detail Jaminan + + + + + + + +
+ @@ -126,6 +177,64 @@ $("#nomor_pinjaman").val("{{ request()->segment(3) }}"); }); }); + + $(function(){ + const documentTitle = 'Detail Jaminan Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['detail-jaminan-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + } + ] + }).container().appendTo($('#kt_datatable_example_buttons')); + + // Hook dropdown menu click event to datatable export buttons + const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]'); + exportButtons.forEach(exportButton => { + exportButton.addEventListener('click', e => { + e.preventDefault(); + console.log(e.target.getAttribute('data-kt-export')); + // Get clicked export value + const exportValue = e.target.getAttribute('data-kt-export'); + const target = document.querySelector('.dt-buttons .buttons-' + exportValue); + + // Trigger click event on hidden datatable export buttons + target.click(); + }); + }); + }); @endpush diff --git a/Resources/views/pencatatan/detail_pembayaran/show.blade.php b/Resources/views/pencatatan/detail_pembayaran/show.blade.php index d32a143..7baaf8a 100644 --- a/Resources/views/pencatatan/detail_pembayaran/show.blade.php +++ b/Resources/views/pencatatan/detail_pembayaran/show.blade.php @@ -53,6 +53,57 @@ Add Detail Pembayaran + + + + + + + +
+ @@ -128,6 +179,64 @@ $("#nomor_pinjaman").val("{{ request()->segment(3) }}"); }); }); + + $(function(){ + const documentTitle = 'Detail Pembayaran Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['detail-pembayaran-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3] + } + } + ] + }).container().appendTo($('#kt_datatable_example_buttons')); + + // Hook dropdown menu click event to datatable export buttons + const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]'); + exportButtons.forEach(exportButton => { + exportButton.addEventListener('click', e => { + e.preventDefault(); + console.log(e.target.getAttribute('data-kt-export')); + // Get clicked export value + const exportValue = e.target.getAttribute('data-kt-export'); + const target = document.querySelector('.dt-buttons .buttons-' + exportValue); + + // Trigger click event on hidden datatable export buttons + target.click(); + }); + }); + }); @endpush diff --git a/Resources/views/pencatatan/detail_penagihan/show.blade.php b/Resources/views/pencatatan/detail_penagihan/show.blade.php index 62a4d96..91d349b 100644 --- a/Resources/views/pencatatan/detail_penagihan/show.blade.php +++ b/Resources/views/pencatatan/detail_penagihan/show.blade.php @@ -53,6 +53,57 @@ Add Detail Penagihan + + + + + + + +
+ @@ -128,6 +179,64 @@ $("#nomor_pinjaman").val("{{ request()->segment(3) }}"); }); }); + + $(function(){ + const documentTitle = 'Detail Penagihan Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['detail-penagihan-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + } + ] + }).container().appendTo($('#kt_datatable_example_buttons')); + + // Hook dropdown menu click event to datatable export buttons + const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]'); + exportButtons.forEach(exportButton => { + exportButton.addEventListener('click', e => { + e.preventDefault(); + console.log(e.target.getAttribute('data-kt-export')); + // Get clicked export value + const exportValue = e.target.getAttribute('data-kt-export'); + const target = document.querySelector('.dt-buttons .buttons-' + exportValue); + + // Trigger click event on hidden datatable export buttons + target.click(); + }); + }); + }); @endpush diff --git a/Resources/views/pencatatan/detail_subrogasi_jamkrindo/show.blade.php b/Resources/views/pencatatan/detail_subrogasi_jamkrindo/show.blade.php index a2134ab..149cc89 100644 --- a/Resources/views/pencatatan/detail_subrogasi_jamkrindo/show.blade.php +++ b/Resources/views/pencatatan/detail_subrogasi_jamkrindo/show.blade.php @@ -53,6 +53,57 @@ Add Detail Pembayaran + + + + + + + +
+ @@ -128,6 +179,64 @@ $("#nomor_pinjaman").val("{{ request()->segment(3) }}"); }); }); + + $(function(){ + const documentTitle = 'Detail Subrogari Jamkrindo Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['detail_subrogasi_jamkrindo-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + } + ] + }).container().appendTo($('#kt_datatable_example_buttons')); + + // Hook dropdown menu click event to datatable export buttons + const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]'); + exportButtons.forEach(exportButton => { + exportButton.addEventListener('click', e => { + e.preventDefault(); + console.log(e.target.getAttribute('data-kt-export')); + // Get clicked export value + const exportValue = e.target.getAttribute('data-kt-export'); + const target = document.querySelector('.dt-buttons .buttons-' + exportValue); + + // Trigger click event on hidden datatable export buttons + target.click(); + }); + }); + }); @endpush diff --git a/Resources/views/pencatatan/hapus_buku/index.blade.php b/Resources/views/pencatatan/hapus_buku/index.blade.php index 9563c47..9bb002a 100644 --- a/Resources/views/pencatatan/hapus_buku/index.blade.php +++ b/Resources/views/pencatatan/hapus_buku/index.blade.php @@ -32,6 +32,57 @@ Add Hapus Buku + + + + + + + +
+ @@ -111,7 +162,66 @@ window.addEventListener('show', event => { $('#kt_modal_add_hapus_buku').modal('show'); - }) + }); + + $(function(){ + const documentTitle = 'Hapus Buku Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['hapus-buku-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + } + } + ] + }).container().appendTo($('#kt_datatable_example_buttons')); + + // Hook dropdown menu click event to datatable export buttons + const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]'); + exportButtons.forEach(exportButton => { + exportButton.addEventListener('click', e => { + e.preventDefault(); + console.log(e.target.getAttribute('data-kt-export')); + // Get clicked export value + const exportValue = e.target.getAttribute('data-kt-export'); + const target = document.querySelector('.dt-buttons .buttons-' + exportValue); + + // Trigger click event on hidden datatable export buttons + target.click(); + }); + }); + }); + @endpush diff --git a/Resources/views/pencatatan/klaim_jamkrindo/index.blade.php b/Resources/views/pencatatan/klaim_jamkrindo/index.blade.php index 886b5a7..37ae954 100644 --- a/Resources/views/pencatatan/klaim_jamkrindo/index.blade.php +++ b/Resources/views/pencatatan/klaim_jamkrindo/index.blade.php @@ -32,6 +32,57 @@ Add Klaim Jamkrindo + + + + + + + +
+ @@ -106,6 +157,64 @@ $(this).find('form').trigger('reset'); }) }); + + $(function(){ + const documentTitle = 'Klaim Jamkrindo Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['klaim-jamkrindo-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6] + } + } + ] + }).container().appendTo($('#kt_datatable_example_buttons')); + + // Hook dropdown menu click event to datatable export buttons + const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]'); + exportButtons.forEach(exportButton => { + exportButton.addEventListener('click', e => { + e.preventDefault(); + console.log(e.target.getAttribute('data-kt-export')); + // Get clicked export value + const exportValue = e.target.getAttribute('data-kt-export'); + const target = document.querySelector('.dt-buttons .buttons-' + exportValue); + + // Trigger click event on hidden datatable export buttons + target.click(); + }); + }); + }); @endpush diff --git a/Resources/views/pencatatan/subrogasi_jamkrindo/index.blade.php b/Resources/views/pencatatan/subrogasi_jamkrindo/index.blade.php index 2343291..ef2c4c1 100644 --- a/Resources/views/pencatatan/subrogasi_jamkrindo/index.blade.php +++ b/Resources/views/pencatatan/subrogasi_jamkrindo/index.blade.php @@ -32,6 +32,57 @@ Add Subrogasi Jamkrindo + + + + + + + +
+ @@ -107,6 +158,64 @@ }) }); + + $(function(){ + const documentTitle = 'Subrogasi Jamkrindo Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['subrogasi-jamkrindo-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + } + ] + }).container().appendTo($('#kt_datatable_example_buttons')); + + // Hook dropdown menu click event to datatable export buttons + const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]'); + exportButtons.forEach(exportButton => { + exportButton.addEventListener('click', e => { + e.preventDefault(); + console.log(e.target.getAttribute('data-kt-export')); + // Get clicked export value + const exportValue = e.target.getAttribute('data-kt-export'); + const target = document.querySelector('.dt-buttons .buttons-' + exportValue); + + // Trigger click event on hidden datatable export buttons + target.click(); + }); + }); + }); @endpush