@php $title = 'Painel por Setores'; @endphp

Painel por Setores

Visualização em tempo real da produção em andamento por setor
@forelse($wipPorSetor as $setor => $items)
{{ $setor }}
{{ count($items) }}
@forelse($items as $wip)
OP {{ $wip->ordemProducao->numero_ordem }}
{{ $wip->produto->nome ?? 'N/A' }}
{{ $wip->status }}
Atividade: {{ $wip->atividade->descricao ?? 'N/A' }}
Quantidade {{ number_format($wip->quantidade, 2, ',', '.') }}
Entrada: {{ \Carbon\Carbon::parse($wip->data_entrada_setor)->format('d/m/Y H:i') }} @if($wip->data_saida_setor) Saída: {{ \Carbon\Carbon::parse($wip->data_saida_setor)->format('d/m/Y H:i') }} @endif
@if($wip->status == 'EM_PROCESSO')
Tempo no setor: {{ \Carbon\Carbon::parse($wip->data_entrada_setor)->diffForHumans() }}
@endif @if($wip->status == 'EM_PROCESSO' && $wip->atividade->status != 'CONCLUIDA')
@endif
@empty

Nenhum item neste setor

@endforelse
@empty

Nenhuma produção em andamento

Inicie ordens de produção para visualizar o WIP por setor

@endforelse
Legenda de Status
AGUARDANDO Aguardando início no setor
EM_PROCESSO Em processamento no setor
CONCLUIDO Processamento concluído
REFUGO Marcado como refugo
@php $totalWip = collect($wipPorSetor)->flatten(1)->count(); $emProcesso = collect($wipPorSetor)->flatten(1)->where('status', 'EM_PROCESSO')->count(); $aguardando = collect($wipPorSetor)->flatten(1)->where('status', 'AGUARDANDO')->count(); $concluido = collect($wipPorSetor)->flatten(1)->where('status', 'CONCLUIDO')->count(); @endphp @if($totalWip > 0)

{{ $totalWip }}

Total de Itens WIP

{{ $emProcesso }}

Em Processo

{{ $aguardando }}

Aguardando

{{ $concluido }}

Concluído
@endif