@extends('layouts.digitar') @section('Breadcrumbs') {!! Breadcrumbs::render('lawsProjects.show') !!} @endsection @section('content')

TRAMITAÇÃO

Voltar
@forelse($processing_last as $processing) @php $observationPreview = trim(strip_tags($processing->obsevation ?? '')); $hasObservation = $observationPreview !== ''; $observationModalId = 'lawProcessingObservationModal' . $processing->id; $observationContentId = 'lawProcessingObservationContent' . $processing->id; $responsePreview = trim(strip_tags($processing->response_text ?? '')); $hasResponseText = $responsePreview !== ''; $responseModalId = 'lawProcessingResponseModal' . $processing->id; $responseContentId = 'lawProcessingResponseContent' . $processing->id; $responseDocumentItems = $processing->responseDocumentItems; $responseDocumentLabel = $responseDocumentItems ->map(function ($responseDocument) { $responseDocumentType = optional($responseDocument->document_type)->name ?? 'Documento'; $responseDocumentNumber = $responseDocument->number ?: 'Sem número'; if (!empty($responseDocument->date)) { return $responseDocumentType . ' ' . $responseDocumentNumber . '/' . $responseDocument->getYear($responseDocument->date); } return $responseDocumentType . ' ' . $responseDocumentNumber; }) ->implode(' | '); $responseDocumentFileId = optional($processing->responseDocumentFile)->id; $responseDocumentFileLabel = optional($processing->responseDocumentFile)->filename_origin ?: optional($processing->responseDocumentFile)->filename ?: ''; $responseUserName = optional($processing->responseUser)->short_name ?: optional($processing->responseUser)->name ?: 'Não informado'; $responseSectorName = optional($processing->responseSector)->name ?: optional(optional($processing->destination)->sector)->name ?: 'Não informado'; $authUser = Auth::user(); $destinationSectorId = optional($processing->destination)->sector_id; $destinationUserId = data_get($processing, 'destination.user.id'); $canRespondStep = $authUser && ( $authUser->hasRole('root') || (int) $processing->user_id === (int) $authUser->id || (!empty($destinationUserId) && (int) $destinationUserId === (int) $authUser->id) || (!empty($authUser->sector_id) && !empty($destinationSectorId) && (int) $destinationSectorId === (int) $authUser->sector_id) || (empty($destinationUserId) && empty($destinationSectorId)) ); @endphp
{{ $loop->first ? 'Trâmite atual' : 'Etapa ' . $loop->iteration }}

{{ optional($processing->adviceSituationLaw)->name ?? 'Não informado' }}

{{ $processing->processing_date }}

Status: {{ optional($processing->statusProcessingLaw)->name ?? 'Não informado' }}

Encaminhado para: {{ optional($processing->destination)->name ?? 'Não informado' }}

Setor: {{ optional(optional($processing->destination)->sector)->name ?? 'Não informado' }}

Prazo: {{ $processing->date_end ?? 'Prazo não definido' }}

Nº Licitação: {{ $processing->number_bids ?? 'Não definido' }}

Nº Contrato: {{ $processing->number_contract ?? 'Não definido' }}

@if ($responseDocumentItems->isNotEmpty())
Documento(s) de resposta vinculado(s) @if ($responseDocumentItems->first()) Abrir documento @endif

Respondido por: {{ $responseUserName }}

Setor da resposta: {{ $responseSectorName }}

@if ($hasResponseText)
Resposta:
{!! \Illuminate\Support\Str::limit(trim(strip_tags($processing->response_text)), 130, '...') !!}
@endif @if ($processing->responseDocumentFile && !empty($processing->responseDocumentFile->filename))
{{ \Illuminate\Support\Str::limit($responseDocumentFileLabel ?: 'Arquivo sem nome', 62, '...') }} Abrir anexo
@elseif ($responseDocumentItems->flatMap(function ($responseDocument) { return $responseDocument->documentFiles; })->isNotEmpty())
@foreach ($responseDocumentItems->flatMap(function ($responseDocument) { return $responseDocument->documentFiles; }) as $file) @if (!empty($file->filename))
{{ \Illuminate\Support\Str::limit($file->filename_origin ?: 'Arquivo sem nome', 62, '...') }} Abrir anexo
@endif @endforeach
@else
Nenhum anexo vinculado a este documento.
@endif
@endif
Observação: @if ($hasObservation)
{!! \Illuminate\Support\Str::limit(trim(strip_tags($processing->obsevation)), 130, '...') !!}
@else
Nenhuma observação registrada.
@endif
@if ($canRespondStep) @endif @if ($processing->processing_file) Download Arquivo @endif @if (Auth::user()->id == $processing->user_id || $first_processing->id === $processing->id || Auth::user()->hasRole('root')) @if ($_SERVER['HTTP_HOST'] == 'cmcostarica.sis.superlegis.com.br' || $_SERVER['HTTP_HOST'] == 'dev.localhost:8000') @endif @endif
@if ($hasObservation) @endif @if ($hasResponseText) @endif @empty
Não existe tramitação
@endforelse
@endsection