From 2b67edc671a56e8c9d465c01ec26c0bead11fc07 Mon Sep 17 00:00:00 2001 From: Ilham Wara Nugroho Date: Wed, 4 Feb 2026 15:06:29 +0700 Subject: [PATCH] update --- .../views/modules/usulan/csap/form.blade.php | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/resources/views/modules/usulan/csap/form.blade.php b/resources/views/modules/usulan/csap/form.blade.php index f918ebc..3108e83 100644 --- a/resources/views/modules/usulan/csap/form.blade.php +++ b/resources/views/modules/usulan/csap/form.blade.php @@ -84,7 +84,7 @@ @endif -
+ {{csrf_field()}}
@@ -378,15 +378,9 @@ // $('input[type="checkbox"], input[type="radio"], input[type="text"], textarea').attr('disabled', true); }); @endif - $('.page').on('click',function(e){ - e.preventDefault(); - let number = $(this).data('number'); + function getForm(number){ let base_url = "{{url('/')}}"; - // Tambahkan kelas active dan hapus dari yang lain - $('.page').removeClass('bg-primary-light border-primary text-primary'); - $(this).addClass('bg-primary-light border-primary text-primary'); - - $.ajax({ + $.ajax({ url: base_url+'/getForm', // Ganti dengan URL API-mu type: 'POST', // Bisa juga 'POST' kalau perlu xhrFields: { @@ -441,7 +435,17 @@ complete: function () { $('#loading-spinner').hide(); // Sembunyikan spinner setelah request selesai } - }); + }); + } + $('.page').on('click',function(e){ + e.preventDefault(); + let number = $(this).data('number'); + let base_url = "{{url('/')}}"; + // Tambahkan kelas active dan hapus dari yang lain + $('.page').removeClass('bg-primary-light border-primary text-primary'); + $(this).addClass('bg-primary-light border-primary text-primary'); + + getForm(number); }); $('.resume').on('click',function(e){ @@ -647,6 +651,8 @@ $('.nilai_provinsi').html(response.nilai_prov); $('.page').closest('.bg-primary-light').addClass('bg-success-light border-success text-success'); $('.page').closest('.bg-primary-light').removeClass('bg-primary-light border-primary border-secondary text-primary'); + + getForm(response.page_number); }, error: function (xhr) { toastr.error(