@extends('layouts.teknisi') @section('title', 'Detail Laporan Produksi #' . $production->id . ' - Teknisi') @section('content')

Detail Produksi

Produksi #{{ $production->id }} - {{ $production->product->product_title ?? 'N/A' }}

LAPORAN PRODUKSI

POLJAM TECH

Nomor Laporan: PROD-{{ str_pad($production->id, 6, '0', STR_PAD_LEFT) }}
Tanggal Laporan: {{ now()->format('d M Y, H:i') }}

Order ID

#{{ $production->order->id ?? 'N/A' }}

{{ $production->order->customer_name ?? 'N/A' }}

Produk

{{ $production->product->product_title ?? 'N/A' }}

Qty: {{ $production->quantity ?? 1 }} unit

Status

@php $statusColors = [ 'menunggu' => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300', 'dalam_proses' => 'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300', 'selesai' => 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300', 'dibatalkan' => 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300', ]; $statusIcons = [ 'menunggu' => 'fa-pause', 'dalam_proses' => 'fa-cogs', 'selesai' => 'fa-check-circle', 'dibatalkan' => 'fa-times-circle', ]; $status = $production->status; $color = $statusColors[$status] ?? $statusColors['menunggu']; $icon = $statusIcons[$status] ?? 'fa-circle'; @endphp {{ ucfirst(str_replace('_',' ',$status)) }}

{{ $production->created_at?->format('d M Y') }}

Total Biaya

Rp {{ number_format($totalCost,0,',','.') }}

Semua komponen

Personil yang Terlibat

Teknisi Bertanggung Jawab
{{ $production->teknisi->name ?? 'N/A' }}
ID: {{ $production->teknisi_id ?? 'N/A' }}
@if($production->supervisor)
Supervisor
{{ $production->supervisor->name ?? 'N/A' }}
@if($production->approved_at) Approved: {{ $production->approved_at->format('d M Y') }} @endif
@endif @if($production->completionApprover)
Completion Approver
{{ $production->completionApprover->name ?? 'N/A' }}
@if($production->completion_approved_at) Approved: {{ $production->completion_approved_at->format('d M Y') }} @endif
@endif

Status Approval

Planning Status
@php $planningStatusColors = [ 'planning' => 'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300', 'pending_approval' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300', 'approved' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300', 'rejected' => 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300', ]; $planningStatus = $production->planning_status ?? 'planning'; $planningColor = $planningStatusColors[$planningStatus] ?? $planningStatusColors['planning']; @endphp {{ ucfirst(str_replace('_',' ',$planningStatus)) }} @if($production->approved_at)
Approved: {{ $production->approved_at->format('d M Y, H:i') }}
@endif
@if($production->completion_status)
Completion Status
@php $completionStatusColors = [ 'pending_approval' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300', 'approved' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300', 'rejected' => 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300', ]; $completionStatus = $production->completion_status; $completionColor = $completionStatusColors[$completionStatus] ?? $completionStatusColors['pending_approval']; @endphp {{ ucfirst(str_replace('_',' ',$completionStatus)) }} @if($production->completion_approved_at)
Approved: {{ $production->completion_approved_at->format('d M Y, H:i') }}
@endif
@endif

Biaya Bahan

{{ ucfirst(str_replace('_', ' ', $production->materials_status ?? 'pending')) }}
Rp {{ number_format($materialTotal,0,',','.') }}
@if($production->materials_received_at)
Diterima: {{ $production->materials_received_at->format('d M Y, H:i') }} @if($production->materialsReceiver) oleh {{ $production->materialsReceiver->name }} @endif
@endif
@forelse($production->productionMaterials as $pm)
{{ $pm->material->name }}
{{ rtrim(rtrim(number_format($pm->quantity, 2, ',', '.'), '0'), ',') }} {{ $pm->unit }} × Rp {{ number_format($pm->unit_cost,0,',','.') }}
Rp {{ number_format($pm->total_cost,0,',','.') }}
@empty

Tidak ada bahan baku

@endforelse

Biaya Sparepart

{{ ucfirst(str_replace('_', ' ', $production->spareparts_status ?? 'pending')) }}
Rp {{ number_format($sparepartTotal,0,',','.') }}
@if($production->spareparts_received_at)
Diterima: {{ $production->spareparts_received_at->format('d M Y, H:i') }} @if($production->sparepartsReceiver) oleh {{ $production->sparepartsReceiver->name }} @endif
@endif
@forelse($production->productionSpareparts as $ps)
{{ $ps->sparepart->name }}
{{ rtrim(rtrim(number_format($ps->quantity, 2, ',', '.'), '0'), ',') }} {{ $ps->unit }} × Rp {{ number_format($ps->unit_cost,0,',','.') }}
Rp {{ number_format($ps->total_cost,0,',','.') }}
@empty

Tidak ada sparepart

@endforelse

Upah Labor

Rp {{ number_format($laborTotal,0,',','.') }}
Informasi Labor
Biaya tenaga kerja untuk produksi ini
Total Biaya Produksi
Rp {{ number_format($totalCost,0,',','.') }}
Bahan
Rp {{ number_format($materialTotal,0,',','.') }}
Sparepart
Rp {{ number_format($sparepartTotal,0,',','.') }}
Labor
Rp {{ number_format($laborTotal,0,',','.') }}

Timeline Produksi

Ditugaskan
{{ $production->assigned_at ? $production->assigned_at->format('d M Y, H:i') : 'N/A' }}
@if($production->actual_start_date)
Mulai Produksi
{{ $production->actual_start_date->format('d M Y, H:i') }}
@endif @if($production->estimated_completion_date)
Estimasi Selesai
{{ $production->estimated_completion_date->format('d M Y') }}
@endif @if($production->completed_at)
Selesai
{{ $production->completed_at->format('d M Y, H:i') }}
@endif
Dibuat
{{ $production->created_at->format('d M Y, H:i') }}
@if($production->updated_at && $production->updated_at != $production->created_at)
Terakhir Diupdate
{{ $production->updated_at->format('d M Y, H:i') }}
@endif

Informasi Produksi

@if($production->estimated_duration_days)
Durasi Estimasi
{{ $production->estimated_duration_days }} hari
@endif @if($actualDurationFormatted)
Durasi Aktual
{{ $actualDurationFormatted }}
@if($actualDuration && $actualDuration < 1 && $actualDuration > 0)
(sekitar {{ number_format($actualDuration * 24, 1, ',', '.') }} jam)
@elseif($actualDuration && $actualDuration >= 1)
({{ number_format($actualDuration, 1, ',', '.') }} hari)
@endif
@endif @if($production->completion_notes)
Catatan Penyelesaian
{{ $production->completion_notes }}
@endif @if($production->supervisor_feedback)
Feedback Supervisor
{{ $production->supervisor_feedback }}
@endif @if($production->notes)
Catatan
{{ $production->notes }}
@endif
Teknisi yang Bertanggung Jawab
{{ $production->teknisi->name ?? 'N/A' }}
ID: {{ $production->teknisi_id ?? 'N/A' }}
Tanggal Laporan
{{ now()->format('d M Y') }}
{{ now()->format('H:i') }} WIB
@push('styles') @endpush @endsection