Perbaikan temuan UAT
This commit is contained in:
@ -7,6 +7,9 @@
|
||||
|
||||
<!-- CDN untuk jQuery Validation -->
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.6.0/mammoth.browser.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.6.0/mammoth.browser.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||
<style>
|
||||
.bd-example-modal-lg .modal-dialog{
|
||||
@ -38,7 +41,13 @@
|
||||
<div class="row mb-3">
|
||||
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Cabang</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control form-control-sm" name="kodecabang" id="kodecabang" placeholder="Nama Cabang">
|
||||
{{-- <input type="text" class="form-control form-control-sm" name="kodecabang" id="kodecabang" placeholder="Nama Cabang"> --}}
|
||||
<select name="kodecabang" class="form-select form-select-sm mb-2">
|
||||
<option value="" @readonly(true)>-- Pilih Cabang --</option>
|
||||
@foreach ($data['company'] as $item)
|
||||
<option value="{{ $item->COMPANY_NAME }}" >{{ $item->COMPANY_NAME }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
@ -233,6 +242,7 @@
|
||||
|
||||
|
||||
@push('customscript')
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('.mycheck').hide();
|
||||
@ -409,22 +419,39 @@
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{{ route('konfirmasibank.export') }}",
|
||||
url: "{{ route('konfirmasibank.exportWord') }}",
|
||||
data: dataToSend, // serializes the form's elements.
|
||||
xhrFields: {
|
||||
responseType: 'blob'
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
$('.modalSpiner').modal('hide');
|
||||
var blob = new Blob([response]);
|
||||
success: function(data) {
|
||||
|
||||
// Create a Blob from the response data
|
||||
var blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
||||
var dt = new Date();
|
||||
var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
|
||||
|
||||
// Create a link element
|
||||
var link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = "konfirmasibank_" + date + ".pdf";
|
||||
|
||||
// Set the download attribute with the desired file name
|
||||
link.download = 'KonfirmasiBank_' + time +'.doc';
|
||||
|
||||
// Append the link to the document body
|
||||
document.body.appendChild(link);
|
||||
|
||||
// Programmatically click the link to trigger the download
|
||||
link.click();
|
||||
|
||||
// Remove the link from the document
|
||||
document.body.removeChild(link);
|
||||
toastr.success(data.message);
|
||||
// location.reload();
|
||||
$('.modalSpiner').modal('hide');
|
||||
},
|
||||
error: function(data, textStatus, errorThrown) {
|
||||
$('.modalSpiner').modal('hide');
|
||||
var errors = data.responseJSON.errors;
|
||||
$.each(errors, function(key, value) {
|
||||
toastr.error(value);
|
||||
|
Reference in New Issue
Block a user