tambah fungsi add fasilitas
This commit is contained in:
15
Resources/views/pages/dynamic_table.blade.php
Normal file
15
Resources/views/pages/dynamic_table.blade.php
Normal file
@ -0,0 +1,15 @@
|
||||
<table class="table table-striped " id="">
|
||||
<tbody id="">
|
||||
<tr style="display:none" class="loading1">
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
<td class="text-center"><input class="" type="text" name=""></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -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');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
374
Resources/views/pages/index_fasilitas.blade.php
Normal file
374
Resources/views/pages/index_fasilitas.blade.php
Normal file
@ -0,0 +1,374 @@
|
||||
<x-default-layout>
|
||||
@php
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
|
||||
<!--begin::Card-->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Card body-->
|
||||
<div class="card-body pt-6">
|
||||
<div class="d-flex justify-content-end ">
|
||||
<button type="button" class="btn btn-primary btn-sm " style="margin-right:35px" id="openModalBtn">
|
||||
<i class="ki-duotone ki-exit-down fs-2"><span class="path1"></span><span class="path2"></span></i>
|
||||
Tambah
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body pt-6">
|
||||
<div class="table-responsive " style="overflow-x:auto;">
|
||||
<div id="user_table">
|
||||
@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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Card body-->
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<!-- Modal header -->
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">Tambah Fasilitas</h5>
|
||||
<button type="button" class="closeButton" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="myFormInput" action="{{ route($route[0] . '.postFasilitas') }}">
|
||||
@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">
|
||||
</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">
|
||||
<option selected>Pilih Jenis Fasilitas</option>
|
||||
@foreach ($data['limitReference'] as $item)
|
||||
<option value="{{$item->SHORT_NAME}}">{{$item->SHORT_NAME}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Saldo</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control form-control-sm " name="saldo" placeholder="Saldo">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Start Date</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="date" class="form-control form-control-sm " name="start_date"
|
||||
placeholder="Start Date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Due Date</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="date" class="form-control form-control-sm " name="due_date"
|
||||
placeholder="Due Date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Jangka Waktu</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control form-control-sm " name="jangka_waktu"
|
||||
placeholder="Jangka Waktu">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Fixed Rate</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control form-control-sm " name="fixed_rate"
|
||||
placeholder="Fixed Rate">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Keterangan</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" class="form-control form-control-sm " name="keterangan"
|
||||
placeholder="Keterangan"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add more form fields here -->
|
||||
|
||||
<!-- Modal footer -->
|
||||
<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>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade myModalEdit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<!-- Modal header -->
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">Tambah Fasilitas</h5>
|
||||
<button type="button" class="closeButton" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">
|
||||
<div id="errors"></div>
|
||||
<form class="form-horizontal" id="myFormUpdate" action="{{ route($route[0] . '.updateFasilitas') }}">
|
||||
@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="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>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Jenis Fasilitas</label>
|
||||
<div class="col-sm-9">
|
||||
{{-- <input type="text" class="form-control form-control-sm " id="jnsFasilitas" name="jenis_fasilitas" placeholder="Jenis Fasilitas"> --}}
|
||||
<select class="form-select form-select-sm" aria-label="Small select example"
|
||||
id="jnsFaasilitas-select" name="jenis_fasilitas">
|
||||
<option selected>Pilih Jenis Fasilitas</option>
|
||||
@foreach ($data['limitReference'] as $item)
|
||||
<option value="{{$item->SHORT_NAME}}">{{$item->SHORT_NAME}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Saldo</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control form-control-sm " id="saldo" name="saldo"
|
||||
placeholder="Saldo">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Start Date</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="date" class="form-control form-control-sm" id="startDate" name="start_date"
|
||||
placeholder="Start Date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Due Date</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="date" class="form-control form-control-sm " id="dueDatae" name="due_date"
|
||||
placeholder="Due Date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Jangka Waktu</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control form-control-sm " id="jangkaWaktu" name="jangka_waktu"
|
||||
placeholder="Jangka Waktu">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Fixed Rate</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control form-control-sm " id="fixedRate" name="fixed_rate"
|
||||
placeholder="Fixed Rate">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Keterangan</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea type="text" class="form-control form-control-sm " id="ket" name="keterangan"
|
||||
placeholder="Keterangan"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add more form fields here -->
|
||||
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary btn-sm closeButton2"
|
||||
data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="submitFormUpdate">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('customscript')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Open the modal when the "Open Modal" button is clicked
|
||||
$("#openModalBtn").click(function() {
|
||||
$("#myModal").modal('show');
|
||||
});
|
||||
$(".closeButton").click(function() {
|
||||
$("#myModal").modal('hide');
|
||||
});
|
||||
$(".closeButton2").click(function() {
|
||||
$(".myModalEdit").modal('hide');
|
||||
});
|
||||
|
||||
// Handle form submission when the "Submit" button inside the modal is clicked
|
||||
$("#submitFormBtn").click(function(e) {
|
||||
// Serialize the form data
|
||||
e.preventDefault();
|
||||
var formData = $("#myFormInput").serialize();
|
||||
// Send an AJAX request to the form submission route
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "{{ route('konfirmasibank.postFasilitas') }}",
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
// Handle success response (e.g., show a success message)
|
||||
var _data = JSON.parse(data);
|
||||
toastr.success(_data.message);
|
||||
form[0].reset();
|
||||
$('#table4').ajax.reload();
|
||||
// Optionally, close the modal
|
||||
$("#myModal").modal('hide');
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error response (if applicable)
|
||||
var errors = data.responseJSON.errors;
|
||||
$.each(errors, function(key, value) {
|
||||
toastr.error(value);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(".btnEdit").click(function(e) {
|
||||
// Serialize the form data
|
||||
e.preventDefault();
|
||||
var id = $(this).data('id');
|
||||
var dataToSend = {
|
||||
_token: $('meta[name="csrf-token"]').attr('content'),
|
||||
id: id
|
||||
};
|
||||
// Send an AJAX request to the form submission route
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "{{ route('konfirmasibank.editFasilitas') }}",
|
||||
data: dataToSend,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
$('#jnsFaasilitas-select option[value="' + response.jenis_fasilitas + '"]').prop(
|
||||
'selected', true);
|
||||
$('input[name="nomor_rekening"]').val(response.nomor_rekening);
|
||||
$('input[name="jenis_fasilitas"]').val(response.jenis_fasilitas);
|
||||
$('input[name="saldo"]').val(response.saldo);
|
||||
$('input[name="start_date"]').val(response.start_date);
|
||||
$('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');
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// Handle error response (if applicable)
|
||||
var errors = data.responseJSON.errors;
|
||||
$.each(errors, function(key, value) {
|
||||
toastr.error(value);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#submitFormUpdate").click(function(e) {
|
||||
// Serialize the form data
|
||||
e.preventDefault();
|
||||
var formData = $("#myFormUpdate").serialize();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{{ route('konfirmasibank.updateFasilitas') }}",
|
||||
data: formData, // serializes the form's elements.
|
||||
success: function(data) {
|
||||
$(".myModalEdit").modal('hide');
|
||||
var _data = JSON.parse(data);
|
||||
toastr.success(_data.message);
|
||||
location.reload();
|
||||
|
||||
},
|
||||
error: function(data, textStatus, errorThrown) {
|
||||
var errors = data.responseJSON.errors;
|
||||
$.each(errors, function(key, value) {
|
||||
toastr.error(value);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(".btnDelete").click(function(e) {
|
||||
// var form = $(this).closest("form");
|
||||
var id = $(this).data('id');
|
||||
var dataToSend = {
|
||||
_token: $('meta[name="csrf-token"]').attr('content'),
|
||||
id: id
|
||||
};
|
||||
e.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, delete it!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{{ route('konfirmasibank.destroyFasilitas') }}",
|
||||
data: dataToSend, // serializes the form's elements.
|
||||
success: function(data) {
|
||||
toastr.success('has been deleted.', 'Success!', {
|
||||
timeOut: 5000
|
||||
});
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
||||
|
||||
</x-default-layout>
|
@ -23,7 +23,6 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
53
Resources/views/pages/table_fasilitas.blade.php
Normal file
53
Resources/views/pages/table_fasilitas.blade.php
Normal file
@ -0,0 +1,53 @@
|
||||
<table class="table table-striped " id="table4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">No</th>
|
||||
<th class="text-center">No Rekening</th>
|
||||
<th class="text-center">Jenis Rekening</th>
|
||||
<th class="text-center">Saldo</th>
|
||||
<th class="text-center">Start Date</th>
|
||||
<th class="text-center">Due Date</th>
|
||||
<th class="text-center">Fixed Rate</th>
|
||||
<th class="text-center">Keterangan</th>
|
||||
<th class="text-center" width="100px">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="dataBody">
|
||||
@php
|
||||
$no = 1;
|
||||
@endphp
|
||||
@if (count($data['fasilitas']) > 0)
|
||||
@foreach ($data['fasilitas'] as $item)
|
||||
<tr class="row-none">
|
||||
<td class="text-center">{{($no++ )}}</td>
|
||||
<td class="text-center">{{$item['nomor_rekening']}}</td>
|
||||
<td class="text-center">{{$item['jenis_fasilitas']}}</td>
|
||||
<td class="text-center">{{$item['saldo']}}</td>
|
||||
<td class="text-center">{{$item['start_date']}}</td>
|
||||
<td class="text-center">{{$item['due_date']}}</td>
|
||||
<td class="text-center">{{$item['fixed_rate']}}</td>
|
||||
<td class="text-center">{{$item['keterangan']}}</td>
|
||||
<td class="text-center">
|
||||
<a href="#" class="kt_edit_form btn btn-icon btn-bg-light btn-active-light-warning btn-sm me-1 btnEdit" data-id="{{$item['id']}}">{!!getIcon("pencil", "fs-1 text-warning","duotune") !!}</a>
|
||||
<a href="#" class="kt_edit_form btn btn-icon btn-bg-light btn-active-light-danger btn-sm me-1 btnDelete"data-id="{{$item['id']}}">{!! getIcon("trash", "fs-1 text-danger","duotune") !!}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="row-none">
|
||||
<td colspan="10" class="text-center">Tidak Ada Data Yang Ditampilkan</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr style="display:none" class="loading1">
|
||||
<td colspan="10" class="text-center">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="d-flex">
|
||||
{!! $data['fasilitas']->links() !!}
|
||||
</div>
|
Reference in New Issue
Block a user