perbaikan tampilan print out
This commit is contained in:
@@ -13,6 +13,7 @@ use Maatwebsite\Excel\Facades\Excel;
|
||||
use Modules\Lpj\Exports\KertasKerjaExport;
|
||||
use Modules\Lpj\Http\Controllers\SurveyorController;
|
||||
use Modules\Location\Models\Province;
|
||||
|
||||
class PenilaiController extends Controller
|
||||
{
|
||||
public $user;
|
||||
@@ -604,7 +605,7 @@ class PenilaiController extends Controller
|
||||
}
|
||||
|
||||
|
||||
$pdf =Pdf::loadView('lpj::penilai.components.print-out', compact(
|
||||
$pdf = PDF::loadView('lpj::penilai.components.print-out', compact(
|
||||
'permohonan',
|
||||
'forminspeksi',
|
||||
'lpjData',
|
||||
@@ -612,12 +613,21 @@ class PenilaiController extends Controller
|
||||
'basicData',
|
||||
'inspeksi',
|
||||
'lpj'
|
||||
));
|
||||
));
|
||||
|
||||
$pdf->setPaper('A4', 'portrait');
|
||||
|
||||
return $pdf->download('laporan.pdf');
|
||||
|
||||
// return view('lpj::penilai.components.print-out', compact(
|
||||
// 'permohonan',
|
||||
// 'forminspeksi',
|
||||
// 'lpjData',
|
||||
// 'formFoto',
|
||||
// 'basicData',
|
||||
// 'inspeksi',
|
||||
// 'lpj'
|
||||
// ));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -181,8 +181,7 @@
|
||||
actions: {
|
||||
title: 'Action',
|
||||
render: (item, data) => {
|
||||
|
||||
if (data.status === 'done') {
|
||||
if (data.status === 'done' || data.status === 'proses-laporan') {
|
||||
return `
|
||||
<div class="flex flex-nowrap justify-center gap-1.5">
|
||||
<a class="btn btn-sm btn-outline btn-info" href="penilai/${data.id}/show">
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-5">
|
||||
<a class="btn btn-success" href="{{ route('penilai.print-out') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
|
||||
<a class="btn btn-success" href="{{ route('penilai.print-out') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}" >
|
||||
PRINT OUT
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -11,10 +11,30 @@
|
||||
$dataHeader = strtolower($header ?? '');
|
||||
@endphp
|
||||
|
||||
@include('lpj::component.detail-jaminan', ['backLink' => 'otorisator.'. $dataHeader . '.index'])
|
||||
@include('lpj::component.detail-jaminan', ['backLink' => 'otorisator.' . $dataHeader . '.index'])
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<div class="flex gap-2.5">
|
||||
@php
|
||||
$inspeksiId = null;
|
||||
$documentId = null;
|
||||
foreach ($permohonan->debiture->documents as $item) {
|
||||
foreach ($item->inspeksi as $key => $value) {
|
||||
$inspeksiId = $item->id;
|
||||
}
|
||||
$documentId = $item->dokumen_id;
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if ($dataHeader == 'pelaporan')
|
||||
<a class="btn btn-success"
|
||||
href="{{ route('penilai.print-out') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
|
||||
PRINT OUT
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
@@ -26,7 +46,7 @@
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function otorisatorData(dataId) {
|
||||
function otorisatorData(dataId) {
|
||||
const dataHeader = @json($header);
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
@@ -66,7 +86,7 @@
|
||||
error: (error) => {
|
||||
console.error('Error:', error);
|
||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan otorisator.',
|
||||
'error');
|
||||
'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user