@if($projects->count() != 0) @foreach($projects as $key=>$project)
Jefe: @if($project->chief_name != null) {{$project->chief_name}} @endif
Responsable: @if($project->foreman_name != null) {{$project->foreman_name}} @endif
@if($project->client()->first() != null) {{$project->client()->first()->name}} @endif

completion_percent < 30) style="color: red;" @else @if($project->completion_percent > 69) style="color: green;" @else style="color: orange;" @endif @endif>{{$project->completion_percent}}%

Personal

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == "App\EmployeeDetails")
@if($resource->resource()->first()->image_url != null) @else @endif {{ $resource->resource()->first()->names." ".$resource->resource()->first()->surnames}}
{{$resource->resource()->first()->employee_id}}
Cargo:
@if($resource->resource()->first()->charge()->first() != null){{$resource->resource()->first()->charge()->first()->description}}@endif
@php if($resource->resource()->first()->tags != null){ $tagsList = explode('_', $resource->resource()->first()->tags); foreach($tagsList as $value){ $tag = $tags->where('id', $value)->first(); if($tag != null){ @endphp
@php echo $tag->initial; @endphp
@php } } } @endphp
@if($resource->resource()->first()->category()->first() != null){{$resource->resource()->first()->category()->first()->name}}@endif
Desde
{{ $resource->assign_date }}
@endif @endif @endforeach
Camiones

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == "App\ProjectFleet") @if($resource->resource()->first()->kind == 1)
{{$resource->resource()->first()->type}}
{{ $resource->resource()->first()->brand." | ".$resource->resource()->first()->model }}

{{$resource->resource()->first()->plate}}

Seg: {{ \Carbon\Carbon::parse($resource->resource()->first()->insurance_date)->format($global->date_format) }}
Itv: {{ \Carbon\Carbon::parse($resource->resource()->first()->itv_date)->format($global->date_format) }}
T.T: {{ \Carbon\Carbon::parse($resource->resource()->first()->transit_date)->format($global->date_format) }}
Adif: {{ \Carbon\Carbon::parse($resource->resource()->first()->adif_date)->format($global->date_format) }}
Desde: {{ \Carbon\Carbon::parse($resource->assign_date)->format($global->date_format) }}
@endif @endif @endif @endforeach
Maquinaria

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == "App\ProjectFleet") @if($resource->resource()->first()->kind == 2)
{{$resource->resource()->first()->type}}
{{ $resource->resource()->first()->brand." | ".$resource->resource()->first()->model }}

{{$resource->resource()->first()->plate}}

Seg: {{ $resource->resource()->first()->insurance_date }}
Itv: {{ $resource->resource()->first()->itv_date }}
T.T: {{ $resource->resource()->first()->transit_date }}
Adif: {{ $resource->resource()->first()->adif_date }}
Desde: {{ $resource->assign_date }}
@endif @endif @endif @endforeach
Vehiculos

@foreach($resources as $resource) @if($resource->project_id == $project->id) @if($resource->resource_type == "App\ProjectFleet") @if($resource->resource()->first()->kind == 3)
{{$resource->resource()->first()->type}}
{{ $resource->resource()->first()->brand." | ".$resource->resource()->first()->model }}

{{$resource->resource()->first()->plate}}

Seg: {{ $resource->resource()->first()->insurance_date }}
Itv: {{ $resource->resource()->first()->itv_date }}
T.T: {{ $resource->resource()->first()->transit_date }}
Adif: {{ $resource->resource()->first()->adif_date }}
Desde: {{ $resource->assign_date }}
@endif @endif @endif @endforeach
@endforeach @else

No Hay Projectos

@endif