form tabel

This commit is contained in:
2026-05-15 15:31:19 +07:00
parent 34d09d03bb
commit e0ab4bdace
24 changed files with 1853 additions and 182 deletions
@@ -0,0 +1,27 @@
@push('scripts')
<script>
$(document).ready(function() {
function addForm(tipe) {
$.ajax({
url: '{{ route('tabel.formulir.store', [$tabel->id]) }}',
type: 'POST',
data: {
tipe: tipe,
_token: '{{ csrf_token() }}',
},
success: function () {
Swal.fire({ icon: 'success', title: 'Berhasil!', showConfirmButton: false, timer: 1500 })
.then(() => window.location.reload());
},
error: function (xhr) {
Swal.fire({ icon: 'error', title: 'Gagal!', text: xhr.responseJSON?.message || 'Error' });
}
});
}
$(".add-row").click(function (e) {
e.preventDefault();
addForm('form-row');
});
});
</script>
@endpush