Update: button print (1x, 2x, 3x)
parent
269636bbdc
commit
419a1559d7
|
@ -58,13 +58,16 @@ class Transaksi extends Controller
|
||||||
})
|
})
|
||||||
->addColumn('ubah', function ($data) {
|
->addColumn('ubah', function ($data) {
|
||||||
return '<div class="btn-group">
|
return '<div class="btn-group">
|
||||||
<a href="javascript:void(0)" onclick="printTigaKali(\'' . $data->id . '\')"><span class="btn btn-xs btn-success"><i class="fas fa-print"></i></span></a></div>';
|
<a href="javascript:void(0)" class="mx-1" onclick="printDapurTigaKali(\'' . $data->id . '\')"><span class="btn btn-xs btn-success"><i class="fas fa-print"></i> 3x </span></a>
|
||||||
|
<a href="javascript:void(0)" class="mx-1" onclick="printDapurDuaKali(\'' . $data->id . '\')"><span class="btn btn-xs btn-success"><i class="fas fa-print"></i> 2x </span></a>
|
||||||
|
<a href="javascript:void(0)" class="mx-1" onclick="printDapurSatuKali(\'' . $data->id . '\')"><span class="btn btn-xs btn-success"><i class="fas fa-print"></i> 1x </span></a>
|
||||||
|
</div>';
|
||||||
})
|
})
|
||||||
->rawColumns(['nomor', 'nama_user', 'created_at', 'grand_total', 'ubah'])
|
->rawColumns(['nomor', 'nama_user', 'created_at', 'grand_total', 'ubah'])
|
||||||
->make(true);
|
->make(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function printTigaKali($id)
|
public function printDapurTigaKali($id)
|
||||||
{
|
{
|
||||||
$pesanan = \App\Models\Pesanan::with('detailPesanan', 'user')->find($id);
|
$pesanan = \App\Models\Pesanan::with('detailPesanan', 'user')->find($id);
|
||||||
$data = Pesanan::where('id', $id);
|
$data = Pesanan::where('id', $id);
|
||||||
|
@ -75,6 +78,28 @@ class Transaksi extends Controller
|
||||||
return view('pages.Kasir.print_dapur_3x', compact('pesanan'));
|
return view('pages.Kasir.print_dapur_3x', compact('pesanan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function printDapurDuaKali($id)
|
||||||
|
{
|
||||||
|
$pesanan = \App\Models\Pesanan::with('detailPesanan', 'user')->find($id);
|
||||||
|
$data = Pesanan::where('id', $id);
|
||||||
|
$data->update([
|
||||||
|
'status_printer' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
return view('pages.Kasir.print_dapur_2x', compact('pesanan'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function printDapurSatuKali($id)
|
||||||
|
{
|
||||||
|
$pesanan = \App\Models\Pesanan::with('detailPesanan', 'user')->find($id);
|
||||||
|
$data = Pesanan::where('id', $id);
|
||||||
|
$data->update([
|
||||||
|
'status_printer' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
return view('pages.Kasir.print_dapur', compact('pesanan'));
|
||||||
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
|
|
|
@ -145,9 +145,100 @@
|
||||||
<p style="text-align: center">Terima Kasih, Selamat Datang Kembali</p>
|
<p style="text-align: center">Terima Kasih, Selamat Datang Kembali</p>
|
||||||
<p style="text-align: center;font-size: 7pt;">@sepiringtelurkeriting</p>
|
<p style="text-align: center;font-size: 7pt;">@sepiringtelurkeriting</p>
|
||||||
<hr class="dashed-line" style="margin-top: 15px;">
|
<hr class="dashed-line" style="margin-top: 15px;">
|
||||||
|
|
||||||
|
<!-- Button Print -->
|
||||||
|
<br>
|
||||||
|
<div class="">
|
||||||
|
<div class="col-6 mb">
|
||||||
|
<button class="btn btn-info btn-block hidden-print" id="print-dapur">Print</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mt-2">
|
||||||
|
<button class="btn btn-danger btn-block hidden-print" id="refresh">Refresh
|
||||||
|
Halaman</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
<style>
|
||||||
|
/* Untuk menyembunyikan tombol print */
|
||||||
|
@media print {
|
||||||
|
|
||||||
|
.hidden-print,
|
||||||
|
.hidden-print * {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-right: -7.5px;
|
||||||
|
margin-left: -7.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #212529;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-top-color: transparent;
|
||||||
|
border-right-color: transparent;
|
||||||
|
border-bottom-color: transparent;
|
||||||
|
border-left-color: transparent;
|
||||||
|
padding: .375rem .75rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: .25rem;
|
||||||
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:not(:disabled):not(.disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-info {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #17a2b8;
|
||||||
|
border-color: #17a2b8;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #dc3545;
|
||||||
|
border-color: #dc3545;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-block {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
// window.print();
|
||||||
|
const $btnPrint = document.querySelector("#print-dapur");
|
||||||
|
$btnPrint.addEventListener("click", () => {
|
||||||
window.print();
|
window.print();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#refresh').on('click', function() {
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -190,9 +190,100 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<hr class="style2">
|
<hr class="style2">
|
||||||
|
|
||||||
|
<!-- Button Print -->
|
||||||
|
<br>
|
||||||
|
<div class="">
|
||||||
|
<div class="col-6 mb">
|
||||||
|
<button class="btn btn-info btn-block hidden-print" id="print-dapur">Print</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mt-2">
|
||||||
|
<button class="btn btn-danger btn-block hidden-print" id="refresh">Refresh
|
||||||
|
Halaman</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
<style>
|
||||||
|
/* Untuk menyembunyikan tombol print */
|
||||||
|
@media print {
|
||||||
|
|
||||||
|
.hidden-print,
|
||||||
|
.hidden-print * {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-right: -7.5px;
|
||||||
|
margin-left: -7.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #212529;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-top-color: transparent;
|
||||||
|
border-right-color: transparent;
|
||||||
|
border-bottom-color: transparent;
|
||||||
|
border-left-color: transparent;
|
||||||
|
padding: .375rem .75rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: .25rem;
|
||||||
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:not(:disabled):not(.disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-info {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #17a2b8;
|
||||||
|
border-color: #17a2b8;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #dc3545;
|
||||||
|
border-color: #dc3545;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-block {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
// window.print();
|
||||||
|
const $btnPrint = document.querySelector("#print-dapur");
|
||||||
|
$btnPrint.addEventListener("click", () => {
|
||||||
window.print();
|
window.print();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#refresh').on('click', function() {
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -0,0 +1,223 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
|
||||||
|
<title>Document</title>
|
||||||
|
{{-- <link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> --}}
|
||||||
|
{{-- <link href="https://fonts.googleapis.com/css2?family=Oswald&family=Roboto:wght@300;400&display=swap"
|
||||||
|
rel="stylesheet"> --}}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: Bitum;
|
||||||
|
src: url('/assets/font/Bitum.ttf');
|
||||||
|
}
|
||||||
|
|
||||||
|
@page {
|
||||||
|
margin: 0cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: Bitum;
|
||||||
|
font-size: 8pt;
|
||||||
|
/* transform: scaleY(1.5); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 11pt;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .literely-table td,
|
||||||
|
th,
|
||||||
|
tr {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 0.1px solid rgb(85, 85, 85);
|
||||||
|
} */
|
||||||
|
|
||||||
|
.rotate90 {
|
||||||
|
-webkit-transform: rotate(90deg);
|
||||||
|
-moz-transform: rotate(90deg);
|
||||||
|
-o-transform: rotate(90deg);
|
||||||
|
-ms-transform: rotate(90deg);
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6,
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr.style1 {
|
||||||
|
border-top: 3px double #8c8b8b;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr.style2 {
|
||||||
|
border-top: 1px solid #8c8b8b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashed-line {
|
||||||
|
border: 1.5px dashed black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<body style="width: 58mm;">
|
||||||
|
@for ($i = 0; $i < 2; $i++) <hr class="dashed-line" style="margin-top: 15px;">
|
||||||
|
<p style="text-align: center;font-size: 7pt">Print Dapur</p>
|
||||||
|
<hr class="dashed-line" style="margin-top: 10px;">
|
||||||
|
<span style="display: flex; justify-content: space-between;margin-top: 10px;">
|
||||||
|
<span>
|
||||||
|
<p>{{ tanggal_indonesia($pesanan->tanggal_pesanan) }}</p>
|
||||||
|
<p>{{ date('H:i', strtotime($pesanan->tanggal_pesanan)) }}</p>
|
||||||
|
<p>Meja: {{ $pesanan->nomor_meja }}</p>
|
||||||
|
</span>
|
||||||
|
<span style="text-align: right">
|
||||||
|
<p>{{ $pesanan->kode_pesanan }}</p>
|
||||||
|
<p>Kasir: {{ $pesanan->user->name }}</p>
|
||||||
|
<p>Order: {{ $pesanan->nama_pemesan }}</p>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<p></p>
|
||||||
|
<hr class="style2">
|
||||||
|
<p style="text-align: left; margin-top:3px;">Menu Order</p>
|
||||||
|
<table class="table" style="width: 100%;">
|
||||||
|
<tbody>
|
||||||
|
@foreach ($pesanan->detailPesanan as $item)
|
||||||
|
<tr>
|
||||||
|
<td style="width: 80px;" colspan="3">
|
||||||
|
({{ $item->jumlah_produk }} X)
|
||||||
|
{{ $item->nama_produk }}
|
||||||
|
@if ($item->keterangan_produk != '')
|
||||||
|
<br>
|
||||||
|
<small>
|
||||||
|
ket: {{ $item->keterangan_produk }}
|
||||||
|
</small>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p style="text-align: left; margin-top:5px;">Keterangan Pesanan Keseluruhan</p>
|
||||||
|
<table class="table" style="width: 100%;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 80px;" colspan="3">
|
||||||
|
{{ $pesanan->keterangan_pesanan != '' ? $pesanan->keterangan_pesanan : '-' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<hr class="style2">
|
||||||
|
@endfor
|
||||||
|
|
||||||
|
<!-- Button Print -->
|
||||||
|
<br>
|
||||||
|
<div class="">
|
||||||
|
<div class="col-6 mb">
|
||||||
|
<button class="btn btn-info btn-block hidden-print" id="print-dapur">Print</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mt-2">
|
||||||
|
<button class="btn btn-danger btn-block hidden-print" id="refresh">Refresh
|
||||||
|
Halaman</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<style>
|
||||||
|
/* Untuk menyembunyikan tombol print */
|
||||||
|
@media print {
|
||||||
|
|
||||||
|
.hidden-print,
|
||||||
|
.hidden-print * {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-right: -7.5px;
|
||||||
|
margin-left: -7.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #212529;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-top-color: transparent;
|
||||||
|
border-right-color: transparent;
|
||||||
|
border-bottom-color: transparent;
|
||||||
|
border-left-color: transparent;
|
||||||
|
padding: .375rem .75rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: .25rem;
|
||||||
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:not(:disabled):not(.disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-info {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #17a2b8;
|
||||||
|
border-color: #17a2b8;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #dc3545;
|
||||||
|
border-color: #dc3545;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-block {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
// window.print();
|
||||||
|
const $btnPrint = document.querySelector("#print-dapur");
|
||||||
|
$btnPrint.addEventListener("click", () => {
|
||||||
|
window.print();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#refresh').on('click', function() {
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
|
@ -76,8 +76,7 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<body style="width: 58mm;">
|
<body style="width: 58mm;">
|
||||||
@for ($i = 0; $i < 3; $i++)
|
@for ($i = 0; $i < 3; $i++) <hr class="dashed-line" style="margin-top: 15px;">
|
||||||
<hr class="dashed-line" style="margin-top: 15px;">
|
|
||||||
<p style="text-align: center;font-size: 7pt">Print Dapur</p>
|
<p style="text-align: center;font-size: 7pt">Print Dapur</p>
|
||||||
<hr class="dashed-line" style="margin-top: 10px;">
|
<hr class="dashed-line" style="margin-top: 10px;">
|
||||||
<span style="display: flex; justify-content: space-between;margin-top: 10px;">
|
<span style="display: flex; justify-content: space-between;margin-top: 10px;">
|
||||||
|
@ -118,15 +117,107 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 80px;" colspan="3">
|
<td style="width: 80px;" colspan="3">
|
||||||
{{ $pesanan->keterangan_pesanan != '' ? $pesanan->keterangan_pesanan : '-' }}</td>
|
{{ $pesanan->keterangan_pesanan != '' ? $pesanan->keterangan_pesanan : '-' }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<hr class="style2">
|
<hr class="style2">
|
||||||
@endfor
|
@endfor
|
||||||
|
|
||||||
|
<!-- Button Print -->
|
||||||
|
<br>
|
||||||
|
<div class="">
|
||||||
|
<div class="col-6 mb">
|
||||||
|
<button class="btn btn-info btn-block hidden-print" id="print-dapur">Print</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mt-2">
|
||||||
|
<button class="btn btn-danger btn-block hidden-print" id="refresh">Refresh
|
||||||
|
Halaman</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
<style>
|
||||||
|
/* Untuk menyembunyikan tombol print */
|
||||||
|
@media print {
|
||||||
|
|
||||||
|
.hidden-print,
|
||||||
|
.hidden-print * {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-right: -7.5px;
|
||||||
|
margin-left: -7.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #212529;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-top-color: transparent;
|
||||||
|
border-right-color: transparent;
|
||||||
|
border-bottom-color: transparent;
|
||||||
|
border-left-color: transparent;
|
||||||
|
padding: .375rem .75rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: .25rem;
|
||||||
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:not(:disabled):not(.disabled) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-info {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #17a2b8;
|
||||||
|
border-color: #17a2b8;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #dc3545;
|
||||||
|
border-color: #dc3545;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-block {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
// window.print();
|
||||||
|
const $btnPrint = document.querySelector("#print-dapur");
|
||||||
|
$btnPrint.addEventListener("click", () => {
|
||||||
window.print();
|
window.print();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#refresh').on('click', function() {
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -590,8 +590,18 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
function printTigaKali(id) {
|
function printDapurTigaKali(id) {
|
||||||
var url = "{{ route('transaksi.printTigaKali', '') }}/" + id + '?print=true'
|
var url = "{{ route('transaksi.printDapurTigaKali', '') }}/" + id + '?print=true'
|
||||||
|
window.open(url, '_blank');
|
||||||
|
location.reload(true);
|
||||||
|
}
|
||||||
|
function printDapurDuaKali(id) {
|
||||||
|
var url = "{{ route('transaksi.printDapurDuaKali', '') }}/" + id + '?print=true'
|
||||||
|
window.open(url, '_blank');
|
||||||
|
location.reload(true);
|
||||||
|
}
|
||||||
|
function printDapurSatuKali(id) {
|
||||||
|
var url = "{{ route('transaksi.printDapurSatuKali', '') }}/" + id + '?print=true'
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
location.reload(true);
|
location.reload(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,9 @@ Route::group(['prefix' => 'transaksi'], function () {
|
||||||
Route::get('/detail/{id}', [Transaksi::class, 'detail'])->name('transaksi.detail');
|
Route::get('/detail/{id}', [Transaksi::class, 'detail'])->name('transaksi.detail');
|
||||||
Route::post('/cari-paket', [Transaksi::class, 'selectPaket'])->name('transaksi.cari-paket');
|
Route::post('/cari-paket', [Transaksi::class, 'selectPaket'])->name('transaksi.cari-paket');
|
||||||
Route::get('/getCetakTigaKali', [Transaksi::class, 'getCetakTigaKali'])->name('transaksi.getCetakTigaKali');
|
Route::get('/getCetakTigaKali', [Transaksi::class, 'getCetakTigaKali'])->name('transaksi.getCetakTigaKali');
|
||||||
Route::get('/printTigaKali/{id}', [Transaksi::class, 'printTigaKali'])->name('transaksi.printTigaKali');
|
Route::get('/printDapurTigaKali/{id}', [Transaksi::class, 'printDapurTigaKali'])->name('transaksi.printDapurTigaKali');
|
||||||
|
Route::get('/printDapurDuaKali/{id}', [Transaksi::class, 'printDapurDuaKali'])->name('transaksi.printDapurDuaKali');
|
||||||
|
Route::get('/printDapurSatuKali/{id}', [Transaksi::class, 'printDapurSatuKali'])->name('transaksi.printDapurSatuKali');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'history'], function () {
|
Route::group(['prefix' => 'history'], function () {
|
||||||
|
|
Loading…
Reference in New Issue