diff --git a/Resources/views/pages/index_signer.blade.php b/Resources/views/pages/index_signer.blade.php
index 617c51d..5fff66a 100644
--- a/Resources/views/pages/index_signer.blade.php
+++ b/Resources/views/pages/index_signer.blade.php
@@ -48,7 +48,7 @@
-
-
@push('customscript')
-
+ $("#submitFormUpdateSigner").click(function(e) {
+ // Serialize the form data
+ e.preventDefault();
+ var formData = $("#formUpdateSigner").serialize();
+ $.ajax({
+ type: "POST",
+ url: "{{ route('konfirmasibank.updateSigner') }}",
+ data: formData, // serializes the form's elements.
+ success: function(data) {
+ $("#myModalEditSigner").modal('hide');
+ var _data = JSON.parse(data);
+ toastr.success(_data.message);
+ location.reload();
+
+ },
+ error: function(data, textStatus, errorThrown) {
+ var errors = data.responseJSON.errors;
+ $.each(errors, function(key, value) {
+ toastr.error(value);
+ });
+ }
+ });
+ });
+
+
+ $(".btnDeleteSigner").click(function(e) {
+ // var form = $(this).closest("form");
+ var id = $(this).data('id');
+ var dataToSend = {
+ _token: $('meta[name="csrf-token"]').attr('content'),
+ id: id
+ };
+ e.preventDefault();
+ Swal.fire({
+ title: 'Are you sure?',
+ text: "You won't be able to revert this!",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#3085d6',
+ cancelButtonColor: '#d33',
+ confirmButtonText: 'Yes, delete it!'
+ }).then((result) => {
+ if (result.isConfirmed) {
+ $.ajax({
+ type: "POST",
+ url: "{{ route('konfirmasibank.destroySigner') }}",
+ data: dataToSend, // serializes the form's elements.
+ success: function(data) {
+ toastr.success('has been deleted.', 'Success!', {
+ timeOut: 5000
+ });
+ location.reload();
+ }
+ });
+
+ }
+ })
+ })
+ });
+
@endpush
-
-
-