@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => 'Pengecekan Dokumen / Review']) @php $document = $task->document; $overallStatus = $document->overall_status ?? 'Pending'; $overallStatusMap = [ 'Approved' => ['Disetujui', 'bg-gradient-success'], 'Rejected' => ['Menunggu Perbaikan Supplier', 'bg-gradient-danger'], 'Revisi' => ['Dokumen Sudah Direvisi', 'bg-gradient-info'], 'Pending' => ['Belum Direview', 'bg-gradient-warning'], ]; $overallDisplay = $overallStatusMap[$overallStatus] ?? [$overallStatus, 'bg-gradient-secondary']; $documentTypes = [ 'tds' => 'TDS', 'msds' => 'MSDS', 'sertifikat_halal' => 'Sertifikat Halal', 'halal_declaration' => 'Halal Declaration', 'flowchart' => 'Flowchart', 'others' => 'Dokumen Lainnya', ]; $uploadedCount = collect(array_keys($documentTypes))->filter(fn ($type) => ! empty($document?->$type))->count(); @endphp
@csrf
Kembali {{-- --}}
@include('components.alert') {{-- Konteks review --}}

Workspace Review Dokumen

{{ $task->material->nama_material ?? '-' }}

{{ $task->material->kode_material ?? '-' }}
{{ $overallDisplay[0] }}
Supplier
{{ $task->supplier->nama_vendor ?? '-' }}
PIC Supplier
{{ $task->nama_pic ?? '-' }}
{{ $task->email_pic ?? '-' }}
Dokumen Terunggah
{{ $uploadedCount }} dari {{ count($documentTypes) }}
Terakhir Diperbarui
{{ $document->updated_at?->format('d/m/Y H:i') ?? '-' }}
{{-- Progress review --}}
Progress Review
Berikan keputusan pada setiap dokumen yang diunggah
0/{{ $uploadedCount }}
{{-- Dokumen --}}
Dokumen untuk Direview

Buka file terlebih dahulu, kemudian tentukan keputusan

@if ($uploadedCount > 0) Download Semua @endif
@foreach ($documentTypes as $type => $label)
@include('halals.partials.document-item', [ 'type' => $type, 'label' => $label, 'task' => $task, 'overallStatus' => $overallStatus, ])
@endforeach
{{-- Catatan --}}
Catatan untuk Supplier

Jelaskan bagian yang perlu diperbaiki. Catatan wajib jika ada dokumen yang ditolak.

Catatan wajib diisi ketika ada dokumen yang ditolak.
{{-- Konfirmasi hasil review --}} @endsection @push('js') @endpush