diff --git a/Resources/views/parameter/branches/index.blade.php b/Resources/views/parameter/branches/index.blade.php index 31ced92..608cfb9 100644 --- a/Resources/views/parameter/branches/index.blade.php +++ b/Resources/views/parameter/branches/index.blade.php @@ -27,11 +27,62 @@
- + + + + + + + +
+
@@ -96,7 +147,65 @@ $('#kt_modal_add_branch').on('hidden.bs.modal', function () { $(this).find('form').trigger('reset'); Livewire.dispatch('reload', false); - }) + }); + + $(function(){ + const documentTitle = 'Branch Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['branch-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ] + }).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/parameter/currencies/index.blade.php b/Resources/views/parameter/currencies/index.blade.php index 1608172..69a8d4b 100644 --- a/Resources/views/parameter/currencies/index.blade.php +++ b/Resources/views/parameter/currencies/index.blade.php @@ -32,6 +32,57 @@ Add Mata Uang + + + + + + + +
+ @@ -96,7 +147,64 @@ $('#kt_modal_add_currency').on('hidden.bs.modal', function () { $(this).find('form').trigger('reset'); Livewire.dispatch('reload', false); - }) + }); + + $(function(){ + const documentTitle = 'Currency Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['currency-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ] + }).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(); + // 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/parameter/debitur/index.blade.php b/Resources/views/parameter/debitur/index.blade.php index 2132700..22e321e 100644 --- a/Resources/views/parameter/debitur/index.blade.php +++ b/Resources/views/parameter/debitur/index.blade.php @@ -32,6 +32,57 @@ Add Debitur + + + + + + + +
+ @@ -96,7 +147,65 @@ $('#kt_modal_add_debitur').on('hidden.bs.modal', function () { $(this).find('form').trigger('reset'); Livewire.dispatch('reload', false); - }) + }); + + $(function(){ + const documentTitle = 'Debitur Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['debitur-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5] + } + } + ] + }).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/parameter/facility_types/index.blade.php b/Resources/views/parameter/facility_types/index.blade.php index 5e29485..9a5d883 100644 --- a/Resources/views/parameter/facility_types/index.blade.php +++ b/Resources/views/parameter/facility_types/index.blade.php @@ -32,6 +32,57 @@ Add Jenis Fasilitas + + + + + + + +
+ @@ -96,7 +147,65 @@ $('#kt_modal_add_facility_type').on('hidden.bs.modal', function () { $(this).find('form').trigger('reset'); Livewire.dispatch('reload', false); - }) + }); + + $(function(){ + const documentTitle = 'Facility Type Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['facaility-type-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ] + }).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/parameter/guarantee_types/index.blade.php b/Resources/views/parameter/guarantee_types/index.blade.php index 6903caa..380cdef 100644 --- a/Resources/views/parameter/guarantee_types/index.blade.php +++ b/Resources/views/parameter/guarantee_types/index.blade.php @@ -32,6 +32,57 @@ Add Jenis Jaminan + + + + + + + +
+ @@ -96,7 +147,65 @@ $('#kt_modal_add_guarantee_type').on('hidden.bs.modal', function () { $(this).find('form').trigger('reset'); Livewire.dispatch('reload', false); - }) + }); + + $(function(){ + const documentTitle = 'Guarantee Type Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['guarantee-type-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ] + }).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/parameter/loan_types/index.blade.php b/Resources/views/parameter/loan_types/index.blade.php index 70e6280..fdd3023 100644 --- a/Resources/views/parameter/loan_types/index.blade.php +++ b/Resources/views/parameter/loan_types/index.blade.php @@ -32,6 +32,57 @@ Add Jenis Fasilitas + + + + + + + +
+ @@ -96,7 +147,65 @@ $('#kt_modal_add_loan_type').on('hidden.bs.modal', function () { $(this).find('form').trigger('reset'); Livewire.dispatch('reload', false); - }) + }); + + $(function(){ + const documentTitle = 'Loan Type Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['loan-type-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ] + }).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/parameter/rekening/index.blade.php b/Resources/views/parameter/rekening/index.blade.php index edc6cfe..beaf63a 100644 --- a/Resources/views/parameter/rekening/index.blade.php +++ b/Resources/views/parameter/rekening/index.blade.php @@ -32,6 +32,57 @@ Add Rekening + + + + + + + +
+ @@ -96,9 +147,65 @@ $('#kt_modal_add_rekening').on('hidden.bs.modal', function () { $(this).find('form').trigger('reset'); Livewire.dispatch('reload', false); - }) + }); + $(function(){ + const documentTitle = 'Rekening Report'; + var buttons = new $.fn.dataTable.Buttons(LaravelDataTables['rekening-table'], { + buttons: [ + { + extend: 'copyHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7] + } + }, + { + extend: 'excelHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7] + } + }, + { + extend: 'csvHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7] + } + }, + { + extend: 'pdfHtml5', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7] + } + }, + { + extend: 'print', + title: documentTitle, + exportOptions: { + columns: [0, 1, 2, 3, 4, 5, 6, 7] + } + } + ] + }).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