add loading modal
This commit is contained in:
@ -8,6 +8,19 @@
|
||||
<!-- CDN untuk jQuery Validation -->
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||
<style>
|
||||
.bd-example-modal-lg .modal-dialog{
|
||||
display: table;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
top: calc(50% - 24px);
|
||||
}
|
||||
|
||||
.bd-example-modal-lg .modal-dialog .modal-content{
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Card body-->
|
||||
<div class="card-body pt-6">
|
||||
@ -196,6 +209,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal loading spiner -->
|
||||
|
||||
<div class="modal fade bd-example-modal-lg modalSpiner" data-backdrop="static" data-keyboard="false" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content" style="width: 48px">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@push('customscript')
|
||||
<script>
|
||||
@ -324,6 +351,10 @@
|
||||
var periode = $('input[name="periode"]').val();
|
||||
var acc_no = $('input[name="acc_no"]').val();
|
||||
var signer = $("#signer-select").find('option:selected').val();
|
||||
$("#signerModal").modal('hide');
|
||||
$('.modalSpiner').modal('show');
|
||||
var dt = new Date();
|
||||
var date = dt.getYear() + ":" + dt.getDate() + ":" + dt.getHours();
|
||||
// var formData = $("#formSigner").serialize();
|
||||
var dataToSend = {
|
||||
_token: $('meta[name="csrf-token"]').attr('content'),
|
||||
@ -344,11 +375,12 @@
|
||||
responseType: 'blob'
|
||||
},
|
||||
success: function(response) {
|
||||
$("#signerModal").modal('hide');
|
||||
var blob = new Blob([response]);
|
||||
console.log(response);
|
||||
$('.modalSpiner').modal('hide');
|
||||
var blob = new Blob([response]);
|
||||
var link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = "techsolutionstuff.pdf";
|
||||
link.download = "konfirmasibank_" + date + ".pdf";
|
||||
link.click();
|
||||
|
||||
},
|
||||
|
Reference in New Issue
Block a user