add crud signer
This commit is contained in:
@ -20,11 +20,12 @@
|
||||
@include('konfirmasibank::pages.table_fasilitas')
|
||||
</div>
|
||||
<div class="d-flex justify-content-end ">
|
||||
<a href="{{ route($route[0] . '.index') }}" type="button" class="btn btn-danger btn-sm " style="">
|
||||
<i class="ki-duotone ki-exit-left fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Kembali
|
||||
</a>
|
||||
|
||||
<a href="{{ route($route[0] . '.index') }}" type="button" class="btn btn-danger btn-sm redirectButton" style="margin-top:10px">
|
||||
<i class="ki-duotone ki-exit-left fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Kembali
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,20 +47,20 @@
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="myFormInput" action="{{ route($route[0] . '.postFasilitas') }}">
|
||||
<form class="form-horizontal" id="inputFasilitas" action="{{ route($route[0] . '.postFasilitas') }}" method="POST">
|
||||
@csrf
|
||||
<!-- Add your form fields here -->
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">No Rekening</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control form-control-sm " name="nomor_rekening"
|
||||
placeholder="Nomor Rekening">
|
||||
<input type="hidden" class="form-control form-control-sm " name="nomor_cif" value="{{$data['fasilitas'][0]['nomor_cif']}}">
|
||||
<input type="text" class="form-control form-control-sm " name="nomor_rekening" placeholder="Nomor Rekening">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Jenis Fasilitas</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-select form-select-sm" aria-label="Small select example">
|
||||
<select class="form-select form-select-sm" aria-label="Small select example" name="jenis_fasilitas">
|
||||
<option selected>Pilih Jenis Fasilitas</option>
|
||||
@foreach ($data['limitReference'] as $item)
|
||||
<option value="{{$item->SHORT_NAME}}">{{$item->SHORT_NAME}}</option>
|
||||
@ -115,7 +116,7 @@
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary btn-sm closeButton"
|
||||
data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="submitFormBtn">Submit</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="submitFasilitas">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -143,7 +144,7 @@
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">No Rekening</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="hidden" class="form-control form-control-sm " id="id" name="id">
|
||||
<input type="hidden" class="form-control form-control-sm " id="id" name="id">
|
||||
<input type="text" class="form-control form-control-sm " id="norek" name="nomor_rekening"
|
||||
placeholder="Nomor Rekening">
|
||||
</div>
|
||||
@ -233,10 +234,11 @@
|
||||
});
|
||||
|
||||
// Handle form submission when the "Submit" button inside the modal is clicked
|
||||
$("#submitFormBtn").click(function(e) {
|
||||
$("#submitFasilitas").click(function(e) {
|
||||
// Serialize the form data
|
||||
e.preventDefault();
|
||||
var formData = $("#myFormInput").serialize();
|
||||
var formData = $("#inputFasilitas").serialize();
|
||||
|
||||
// Send an AJAX request to the form submission route
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
@ -244,13 +246,14 @@
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
alert('tes');
|
||||
// Handle success response (e.g., show a success message)
|
||||
$("#myModal").modal('hide');
|
||||
var _data = JSON.parse(data);
|
||||
toastr.success(_data.message);
|
||||
form[0].reset();
|
||||
$('#table4').ajax.reload();
|
||||
// Optionally, close the modal
|
||||
$("#myModal").modal('hide');
|
||||
location.reload();
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error response (if applicable)
|
||||
@ -288,9 +291,10 @@
|
||||
$('input[name="due_date"]').val(response.due_date);
|
||||
$('input[name="jangka_waktu"]').val(response.jangka_waktu);
|
||||
$('input[name="fixed_rate"]').val(response.fixed_rate);
|
||||
|
||||
$('#ket').val(response.keterangan);
|
||||
$('#id').val(response.id);
|
||||
$("#myModalEdit").modal('show');
|
||||
$(".myModalEdit").modal('show');
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error response (if applicable)
|
||||
@ -364,7 +368,6 @@
|
||||
})
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
Reference in New Issue
Block a user