{{-- PDF Preview + Inline Annotation (adaptasi dari workflow surat keluar) --}} @php // Untuk Surat Masuk: fokus ke KASMIN sebagai editor anotasi $user = auth()->user(); $canAnnotate = $user && $user->isKASMIN(); $isSignerMode = false; // tidak ada mode signer khusus di surat masuk // Versi PDF yang tersedia: file_annotated (jika ada) atau file_surat if ($suratMasuk->file_annotated) { $pdfToShow = 'annotated'; $pdfVersionLabel = 'Versi Anotasi/Koreksi'; $annotatedTabLabel = 'Anotasi/Koreksi'; } else { $pdfToShow = 'current'; $pdfVersionLabel = 'Versi Asli'; $annotatedTabLabel = 'Anotasi/Koreksi'; } // Di surat masuk: KASMIN boleh annotate di file current maupun annotated $canAnnotateOnCurrentPdf = $canAnnotate && in_array($pdfToShow, ['current', 'annotated']); @endphp @push('styles') @endpush
Dokumen Surat @if($pdfToShow === 'annotated') {{ $pdfVersionLabel }} @endif
@if($suratMasuk->file_surat || $suratMasuk->file_annotated) Download @endif
{{-- Toggle versi (jika ada file_annotated) --}} @if($suratMasuk->file_annotated)
@endif
{{-- Toolbar anotasi untuk KASMIN --}} @if($canAnnotate && $canAnnotateOnCurrentPdf)
{{-- Desktop: single row layout (full tools) --}}
{{-- Mobile: 2 baris --}}
@endif
@if($suratMasuk->file_surat)

Memuat PDF...

@else

Tidak ada file yang tersedia

@endif
@if($suratMasuk->file_surat) @endif
{{-- Modal input teks anotasi --}} @push('scripts') @endpush