This commit is contained in:
2020-12-01 17:23:13 -03:00
parent 09e8c226bb
commit 9852a8cbdc
274 changed files with 24706 additions and 0 deletions

View File

@ -0,0 +1,77 @@
@extends('layout.base')
@section('content')
<div class="panel panel-default">
<div class="panel-heading">Buscar</div>
<div class="panel-body">
<form action="{{url('', ['p' => 'buscar'])}}" method="get" class="form form-horizontal">
<input type="hidden" name="p" value="buscar" />
<div class="form-group">
<div class="col-md-6"><input type="text" name="q" class="form-control"
@if (get('q'))
value="{!!urldecode(get('q'))!!}"
@elseif (get('query'))
value="{!!urldecode(get('query'))!!}"
@endif
/></div>
<div class="col-md-2"><input type="submit" value="Buscar" class="form-control" /></div>
<div class="col-md-4">
<div class="col-md-12 text-center">
<input type="radio" name="tipo" value="{{urlencode($tipos[0])}}"
@if (get('tipo') == null or get('tipo') == $tipos[0])
checked="checked"
@endif
/>
{{ucwords($tipos[0])}}
</div>
@foreach ($tipos as $i => $tipo)
@if ($tipo == 'cualquiera')
@continue
@endif
<div class="col-md-6">
<input type="radio" name="tipo" value="{{urlencode($tipo)}}"
@if (get('tipo') != null)
@if ($tipo == get('tipo'))
checked="checked"
@endif
@else
@if ($tipo == 'cualquiera')
checked="checked"
@endif
@endif
/>
{{ucwords($tipo)}}
</div>
@endforeach
</div>
</div>
</form>
</div>
</div>
@if ($results != null)
<div class="panel panel-default">
<div class="panel-heading">Resultados</div>
<div class="panel-body">
<table class="table table-striped">
<thead>
<tr>
<th>Proyecto</th>
<th>Departamento</th>
<th>Propietario</th>
<th>Tipo</th>
<th>m&#0178;</th>
<th>Valor [UF]</th>
<th>Fecha Venta</th>
<th>Fecha Entrega</th>
</tr>
</thead>
<tbody>
@foreach ($results as $resultado)
@include('buscar.resultado')
@endforeach
</tbody>
</table>
</div>
</div>
@endif
@endsection

View File

@ -0,0 +1,46 @@
<tr>
<td>
<a href="{{url('', ['p' => 'buscar', 'q' => urlencode('"' . $resultado->proyecto()->descripcion . '"'), 't' => 'proyecto'])}}">
{{$resultado->proyecto()->descripcion}} <span class="small glyphicon glyphicon-search"></span>
</a>
</td>
@if (method_exists($resultado, 'unidad'))
<td>
<a href="{{url('', ['p' => 'ventas', 'a' => 'show', 'venta' => $resultado->id])}}">
{{$resultado->unidad()->descripcion}}
@if ($resultado->estado == 0)
(r)
@elseif ($resultado->estado == -1)
(c)
@endif
<span class="small glyphicon glyphicon-chevron-right"></span>
</a>
</td>
<td>
<a href="{{url('', ['p' => 'buscar', 'q' => urlencode('"' . $resultado->propietario()->nombreCompleto() . '"'), 't' => 'propietario'])}}">
{{$resultado->propietario()->nombreCompleto()}} <span class="small glyphicon glyphicon-search"></span>
</a>
</td>
<td>{{ucwords($resultado->unidad()->tipo()->descripcion)}}</td>
<td>{{\App\Helper\Format::m2($resultado->unidad()->m2())}}</td>
<td>{{\App\Helper\Format::ufs($resultado->valor_uf)}}</td>
<td>{{\App\Helper\Format::shortDate($resultado->fecha)}}</td>
<td>
@if ($resultado->entrega != 0)
{{\App\Helper\Format::shortDate($resultado->entrega()->fecha)}}
@endif
</td>
@else
<td>
{{$resultado->descripcion}} <span class="glyphicon glyphicon-ban-circle"></span>
</td><td>
<td>{{ucwords($resultado->tipo()->descripcion)}}</td>
<td>{{\App\Helper\Format::m2($resultado->m2())}}</td>
@if ($resultado->valor)
<td>{{format('ufs', $resultado->valor)}}</td>
@else
<td></td>
@endif
<td></td>
@endif
</tr>