Files
oficial/resources/views/proyectos/list.blade.php
2021-03-25 21:20:49 -03:00

43 lines
1.2 KiB
PHP

@extends('layout.base')
@section('content')
<div class="row page-heading">
<div class="h3">
<div class="row">
<div class="col-md-6">
Proyectos
</div>
<div class="col-md-6 text-right">
<a href="{{nUrl('proyectos', 'add')}}">
<span class="glyphicon small glyphicon-plus"></span>
</a>
</div>
</div>
</div>
</div>
<table class="table table-hover">
<thead>
<tr>
<th>Proyecto</th>
<th>Inmobiliaria</th>
<th>Etapa</th>
<th>Estado</th>
<th>Tiempo Total</th>
</tr>
</thead>
<tbody>
@foreach ($proyectos as $proyecto)
<tr>
<td><a href="{{url('', ['p' => 'proyectos', 'a' => 'show', 'proyecto' => $proyecto->id])}}">{{$proyecto->descripcion}}</a></td>
<td><a href="{{url('', ['p' => 'proyectos', 'a' => 'list', 'inmobiliaria' => $proyecto->inmobiliaria()->id])}}">{{$proyecto->inmobiliaria()->abreviacion}}</a></td>
<td>{{$proyecto->estado()->tipo()->etapa()->descripcion}}</td>
<td>{{$proyecto->estado()->tipo()->descripcion}} ({{\Carbon\Carbon::parse($proyecto->estado()->fecha, config('app.timezone'))->diffForHumans()}})</td>
<td>
{{\Carbon\Carbon::parse($proyecto->estados()[0]->fecha, config('app.timezone'))->diffForHumans()}}
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection