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\Exports\KertasKerjaExport;
|
||||||
use Modules\Lpj\Http\Controllers\SurveyorController;
|
use Modules\Lpj\Http\Controllers\SurveyorController;
|
||||||
use Modules\Location\Models\Province;
|
use Modules\Location\Models\Province;
|
||||||
|
|
||||||
class PenilaiController extends Controller
|
class PenilaiController extends Controller
|
||||||
{
|
{
|
||||||
public $user;
|
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',
|
'permohonan',
|
||||||
'forminspeksi',
|
'forminspeksi',
|
||||||
'lpjData',
|
'lpjData',
|
||||||
@@ -612,12 +613,21 @@ class PenilaiController extends Controller
|
|||||||
'basicData',
|
'basicData',
|
||||||
'inspeksi',
|
'inspeksi',
|
||||||
'lpj'
|
'lpj'
|
||||||
));
|
));
|
||||||
|
|
||||||
$pdf->setPaper('A4', 'portrait');
|
$pdf->setPaper('A4', 'portrait');
|
||||||
|
|
||||||
return $pdf->download('laporan.pdf');
|
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: {
|
actions: {
|
||||||
title: 'Action',
|
title: 'Action',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
|
if (data.status === 'done' || data.status === 'proses-laporan') {
|
||||||
if (data.status === 'done') {
|
|
||||||
return `
|
return `
|
||||||
<div class="flex flex-nowrap justify-center gap-1.5">
|
<div class="flex flex-nowrap justify-center gap-1.5">
|
||||||
<a class="btn btn-sm btn-outline btn-info" href="penilai/${data.id}/show">
|
<a class="btn btn-sm btn-outline btn-info" href="penilai/${data.id}/show">
|
||||||
|
|||||||
@@ -258,7 +258,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end gap-5">
|
<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
|
PRINT OUT
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,10 +11,30 @@
|
|||||||
$dataHeader = strtolower($header ?? '');
|
$dataHeader = strtolower($header ?? '');
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@include('lpj::component.detail-jaminan', ['backLink' => 'otorisator.'. $dataHeader . '.index'])
|
@include('lpj::component.detail-jaminan', ['backLink' => 'otorisator.' . $dataHeader . '.index'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<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">
|
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||||
<i class="ki-filled ki-double-check"></i>
|
<i class="ki-filled ki-double-check"></i>
|
||||||
Otorisator {{ $header ?? '' }}
|
Otorisator {{ $header ?? '' }}
|
||||||
@@ -26,7 +46,7 @@
|
|||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
function otorisatorData(dataId) {
|
function otorisatorData(dataId) {
|
||||||
const dataHeader = @json($header);
|
const dataHeader = @json($header);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Apakah Anda yakin?',
|
title: 'Apakah Anda yakin?',
|
||||||
@@ -66,7 +86,7 @@
|
|||||||
error: (error) => {
|
error: (error) => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan otorisator.',
|
Swal.fire('Gagal!', 'Terjadi kesalahan saat melakukan otorisator.',
|
||||||
'error');
|
'error');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user