{{-- Sweet Works ERP | app/Modules/Manufacturing/Resources/Views/production-lines/show.blade.php | v1.0 | 30/08/2026 --}} {{-- v1.0 — Detalle de Línea de Producción: recursos asignados y mano de obra. --}} @extends('layouts.vertical') @section('title', $productionLine->code . ' — ' . __('manufacturing.production_lines.title')) @section('content')
{{-- Header --}}
@can('manufacturing.line.edit') {{ __('manufacturing.common.edit') }} @endcan
@csrf
@if(session('success')) @endif
{{-- Datos generales --}}
{{ $productionLine->code }} @if(!$productionLine->is_active) {{ __('manufacturing.common.inactive') }} @endif
{{ __('manufacturing.production_lines.name') }}
{{ $productionLine->name }}
{{ __('manufacturing.work_centers.label') }}
@if($productionLine->workCenter) {{ $productionLine->workCenter->code }} — {{ $productionLine->workCenter->name }} @else — @endif
{{ __('manufacturing.common.description') }}
{{ $productionLine->description ?? '—' }}
{{-- Capacidad --}}
{{ __('manufacturing.production_lines.capacity') }}
{{ number_format($productionLine->capacity_per_hour, 0) }}
{{ __('manufacturing.work_centers.capacity') }}
{{ $productionLine->capacity_uom ?: 'UOM' }}
{{ $productionLine->efficiency_percent }}%
{{ __('manufacturing.work_centers.efficiency') }}
{{ $productionLine->hours_per_shift }}h
{{ __('manufacturing.work_centers.hours_shift') }}
{{ $productionLine->shifts_per_day }}
{{ __('manufacturing.work_centers.shifts_day') }}
@if($productionLine->effective_capacity_per_shift > 0)
{{ __('manufacturing.work_centers.effective_capacity') }}: {{ number_format($productionLine->effective_capacity_per_shift, 2) }} {{ $productionLine->capacity_uom ? '/ ' . $productionLine->capacity_uom : '' }}
@endif
{{-- Recursos asignados --}}
{{ __('manufacturing.production_lines.resources') }} {{ $productionLine->resources->count() }}
@forelse($productionLine->resources as $res) @empty @endforelse
{{ __('manufacturing.production_lines.seq') }} {{ __('manufacturing.work_centers.code') }} {{ __('manufacturing.work_centers.name') }} {{ __('manufacturing.production_lines.resource_type') }} {{ __('manufacturing.work_centers.capacity') }}
{{ $res->pivot->sequence }} {{ $res->code }} {{ $res->name }} {{ $res->type }} {{ number_format($res->capacity_per_hour, 0) }}
{{ __('manufacturing.common.no_records') }}
{{-- Mano de Obra --}}
{{ __('manufacturing.workforce.title') }} {{ $productionLine->employees->count() }}
@if($productionLine->employees->isEmpty())

{{ __('manufacturing.workforce.pending_hr') }}

@else
@foreach($productionLine->employees as $emp) @endforeach
{{ __('manufacturing.workforce.name') }} {{ __('manufacturing.workforce.role') }} {{ __('manufacturing.workforce.shift') }} {{ __('manufacturing.workforce.cost_hr') }} {{ __('manufacturing.common.status') }}
{{ $emp->employee_name ?? ('EMP-' . $emp->employee_id) }} {{ $emp->role ?? '—' }} {{ $emp->shift }} {{ number_format($emp->cost_per_hour, 2) }} @if($emp->is_active) {{ __('manufacturing.common.active') }} @else {{ __('manufacturing.common.inactive') }} @endif
@endif
@endsection