Advertisement
dhiforester

Pengaturan

Dec 18th, 2023
930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 6.55 KB | Source Code | 0 0
  1. //Menampilkan List Pengaturan Pertama Kali
  2. $.ajax({
  3.     type        : 'POST',
  4.     url         : '_Page/Pengaturan/ListPengaturanBridging.php',
  5.     success     : function(data){
  6.         $('#ListPengaturanBridging').html(data);
  7.     }
  8. });
  9. //Ketika Menampilkan Modal Tambah Pengaturan
  10. $('#ModalTambahPengaturanVclaim').on('show.bs.modal', function (e) {
  11.     $('#NotifikasiTambahPengaturanVclaim').html('<small><code class="text-primary">Pastkan data pengaturan yang anda input sudah benar</code></small>');
  12.     $('#FormTambahPengaturanVclaim').html("Loading...");
  13.     $.ajax({
  14.         type        : 'POST',
  15.         url         : '_Page/Pengaturan/FormTambahPengaturanVclaim.php',
  16.         success     : function(data){
  17.             $('#FormTambahPengaturanVclaim').html(data);
  18.         }
  19.     });
  20. });
  21. //Ketika Proses Submit Pengaturan
  22. $('#ProsesTambahPengaturanVclaim').submit(function(){
  23.     $('#NotifikasiTambahPengaturanVclaim').html('<div class="spinner-border text-secondary" role="status"><span class="sr-only"></span></div>');
  24.     var form = $('#ProsesTambahPengaturanVclaim')[0];
  25.     var data = new FormData(form);
  26.     $.ajax({
  27.         type        : 'POST',
  28.         url         : '_Page/Pengaturan/ProsesTambahPengaturanVclaim.php',
  29.         data        :  data,
  30.         cache       : false,
  31.         processData : false,
  32.         contentType : false,
  33.         enctype     : 'multipart/form-data',
  34.         success     : function(data){
  35.             $('#NotifikasiTambahPengaturanVclaim').html(data);
  36.             var NotifikasiTambahPengaturanVclaimBerhasil=$('#NotifikasiTambahPengaturanVclaimBerhasil').html();
  37.             if(NotifikasiTambahPengaturanVclaimBerhasil=="Success"){
  38.                 //Menutup Modal
  39.                 $('#ModalTambahPengaturanVclaim').modal('hide');
  40.                 //Menampilkan Data
  41.                 $.ajax({
  42.                     type        : 'POST',
  43.                     url         : '_Page/Pengaturan/ListPengaturanBridging.php',
  44.                     success     : function(data){
  45.                         $('#ListPengaturanBridging').html(data);
  46.                     }
  47.                 });
  48.                 //Menampilkan Swal
  49.                 swal("Berhasil!", "Tambah Pengaturan Bridging Berhasil Berhasil", "success");
  50.             }
  51.         }
  52.     });
  53. });
  54. //Modal Edit Pengaturan Vclaim
  55. $('#ModalEditPengaturanVclaim').on('show.bs.modal', function (e) {
  56.     var id_pengaturan = $(e.relatedTarget).data('id');
  57.     $('#FormEditPengaturanVclaim').html("Loading...");
  58.     $('#NotifikasiEditPengaturanVclaim').html('<small><code class="text-primary">Pastkan data pengaturan yang anda input sudah benar</code></small>');
  59.     $.ajax({
  60.         type        : 'POST',
  61.         url         : '_Page/Pengaturan/FormEditPengaturanVclaim.php',
  62.         data        : {id_pengaturan: id_pengaturan},
  63.         success     : function(data){
  64.             $('#FormEditPengaturanVclaim').html(data);
  65.         }
  66.     });
  67. });
  68. //Ketika Proses Edit Pengaturan
  69. $('#ProsesEditPengaturanVclaim').submit(function(){
  70.     $('#NotifikasiEditPengaturanVclaim').html('<div class="spinner-border text-secondary" role="status"><span class="sr-only"></span></div>');
  71.     var form = $('#ProsesEditPengaturanVclaim')[0];
  72.     var data = new FormData(form);
  73.     $.ajax({
  74.         type        : 'POST',
  75.         url         : '_Page/Pengaturan/ProsesEditPengaturanVclaim.php',
  76.         data        :  data,
  77.         cache       : false,
  78.         processData : false,
  79.         contentType : false,
  80.         enctype     : 'multipart/form-data',
  81.         success     : function(data){
  82.             $('#NotifikasiEditPengaturanVclaim').html(data);
  83.             var NotifikasiEditPengaturanVclaimBerhasil=$('#NotifikasiEditPengaturanVclaimBerhasil').html();
  84.             if(NotifikasiEditPengaturanVclaimBerhasil=="Success"){
  85.                 //Menutup Modal
  86.                 $('#ModalEditPengaturanVclaim').modal('hide');
  87.                 //Menampilkan Data
  88.                 $.ajax({
  89.                     type        : 'POST',
  90.                     url         : '_Page/Pengaturan/ListPengaturanBridging.php',
  91.                     success     : function(data){
  92.                         $('#ListPengaturanBridging').html(data);
  93.                     }
  94.                 });
  95.                 //Menampilkan Swal
  96.                 swal("Berhasil!", "Edit Pengaturan Bridging Berhasil Berhasil", "success");
  97.             }
  98.         }
  99.     });
  100. });
  101. //Modal Hapus Pasien
  102. $('#ModalHapusPengaturanVclaim').on('show.bs.modal', function (e) {
  103.     var id_pengaturan = $(e.relatedTarget).data('id');
  104.     $('#PutIdPengaturan').val(id_pengaturan);
  105.     $('#NotifikasiHapusPengaturanVclaim').html('<small><code class="text-primary">Apakah Anda Yakin Akan Menghapus Data Tersebut?</code></small>');
  106. });
  107. //Ketika Proses Hapus Pengaturan
  108. $('#ProsesHapusPengaturanVclaim').submit(function(){
  109.     $('#NotifikasiHapusPengaturanVclaim').html('<div class="spinner-border text-secondary" role="status"><span class="sr-only"></span></div>');
  110.     var form = $('#ProsesHapusPengaturanVclaim')[0];
  111.     var data = new FormData(form);
  112.     $.ajax({
  113.         type        : 'POST',
  114.         url         : '_Page/Pengaturan/ProsesHapusPengaturanVclaim.php',
  115.         data        :  data,
  116.         cache       : false,
  117.         processData : false,
  118.         contentType : false,
  119.         enctype     : 'multipart/form-data',
  120.         success     : function(data){
  121.             $('#NotifikasiHapusPengaturanVclaim').html(data);
  122.             var NotifikasiHapusPengaturanVclaimBerhasil=$('#NotifikasiHapusPengaturanVclaimBerhasil').html();
  123.             if(NotifikasiHapusPengaturanVclaimBerhasil=="Success"){
  124.                 //Menutup Modal
  125.                 $('#ModalHapusPengaturanVclaim').modal('hide');
  126.                 //Menampilkan Data
  127.                 $.ajax({
  128.                     type        : 'POST',
  129.                     url         : '_Page/Pengaturan/ListPengaturanBridging.php',
  130.                     success     : function(data){
  131.                         $('#ListPengaturanBridging').html(data);
  132.                     }
  133.                 });
  134.                 //Menampilkan Swal
  135.                 swal("Berhasil!", "Hapus Pengaturan Bridging Berhasil Berhasil", "success");
  136.             }
  137.         }
  138.     });
  139. });
  140. //Modal Hapus Pasien
  141. $('#ModalGenerateSignature').on('show.bs.modal', function (e) {
  142.     var id_pengaturan = $(e.relatedTarget).data('id');
  143.     $.ajax({
  144.         type        : 'POST',
  145.         url         : '_Page/Pengaturan/HasilGenerateSignature.php',
  146.         data        :  {id_pengaturan: id_pengaturan},
  147.         success     : function(data){
  148.             $('#HasilGenerateSignature').val(data);
  149.         }
  150.     });
  151. });
Tags: simrs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement