update event liveware success and error semua module

This commit is contained in:
daengdeni 2023-12-26 14:47:03 +07:00
parent 7f662a70b8
commit 55c6076fef
28 changed files with 302 additions and 488 deletions

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -61,10 +61,37 @@
window.LaravelDataTables['branch-table'].search(this.value).draw(); window.LaravelDataTables['branch-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { 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'); $('#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();
});
}); });
</script> </script>
@endpush @endpush

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['currency-table'].search(this.value).draw(); window.LaravelDataTables['currency-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_currency').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', 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();
}); });
}); });
</script> </script>

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['debitur-table'].search(this.value).draw(); window.LaravelDataTables['debitur-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_debitur').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', 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();
}); });
}); });
</script> </script>

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['facility-type-table'].search(this.value).draw(); window.LaravelDataTables['facility-type-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_facility_type').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', 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();
}); });
}); });
</script> </script>

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['guarantee-type-table'].search(this.value).draw(); window.LaravelDataTables['guarantee-type-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_guarantee_type').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', 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();
}); });
}); });
</script> </script>

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['loan-type-table'].search(this.value).draw(); window.LaravelDataTables['loan-type-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_loan_type').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', 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();
}); });
}); });
</script> </script>

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['rekening-table'].search(this.value).draw(); window.LaravelDataTables['rekening-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_rekening').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', 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();
}); });
}); });

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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();
});

View File

@ -78,10 +78,11 @@
{{ $dataTable->scripts() }} {{ $dataTable->scripts() }}
<script> <script>
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_detail_jaminan').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -89,7 +90,23 @@
confirmButton: 'btn btn-primary', confirmButton: 'btn btn-primary',
} }
}) })
window.LaravelDataTables['detail-jaminan-table'].ajax.reload(); $('#kt_modal_add_detail_jaminan').modal('hide');
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',
}
})
$('#kt_modal_add_detail_jaminan').modal('hide');
LaravelDataTables['detail_jaminan-table'].ajax.reload();
}); });
}); });

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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_pembayaran-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_pembayaran-table'].ajax.reload();
});

View File

@ -78,10 +78,11 @@
{{ $dataTable->scripts() }} {{ $dataTable->scripts() }}
<script> <script>
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_detail_pembayaran').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -89,7 +90,23 @@
confirmButton: 'btn btn-primary', confirmButton: 'btn btn-primary',
} }
}) })
window.LaravelDataTables['detail-pembayaran-table'].ajax.reload(); $('#kt_modal_add_detail_pembayaran').modal('hide');
LaravelDataTables['detail_pembayaran-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_detail_pembayaran').modal('hide');
LaravelDataTables['detail_pembayaran-table'].ajax.reload();
}); });
}); });

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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_penagihan-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_penagihan-table'].ajax.reload();
});

View File

@ -78,10 +78,11 @@
{{ $dataTable->scripts() }} {{ $dataTable->scripts() }}
<script> <script>
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_detail_penagihan').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -89,7 +90,23 @@
confirmButton: 'btn btn-primary', confirmButton: 'btn btn-primary',
} }
}) })
window.LaravelDataTables['detail-penagihan-table'].ajax.reload(); $('#kt_modal_add_detail_penagihan').modal('hide');
LaravelDataTables['detail_penagihan-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_detail_penagihan').modal('hide');
LaravelDataTables['detail_penagihan-table'].ajax.reload();
}); });
}); });

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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_subrogasi_jamkrindo-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_subrogasi_jamkrindo-table'].ajax.reload();
});

View File

@ -78,10 +78,11 @@
{{ $dataTable->scripts() }} {{ $dataTable->scripts() }}
<script> <script>
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_detail_subrogasi_jamkrindo').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -89,7 +90,23 @@
confirmButton: 'btn btn-primary', confirmButton: 'btn btn-primary',
} }
}) })
window.LaravelDataTables['detail-subrogasi-jamkrindo-table'].ajax.reload(); $('#kt_modal_add_detail_subrogasi_jamkrindo').modal('hide');
LaravelDataTables['detail_subrogasi_jamkrindo-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_detail_subrogasi_jamkrindo').modal('hide');
LaravelDataTables['detail_subrogasi_jamkrindo-table'].ajax.reload();
}); });
}); });

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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['hapus-buku-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['hapus-buku-table'].ajax.reload();
});

View File

@ -62,10 +62,11 @@
window.LaravelDataTables['hapus-buku-table'].search(this.value).draw(); window.LaravelDataTables['hapus-buku-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_nomor_pinjaman').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -73,7 +74,23 @@
confirmButton: 'btn btn-primary', confirmButton: 'btn btn-primary',
} }
}) })
window.LaravelDataTables['hapus-buku-table'].ajax.reload(); $('#kt_modal_nomor_pinjaman').modal('hide');
LaravelDataTables['hapus-buku-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_nomor_pinjaman').modal('hide');
LaravelDataTables['hapus-buku-table'].ajax.reload();
}); });
}); });

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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['klaim-jamkrindo-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['klaim-jamkrindo-table'].ajax.reload();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['klaim-jamkrindo-table'].search(this.value).draw(); window.LaravelDataTables['klaim-jamkrindo-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_klaim_jamkrindo').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', confirmButton: 'btn btn-primary',
} }
}) })
window.LaravelDataTables['klaim-jamkrindo-table'].ajax.reload(); $('#kt_modal_add_klaim_jamkrindo').modal('hide');
LaravelDataTables['klaim-jamkrindo-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_klaim_jamkrindo').modal('hide');
LaravelDataTables['klaim-jamkrindo-table'].ajax.reload();
}); });
}); });

View File

@ -29,34 +29,3 @@ document.querySelectorAll('[data-kt-action="update_row"]').forEach(function (ele
Livewire.dispatch('update', { id : this.getAttribute('data-kt-id') }); 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['subrogasi-jamkrindo-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['subrogasi-jamkrindo-table'].ajax.reload();
});

View File

@ -61,10 +61,11 @@
window.LaravelDataTables['subrogasi-jamkrindo-table'].search(this.value).draw(); window.LaravelDataTables['subrogasi-jamkrindo-table'].search(this.value).draw();
}); });
document.addEventListener('livewire:initialized', function () { document.addEventListener('livewire:initialized', function () {
Livewire.on('success', function () { // Listen for 'success' event emitted by Livewire
$('#kt_modal_add_subrogasi_jamkrindo').modal('hide'); Livewire.on('success', (message) => {
// Reload the users-table datatable
Swal.fire({ Swal.fire({
text: 'Data Berhasil Di Tambahkan, Menunggu Approval', text: message,
icon: 'success', icon: 'success',
buttonsStyling: false, buttonsStyling: false,
confirmButtonText: 'Ok, got it!', confirmButtonText: 'Ok, got it!',
@ -72,7 +73,23 @@
confirmButton: 'btn btn-primary', confirmButton: 'btn btn-primary',
} }
}) })
window.LaravelDataTables['subrogasi-jamkrindo-table'].ajax.reload(); $('#kt_modal_add_subrogasi_jamkrindo').modal('hide');
LaravelDataTables['subrogasi-jamkrindo-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_subrogasi_jamkrindo').modal('hide');
LaravelDataTables['subrogasi-jamkrindo-table'].ajax.reload();
}); });
}); });