@extends('fragments.fullTemplate') @php $id_usuario = session('id_usuario'); if (! session('id_usuario')) { header('location: /'); die(); } $esGerente = (($permisos->gerente ?? 0) == 1); $puedeAutorizarCalidad = $es_calidad ?? false; $puedeVerAutorizacion = $puedeAutorizarCalidad || $esGerente; @endphp @section('contenido')
@if(session()->has('success')) @endif @if(session()->has('warning')) @endif @if(session()->has('error')) @endif @if (count($errors) > 0) @endif
@include('Control_documentos.Notificacion.notificacion_documento_version') @if ($permisos->crear == 1 || $esGerente)
@endif

{{$datos_documento_version->count()}} resultados en esta página

@if ($puedeVerAutorizacion) @endif @if($esGerente) @endif @foreach ($datos_documento_version as $dato) @php $firmas = $firmas_count[$dato->id_documento_version] ?? null; $completo = $firmas && $firmas->total > 0 && $firmas->total == $firmas->firmados; $autorizado = $dato->estatus_autorizacion == 1; $difusion_completa = $completo && $autorizado; @endphp @if ($puedeVerAutorizacion) @endif @if($esGerente) @endif @if($esGerente) @endif @endforeach
Nombre del documento Clave Versión Fecha de alta Estatus versiónAutorización área calidadFirma de personalEstatus difusión Dudas de la difusión Creado porAcciones
{{$dato->nombre_archivo}} {{$dato->clave}} {{ $dato->numero_version ?? '1' }} {{ $dato->fecha ? \Carbon\Carbon::parse($dato->fecha)->format('d/m/Y') : 'N/A' }} @switch($dato->estatus) @case("Activo") Activo @break @case("Inactivo") Inactivo @break @default @endswitch @if ($dato->estatus_autorizacion != null) @switch($dato->estatus_autorizacion) @case(0) @if($difusion_completa) @else @if($puedeAutorizarCalidad) Sin autorizar @else @endif @endif @break @case(1) @if($difusion_completa) @else @if($puedeAutorizarCalidad) Autorizado @if($dato->fecha_autorizacion)
{{ \Carbon\Carbon::parse($dato->fecha_autorizacion)->format('d/m/Y h:i a') }} @endif
@else @endif @endif @break @endswitch @else @if($puedeAutorizarCalidad) Sin autorizar @else @endif @endif
@php $firma = $firmas_usuario[$dato->id_documento_version] ?? null; $puedeFirmar = $firma != null; @endphp {{-- NO PERTENECE A LA LÍNEA --}} @if(!$puedeFirmar) {{-- ESPERANDO AUTORIZACIÓN --}} @elseif($dato->estatus_autorizacion != 1) {{--PUEDE FIRMAR --}} @elseif($firma->estatus == 0) @if($difusion_completa) @else @endif {{-- YA FIRMÓ --}} @elseif($firma->estatus == 1) @php $total = $firmas_count[$dato->id_documento_version]->total ?? 0; $firmados = $firmas_count[$dato->id_documento_version]->firmados ?? 0; $fecha_final = $firmas_finalizadas[$dato->id_documento_version]->fecha_final ?? null; @endphp
@if($difusion_completa) @else @endif
@endif
@php $total = $firmas_count[$dato->id_documento_version]->total ?? 0; $firmados = $firmas_count[$dato->id_documento_version]->firmados ?? 0; @endphp @if($dato->estatus_autorizacion != 1) Pendiente @elseif($firmados == 0) Pendiente @elseif($firmados < $total) Usuarios pendientes por firmar @else Completa @endif @php $dudas = $dudas_count[$dato->id_documento_version]->total ?? 0; @endphp @if($dudas == 0) 0 @else {{ $dudas }} @endif {{ $dato->creado_por ?? 'N/A' }}
{{-- DIFUSIÓN DE CAMBIOS --}} @if ($esGerente) @endif {{-- DUDAS --}} {{-- VISOR --}} {{-- FIRMAS --}} @if ($esGerente) @endif {{-- NOTIFICACIONES --}} @if ($esGerente) @php $bloquear_notificacion = $difusion_completa; @endphp @endif {{-- EDITAR --}} @if ($permisos->actualizar == 1 || $esGerente) estatus_autorizacion) @case(1) class="ui button green btn_editar_version" @break @default class="ui button green btn_editar_version disabled" @endswitch title="Editar"> @endif {{-- ELIMINAR --}} @if ($permisos->eliminar == 1 || $esGerente) @endif
{{-- $usuarios->links("pagination::bootstrap-4") --}}

Atrás
@include('Control_documentos.delete_version_modal') @include('Control_documentos.edit_version_sistema_modal') @include('Control_documentos.edit_version_modal') @include('Control_documentos.delete_archivo_modal') @include('Control_documentos.notificacion_modal') @include('Control_documentos.delete_notificacion_modal') @include('Control_documentos.create_version_2-0_modal') @include('Control_documentos.edit_version_2-0_modal') @include('Control_documentos.dudas_modal') @include('Control_documentos.dudas_scripts') @include('Control_documentos.firmas_modal') @endsection