@extends('adminlte::page') @section('plugins.Datatables', true) @section('plugins.Sweetalert2', true) @section('plugins.Select1', true) @section('title', 'Intranet | Registros de Resoluciones') @section('content_header')
@stop @section('content')

Registros de Resoluciones

@slot('segundoSlot') Acción Resolución Tipo de Resolución Mandante Jornada Horario Fecha de Vencimiento Contrato Comercial Quien lo Creo Estado de Operatividad Estado de Vencimiento Días faltantes @endslot @foreach ($resoluciones as $resolucion) @php if($resolucion->tipo=="Excepcional"){ $estadoDeVencimiento=""; $diasFaltantes=0; $start = generarFechaPorDateTime($resolucion->fecha_vencimiento); $end = generarFechaActualPorDateTime(); $diasFaltantes = obtenerDiferenciasDeDiasConContarFinDeSemana($start, $end); if($diasFaltantes>90){ $estadoDeVencimiento="Vigente"; }else if($diasFaltantes>0 && $diasFaltantes<=90){ $estadoDeVencimiento="Por Vencer"; }else if($diasFaltantes<=0){ $estadoDeVencimiento="Vencido"; } } @endphp @if (Gate::check('resoluciones.destroy') || Gate::check('resoluciones.edit'))
@endif {{ $resolucion->resolucion }} {{ $resolucion->tipo }} {{ $resolucion->mandante }} @if (isset($resolucion->jornadaDeTrabajo)) {{ $resolucion->jornadaDeTrabajo->jornada }} @else @endif {{ $resolucion->horario }} @if (isset($resolucion->fecha_vencimiento)) {{ fechaConFormatoDeChile($resolucion->fecha_vencimiento) }} @else @endif @if (isset($resolucion->contratoComercial)) {{ $resolucion->contratoComercial->numero_contrato}} @else @endif {{ $resolucion->usuario->name }} @if ($resolucion->estado == 'Operativo') {{ $resolucion->estado }} @else {{ $resolucion->estado }} @endif @if ($resolucion->tipo=="Excepcional") @if ($estadoDeVencimiento == 'Vigente') {{ $estadoDeVencimiento }} @elseif($estadoDeVencimiento == 'Por Vencer') {{ $estadoDeVencimiento }} @elseif($estadoDeVencimiento == 'Vencido') {{ $estadoDeVencimiento }} @endif {{$diasFaltantes}} @else No Aplica No Aplica @endif @endforeach
@stop @section('footer')
Intranet
Copyright © 2021 GuiñezIngeniería.cl. @stop @section('css') @stop @section('js') @if (Gate::check('resoluciones.create')) @else @endif @stop