diff --git a/Resources/views/parameter/branches/_draw-scripts.js b/Resources/views/parameter/branches/_draw-scripts.js index 083a46c..e03e2c0 100644 --- a/Resources/views/parameter/branches/_draw-scripts.js +++ b/Resources/views/parameter/branches/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['branch-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['branch-table'].ajax.reload(); -}); diff --git a/Resources/views/parameter/branches/index.blade.php b/Resources/views/parameter/branches/index.blade.php index a85666a..5b70610 100644 --- a/Resources/views/parameter/branches/index.blade.php +++ b/Resources/views/parameter/branches/index.blade.php @@ -61,10 +61,37 @@ window.LaravelDataTables['branch-table'].search(this.value).draw(); }); document.addEventListener('livewire:initialized', function () { - Livewire.on('success', function () { + // Listen for 'success' event emitted by Livewire + Livewire.on('success', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'success', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) $('#kt_modal_add_branch').modal('hide'); - window.LaravelDataTables['branch-table'].ajax.reload(); + LaravelDataTables['branch-table'].ajax.reload(); }); + + Livewire.on('error', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'warning', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) + $('#kt_modal_add_branch').modal('hide'); + LaravelDataTables['branch-table'].ajax.reload(); + }); + }); @endpush diff --git a/Resources/views/parameter/currencies/_draw-scripts.js b/Resources/views/parameter/currencies/_draw-scripts.js index 58d07f1..e03e2c0 100644 --- a/Resources/views/parameter/currencies/_draw-scripts.js +++ b/Resources/views/parameter/currencies/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['currency-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['currency-table'].ajax.reload(); -}); diff --git a/Resources/views/parameter/currencies/index.blade.php b/Resources/views/parameter/currencies/index.blade.php index 351c6cc..1f6edda 100644 --- a/Resources/views/parameter/currencies/index.blade.php +++ b/Resources/views/parameter/currencies/index.blade.php @@ -61,10 +61,11 @@ window.LaravelDataTables['currency-table'].search(this.value).draw(); }); document.addEventListener('livewire:initialized', function () { - Livewire.on('success', function () { - $('#kt_modal_add_currency').modal('hide'); + // Listen for 'success' event emitted by Livewire + Livewire.on('success', (message) => { + // Reload the users-table datatable Swal.fire({ - text: 'Data Berhasil Di Tambahkan, Menunggu Approval', + text: message, icon: 'success', buttonsStyling: false, confirmButtonText: 'Ok, got it!', @@ -72,7 +73,23 @@ confirmButton: 'btn btn-primary', } }) - window.LaravelDataTables['currency-table'].ajax.reload(); + $('#kt_modal_add_currency').modal('hide'); + LaravelDataTables['currency-table'].ajax.reload(); + }); + + Livewire.on('error', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'warning', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) + $('#kt_modal_add_currency').modal('hide'); + LaravelDataTables['currency-table'].ajax.reload(); }); }); diff --git a/Resources/views/parameter/debitur/_draw-scripts.js b/Resources/views/parameter/debitur/_draw-scripts.js index 87ddcc9..e03e2c0 100644 --- a/Resources/views/parameter/debitur/_draw-scripts.js +++ b/Resources/views/parameter/debitur/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['debitur-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['debitur-table'].ajax.reload(); -}); diff --git a/Resources/views/parameter/debitur/index.blade.php b/Resources/views/parameter/debitur/index.blade.php index 013870b..da00786 100644 --- a/Resources/views/parameter/debitur/index.blade.php +++ b/Resources/views/parameter/debitur/index.blade.php @@ -61,10 +61,11 @@ window.LaravelDataTables['debitur-table'].search(this.value).draw(); }); document.addEventListener('livewire:initialized', function () { - Livewire.on('success', function () { - $('#kt_modal_add_debitur').modal('hide'); + // Listen for 'success' event emitted by Livewire + Livewire.on('success', (message) => { + // Reload the users-table datatable Swal.fire({ - text: 'Data Berhasil Di Tambahkan, Menunggu Approval', + text: message, icon: 'success', buttonsStyling: false, confirmButtonText: 'Ok, got it!', @@ -72,7 +73,23 @@ confirmButton: 'btn btn-primary', } }) - window.LaravelDataTables['debitur-table'].ajax.reload(); + $('#kt_modal_add_debitur').modal('hide'); + LaravelDataTables['debitur-table'].ajax.reload(); + }); + + Livewire.on('error', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'warning', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) + $('#kt_modal_add_debitur').modal('hide'); + LaravelDataTables['debitur-table'].ajax.reload(); }); }); diff --git a/Resources/views/parameter/facility_types/_draw-scripts.js b/Resources/views/parameter/facility_types/_draw-scripts.js index 6fa55d1..e03e2c0 100644 --- a/Resources/views/parameter/facility_types/_draw-scripts.js +++ b/Resources/views/parameter/facility_types/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['facility-type-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['facility-type-table'].ajax.reload(); -}); diff --git a/Resources/views/parameter/facility_types/index.blade.php b/Resources/views/parameter/facility_types/index.blade.php index e942424..f8d73b0 100644 --- a/Resources/views/parameter/facility_types/index.blade.php +++ b/Resources/views/parameter/facility_types/index.blade.php @@ -61,10 +61,11 @@ window.LaravelDataTables['facility-type-table'].search(this.value).draw(); }); document.addEventListener('livewire:initialized', function () { - Livewire.on('success', function () { - $('#kt_modal_add_facility_type').modal('hide'); + // Listen for 'success' event emitted by Livewire + Livewire.on('success', (message) => { + // Reload the users-table datatable Swal.fire({ - text: 'Data Berhasil Di Tambahkan, Menunggu Approval', + text: message, icon: 'success', buttonsStyling: false, confirmButtonText: 'Ok, got it!', @@ -72,7 +73,23 @@ confirmButton: 'btn btn-primary', } }) - window.LaravelDataTables['facility-type-table'].ajax.reload(); + $('#kt_modal_add_facility_type').modal('hide'); + LaravelDataTables['facility-type-table'].ajax.reload(); + }); + + Livewire.on('error', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'warning', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) + $('#kt_modal_add_facility_type').modal('hide'); + LaravelDataTables['facility-type-table'].ajax.reload(); }); }); diff --git a/Resources/views/parameter/guarantee_types/_draw-scripts.js b/Resources/views/parameter/guarantee_types/_draw-scripts.js index 61bf201..759da45 100644 --- a/Resources/views/parameter/guarantee_types/_draw-scripts.js +++ b/Resources/views/parameter/guarantee_types/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['guarantee-type-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['guarantee-type-table'].ajax.reload(); -}); diff --git a/Resources/views/parameter/guarantee_types/index.blade.php b/Resources/views/parameter/guarantee_types/index.blade.php index c365950..7e14df5 100644 --- a/Resources/views/parameter/guarantee_types/index.blade.php +++ b/Resources/views/parameter/guarantee_types/index.blade.php @@ -61,10 +61,11 @@ window.LaravelDataTables['guarantee-type-table'].search(this.value).draw(); }); document.addEventListener('livewire:initialized', function () { - Livewire.on('success', function () { - $('#kt_modal_add_guarantee_type').modal('hide'); + // Listen for 'success' event emitted by Livewire + Livewire.on('success', (message) => { + // Reload the users-table datatable Swal.fire({ - text: 'Data Berhasil Di Tambahkan, Menunggu Approval', + text: message, icon: 'success', buttonsStyling: false, confirmButtonText: 'Ok, got it!', @@ -72,7 +73,23 @@ confirmButton: 'btn btn-primary', } }) - window.LaravelDataTables['guarantee-type-table'].ajax.reload(); + $('#kt_modal_add_guarantee_type').modal('hide'); + LaravelDataTables['guarantee-type-table'].ajax.reload(); + }); + + Livewire.on('error', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'warning', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) + $('#kt_modal_add_guarantee_type').modal('hide'); + LaravelDataTables['guarantee-type-table'].ajax.reload(); }); }); diff --git a/Resources/views/parameter/loan_types/_draw-scripts.js b/Resources/views/parameter/loan_types/_draw-scripts.js index b1ee8fc..759da45 100644 --- a/Resources/views/parameter/loan_types/_draw-scripts.js +++ b/Resources/views/parameter/loan_types/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['loan-type-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['loan-type-table'].ajax.reload(); -}); diff --git a/Resources/views/parameter/loan_types/index.blade.php b/Resources/views/parameter/loan_types/index.blade.php index a46f372..6160263 100644 --- a/Resources/views/parameter/loan_types/index.blade.php +++ b/Resources/views/parameter/loan_types/index.blade.php @@ -61,10 +61,11 @@ window.LaravelDataTables['loan-type-table'].search(this.value).draw(); }); document.addEventListener('livewire:initialized', function () { - Livewire.on('success', function () { - $('#kt_modal_add_loan_type').modal('hide'); + // Listen for 'success' event emitted by Livewire + Livewire.on('success', (message) => { + // Reload the users-table datatable Swal.fire({ - text: 'Data Berhasil Di Tambahkan, Menunggu Approval', + text: message, icon: 'success', buttonsStyling: false, confirmButtonText: 'Ok, got it!', @@ -72,7 +73,23 @@ confirmButton: 'btn btn-primary', } }) - window.LaravelDataTables['loan-type-table'].ajax.reload(); + $('#kt_modal_add_loan_type').modal('hide'); + LaravelDataTables['loan-type-table'].ajax.reload(); + }); + + Livewire.on('error', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'warning', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) + $('#kt_modal_add_loan_type').modal('hide'); + LaravelDataTables['loan-type-table'].ajax.reload(); }); }); diff --git a/Resources/views/parameter/rekening/_draw-scripts.js b/Resources/views/parameter/rekening/_draw-scripts.js index 16e851b..e03e2c0 100644 --- a/Resources/views/parameter/rekening/_draw-scripts.js +++ b/Resources/views/parameter/rekening/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['rekening-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['rekening-table'].ajax.reload(); -}); diff --git a/Resources/views/parameter/rekening/index.blade.php b/Resources/views/parameter/rekening/index.blade.php index 255ba25..0ba9b7a 100644 --- a/Resources/views/parameter/rekening/index.blade.php +++ b/Resources/views/parameter/rekening/index.blade.php @@ -61,10 +61,11 @@ window.LaravelDataTables['rekening-table'].search(this.value).draw(); }); document.addEventListener('livewire:initialized', function () { - Livewire.on('success', function () { - $('#kt_modal_add_rekening').modal('hide'); + // Listen for 'success' event emitted by Livewire + Livewire.on('success', (message) => { + // Reload the users-table datatable Swal.fire({ - text: 'Data Berhasil Di Tambahkan, Menunggu Approval', + text: message, icon: 'success', buttonsStyling: false, confirmButtonText: 'Ok, got it!', @@ -72,7 +73,23 @@ confirmButton: 'btn btn-primary', } }) - window.LaravelDataTables['rekening-table'].ajax.reload(); + $('#kt_modal_add_rekening').modal('hide'); + LaravelDataTables['rekening-table'].ajax.reload(); + }); + + Livewire.on('error', (message) => { + // Reload the users-table datatable + Swal.fire({ + text: message, + icon: 'warning', + buttonsStyling: false, + confirmButtonText: 'Ok, got it!', + customClass: { + confirmButton: 'btn btn-primary', + } + }) + + LaravelDataTables['rekening-table'].ajax.reload(); }); }); diff --git a/Resources/views/pencatatan/detail_jaminan/_draw-scripts.js b/Resources/views/pencatatan/detail_jaminan/_draw-scripts.js index a0e5d81..e03e2c0 100644 --- a/Resources/views/pencatatan/detail_jaminan/_draw-scripts.js +++ b/Resources/views/pencatatan/detail_jaminan/_draw-scripts.js @@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); }); }); - -// Listen for 'success' event emitted by Livewire -Livewire.on('success', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'success', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['detail_jaminan-table'].ajax.reload(); -}); - -Livewire.on('error', (message) => { - // Reload the users-table datatable - Swal.fire({ - text: message, - icon: 'warning', - buttonsStyling: false, - confirmButtonText: 'Ok, got it!', - customClass: { - confirmButton: 'btn btn-primary', - } - }) - - LaravelDataTables['detail_jaminan-table'].ajax.reload(); -}); diff --git a/Resources/views/pencatatan/detail_jaminan/show.blade.php b/Resources/views/pencatatan/detail_jaminan/show.blade.php index ce59f8e..4a984e4 100644 --- a/Resources/views/pencatatan/detail_jaminan/show.blade.php +++ b/Resources/views/pencatatan/detail_jaminan/show.blade.php @@ -78,10 +78,11 @@ {{ $dataTable->scripts() }}