tambah fungsi add fasilitas
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
<div class="row mb-3">
|
||||
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Periode</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control form-control-sm" name="periode" min="{{$data["currentYear"]}}" max="{{$data["pastYear"]}}" id="periode" placeholder="Periode">
|
||||
<input type="number" class="form-control form-control-sm" min="{{$data['pastYear']}}" max="{{$data['currentYear']}}" name="periode" clear id="periode" placeholder="Periode">
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
@ -41,8 +41,6 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-3 ">
|
||||
|
||||
|
||||
<form class="form_customer2" method="POST" action="{{ route($route[0] . '.export') }}">
|
||||
@csrf
|
||||
|
||||
@ -53,21 +51,25 @@
|
||||
<input type="hidden" style="margin-bottom: 5px" name="periode" />
|
||||
<div class="text-right ">
|
||||
<div class="d-flex justify-content-end ">
|
||||
<button type="submit" class="btn btn-light-primary exportPdf" style="display:none">
|
||||
<i class="ki-duotone ki-exit-down fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Export Report
|
||||
</button>
|
||||
<button type="submit" class="btn btn-light-primary btn-sm exportPdf" style="display:none">
|
||||
<i class="ki-duotone ki-exit-down fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Export Report
|
||||
</button>
|
||||
<a href="{{ route($route[0] . '.addFasilitas') }}" type="button" class="btn btn-light-info btn-sm " style="">
|
||||
<i class="ki-duotone ki-plus fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Fasilitas
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-body pt-6">
|
||||
<form class="form_customer3" method="POST" action="{{ route($route[0] . '.export') }}">
|
||||
@ -77,17 +79,75 @@
|
||||
All
|
||||
</label>
|
||||
</div>
|
||||
<!-- Button to trigger the modal -->
|
||||
|
||||
<div class="table-responsive " style="overflow-x:auto;">
|
||||
<div id="user_table">
|
||||
@include('konfirmasibank::pages.table')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end::Card body-->
|
||||
</div>
|
||||
<!--end::Card-->
|
||||
<!-- The Modal -->
|
||||
<div class="modal" id="myModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Tambah Fasilitas</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">
|
||||
<!-- Your horizontal form goes here -->
|
||||
<form class="form-horizontal" id="myForm">
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-sm-4 col-form-label">No Rekening:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm" id="norek" name="norek" placeholder="Nomor Rekening">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-sm-4 col-form-label">Cabang:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm" name="cabang" placeholder="Pilih Cabang">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-sm-4 col-form-label">Jenis Rekening:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm" name="jns_rekening" placeholder="Jenis Rekening">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-sm-4 col-form-label">Jenis Pinjaman:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm" name="jns_pinjaman" placeholder="Jenis Pinjaman">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-sm-4 col-form-label">Jenis Fasilitas:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm" name="jns_fasilitas" placeholder="Jenis Fasilitas">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add more form fields as needed -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal" id ="cancelBtn">Close</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="submitFormBtn">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@push('customscript')
|
||||
<script>
|
||||
$(function() {
|
||||
@ -123,11 +183,6 @@
|
||||
$('.loading1').hide();
|
||||
let dateString ='';
|
||||
$.each(items, function(i, index) {
|
||||
if (items[i]['MATURITY_DATE']) {
|
||||
dateString = moment(items[i]['MATURITY_DATE']).format("YYYY-MM-DD");
|
||||
} else {
|
||||
dateString = '-';
|
||||
}
|
||||
$('#dataBody').append('<tr class="secondrow"><td>' + (
|
||||
no++) +
|
||||
'</td><td>' + items[i]['ACCOUNT_NUMBER'] +
|
||||
@ -136,7 +191,7 @@
|
||||
'</td><td>' + items[i]['WORKING_BALANCE'] +
|
||||
'</td><td>' + items[i]['PRODUCT'] +
|
||||
'</td><td>' + items[i]['CURRENCY']+
|
||||
'</td><td class="text-center">'+ dateString +
|
||||
'</td><td class="text-center">'+ items[i]['MATURITY_DATE'] +
|
||||
'</td><td class="tes"><div style="padding-left:22px" class="form-check form-check-custom form-check-solid me-10"><input class=" form-check-input h-20px w-20px acc_no" type="checkbox" name="account_number" value="' +
|
||||
items[i]['ACCOUNT_NUMBER'] + '"></div></td></tr>'
|
||||
);
|
||||
@ -173,6 +228,24 @@
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Open the modal when the button is clicked
|
||||
$("#openModalBtn").click(function() {
|
||||
$("#myModal").modal('show');
|
||||
});
|
||||
|
||||
// Handle form submission when the "Submit" button is clicked
|
||||
$("#submitFormBtn").click(function() {
|
||||
var formData = $("#myForm2").serialize();
|
||||
console.log(formData);
|
||||
$("#myModal").modal('hide');
|
||||
});
|
||||
|
||||
$("#cancelBtn").click(function() {
|
||||
$("#myModal").modal('hide');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user