Commit ebc27d36 authored by Marcos Albano's avatar Marcos Albano 💬

Correcao na listagem de titulos, alteracao na view index, inicio da implementacao lado tecmico

parent 0f9cd4e7
...@@ -4,6 +4,7 @@ namespace App\Http\Controllers; ...@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Http\Requests\StoreUpdateAgendamentoRequest; use App\Http\Requests\StoreUpdateAgendamentoRequest;
use App\Models\Agendamento; use App\Models\Agendamento;
use Carbon\Carbon;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
...@@ -11,20 +12,19 @@ class AgendamentoController extends Controller ...@@ -11,20 +12,19 @@ class AgendamentoController extends Controller
{ {
protected $request; protected $request;
private $repository;
public function __construct(Request $request, Agendamento $agendamento) public function __construct(Request $request)
{ {
$this->request = $request; $this->request = $request;
$this->repository = $agendamento;
//$this->middleware('auth'); //$this->middleware('auth');
/*$this->middleware('auth')->only([ /*$this->middleware('auth')->only([
'create', 'store' 'create', 'store'
]); ]);
$this->middleware('auth')->except([ $this->middleware('auth')->except([
'index', 'show' 'index', 'show'
]); ]);
*/ */
} }
/** /**
...@@ -34,14 +34,28 @@ class AgendamentoController extends Controller ...@@ -34,14 +34,28 @@ class AgendamentoController extends Controller
*/ */
public function index() public function index()
{ {
// $dataAtual = Carbon::today();
// $dataFormatada = $dataAtual->parse($dataAtual)->format('d-m-Y');
$agendamentos = Agendamento::get(); $agendamentos = Agendamento::get();
foreach($agendamentos as $agendamento){ foreach ($agendamentos as $agendamento) {
return view('admin.pages.agendamentos.index', [
'agendamentos' => $agendamentos,
]);
}
}
public function agendamentosHoje()
{
$dataAtual = Carbon::today();
$dataFormatada = $dataAtual->parse($dataAtual)->format('d-m-Y');
$agendamentos = Agendamento::where('data', $dataFormatada)->get();
foreach ($agendamentos as $agendamento) {
return view('admin.pages.agendamentos.index', [ return view('admin.pages.agendamentos.index', [
'agendamentos' => $agendamentos 'agendamentos' => $agendamentos,
]); ]);
} }
} }
/** /**
...@@ -60,11 +74,9 @@ class AgendamentoController extends Controller ...@@ -60,11 +74,9 @@ class AgendamentoController extends Controller
* @param App\Http\Requests\StoreUpdateAgendamentoRequest; $request * @param App\Http\Requests\StoreUpdateAgendamentoRequest; $request
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function store(StoreUpdateAgendamentoRequest $request) public function store(Request $request)
{ {
$data = $request->all(); return $request->name;
$this->repository->create($data);
return redirect()->route('agendamentos.index');
} }
/** /**
...@@ -72,18 +84,16 @@ class AgendamentoController extends Controller ...@@ -72,18 +84,16 @@ class AgendamentoController extends Controller
* *
* @param int $id * @param int $id
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function show($id) public function show($id)
{ {
// if(!$agendamento = $this->repository->find($id)) if (!$agendamentos = Agendamento::find($id)) {
// return redirect()->back();
$agendamentos = DB::table('agendamento.agendamentos')->find($id);
if(!$agendamentos)
return redirect()->back(); return redirect()->back();
} else {
return view('admin.pages.agendamentos.show', [ return view('admin.pages.agendamentos.show', [
'agendamentos' => $agendamentos 'agendamentos' => $agendamentos,
]); ]);
}
} }
/** /**
...@@ -94,8 +104,9 @@ class AgendamentoController extends Controller ...@@ -94,8 +104,9 @@ class AgendamentoController extends Controller
*/ */
public function edit($id) public function edit($id)
{ {
if(!$agendamento = $this->repository->find($id)) if (!$agendamento = $this->repository->find($id)) {
return redirect()->back(); return redirect()->back();
}
return view('admin.pages.agendamentos.edit', compact('agendamento')); return view('admin.pages.agendamentos.edit', compact('agendamento'));
} }
...@@ -108,9 +119,10 @@ class AgendamentoController extends Controller ...@@ -108,9 +119,10 @@ class AgendamentoController extends Controller
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function update(StoreUpdateAgendamentoRequest $request, $id) public function update(StoreUpdateAgendamentoRequest $request, $id)
{ {
if(!$agendamento = $this->repository->find($id)) if (!$agendamento = $this->repository->find($id)) {
return redirect()->back(); return redirect()->back();
}
$agendamento->update($request->all()); $agendamento->update($request->all());
return redirect()->route('agendamentos.index'); return redirect()->route('agendamentos.index');
...@@ -124,8 +136,10 @@ class AgendamentoController extends Controller ...@@ -124,8 +136,10 @@ class AgendamentoController extends Controller
*/ */
public function destroy($id) public function destroy($id)
{ {
if(!$agendamento = $this->repository->find($id)) if (!$agendamento = $this->repository->find($id)) {
return redirect()->back(); return redirect()->back();
}
$agendamento->delete(); $agendamento->delete();
return redirect()->route('agendamentos.index'); return redirect()->route('agendamentos.index');
...@@ -140,7 +154,7 @@ class AgendamentoController extends Controller ...@@ -140,7 +154,7 @@ class AgendamentoController extends Controller
return view('admin.pages.agendamentos.index', [ return view('admin.pages.agendamentos.index', [
'agendamentos' => $agendamentos, 'agendamentos' => $agendamentos,
'filters' => $filters, 'filters' => $filters,
]); ]);
} }
} }
...@@ -4,6 +4,7 @@ namespace App\Http\Controllers; ...@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Datepicker; use App\Models\Datepicker;
use Barryvdh\DomPDF\Facade as PDF; use Barryvdh\DomPDF\Facade as PDF;
use Carbon\Carbon;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class DatepickerController extends Controller class DatepickerController extends Controller
...@@ -15,12 +16,13 @@ class DatepickerController extends Controller ...@@ -15,12 +16,13 @@ class DatepickerController extends Controller
public function datepicker(Request $request) public function datepicker(Request $request)
{ {
$datepicker = new Datepicker(); $datepicker = new Datepicker();
$datepicker->cpf = $request->get('cpf'); $datepicker->cpf = $request->get('cpf');
$datepicker->data = $request->get('data'); $datepicker->data = $request->get('data');
$datepicker->hora = $request->get('hora'); $datepicker->hora = $request->get('hora');
$datepicker->detentor = $request->get('detentor'); $datepicker->detentor = $request->get('detentor');
$datepicker->escritorio = $request->get('escritorio');
$datepicker->titulo = $request->get('titulo');
$datepicker->save(); $datepicker->save();
return view('dadosAtendimento')->with([ return view('dadosAtendimento')->with([
...@@ -29,6 +31,20 @@ class DatepickerController extends Controller ...@@ -29,6 +31,20 @@ class DatepickerController extends Controller
'data' => $request->get('data'), 'data' => $request->get('data'),
'id' => $request->get('id'), 'id' => $request->get('id'),
'hora' => $request->get('hora'), 'hora' => $request->get('hora'),
'escritorio' => $request->get('escritorio'),
'titulo' => $request->get('titulo'),
]);
}
public function datepickerAgendamento(Request $request)
{
$datepicker = new Datepicker();
$datepicker->tecnico_id = $request->get('tecnico_id');
$datepicker->save();
return view('admin.pages.agendamentos.show')->with([
'tecnico_id' => $request->get('tecnico_id'),
]); ]);
} }
......
...@@ -11,7 +11,6 @@ use App\Models\Pessoa; ...@@ -11,7 +11,6 @@ use App\Models\Pessoa;
use App\Models\PessoaLote; use App\Models\PessoaLote;
use App\Models\Titulo; use App\Models\Titulo;
use App\Models\Tramite; use App\Models\Tramite;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class TituloController extends Controller class TituloController extends Controller
...@@ -32,44 +31,68 @@ class TituloController extends Controller ...@@ -32,44 +31,68 @@ class TituloController extends Controller
{ {
$documentoPessoa = DocumentoPessoa::where('cpf', $this->request->cpf)->with('pessoa')->first(); $documentoPessoa = DocumentoPessoa::where('cpf', $this->request->cpf)->with('pessoa')->first();
if ($documentoPessoa) { if ($documentoPessoa) {
$pessoa = Pessoa::where('id', $documentoPessoa->pessoa_id)->with('pessoaLote', 'documentoPessoa')->first(); $pessoas = Pessoa::where('id', $documentoPessoa->pessoa_id)->with('documentoPessoa', 'pessoaLote')->get();
if ($pessoa) { foreach ($pessoas as $pessoa) {
// echo "{$pessoa}<hr>";
$pessoasLote = PessoaLote::where('pessoa_id', $documentoPessoa->pessoa_id)->with('lote', 'pessoa')->get(); $pessoasLote = PessoaLote::where('pessoa_id', $documentoPessoa->pessoa_id)->with('lote', 'pessoa')->get();
foreach ($pessoasLote as $pessoaLote) { $lotes = Lote::where('cpf', $this->request->cpf)->with('municipio', 'lotesTramites')->get();
$lotes = Lote::where('id', $pessoaLote->lote->id)->with('municipio', 'pessoaLote', 'lotesTramites')->get(); foreach ($lotes as $lote) {
foreach ($lotes as $lote) { $titulos = Titulo::where('lote_id', $lote->id)->where('flag_cancelamento', '<>', 'S')->get();
$loteTramite = LoteTramite::where('lote_id', $pessoaLote->lote_id)->with('tramite')->max('id'); foreach ($titulos as $titulo) {
$lotesTramites = LoteTramite::where('id', $loteTramite)->get(); // echo "{------------>$titulo->numero_titulo}<hr>";
foreach ($lotesTramites as $lotTramite) { }
$tramites = Tramite::where('id', $lotTramite->tramite_id)->where('documento_tipo', 'TITULO DO IMOVEL')->get(); if ($loteTramite = LoteTramite::where('lote_id', $lote->id)
foreach ($tramites as $tramite) { ->where('tramite_id', 20)->orWhere('tramite_id', 27)
if ($tramite) { ->orWhere('tramite_id', 60)->orWhere('tramite_id', 61)
if ($tramite->id === 67) { ->orWhere('tramite_id', 62)->orWhere('tramite_id', 63)
$titulos = Titulo::where('lote_id', $lotTramite->lote_id)->where('flag_cancelamento', '<>', 'S')->get(); ->orWhere('tramite_id', 64)->orWhere('tramite_id', 65)
foreach ($titulos as $titulo) { ->orWhere('tramite_id', 66)->orWhere('tramite_id', 67)
$agendamento = Agendamento::get()->last(); ->orWhere('tramite_id', 68)->orWhere('tramite_id', 69)
return view( ->orWhere('tramite_id', 70)->orWhere('tramite_id', 71)
'admin.pages.titulos.index', ->orWhere('tramite_id', 72)->orWhere('tramite_id', 73)
[ ->orWhere('tramite_id', 74)->orWhere('tramite_id', 75)
'pessoasLote' => $pessoasLote, ->orWhere('tramite_id', 76)->orWhere('tramite_id', 77)
'lotes' => $lotes, ->orWhere('tramite_id', 78)->orWhere('tramite_id', 79)
'titulos' => $titulo, ->orWhere('tramite_id', 80)
'documentoPessoa' => $documentoPessoa, ->exists()) {
'lotesTramites' => $lotesTramites, $loteTramite = LoteTramite::where('lote_id', $lote->id)->max('id');
'tramite' => $tramite, $lotesTramites = LoteTramite::where('id', $loteTramite)->where('lote_id', $lote->id)->get();
'agendamento' => $agendamento, foreach ($lotesTramites as $loteTramite) {}
] $tramites = Tramite::where('id', $loteTramite->tramite_id)->where('documento_tipo', 'TITULO DO IMOVEL')
); ->get();
} foreach ($tramites as $tramite) {
} else { if ($tramite->id === 67) {
return view('cpfValidoSemTitulo')->with(['cpf' => $this->request->cpf, 'nome' => $tramite->nome]); // echo "{------------>$tramites}<hr>";
} $agendamento = Agendamento::get()->last();
} return view('admin.pages.titulos.index')->with([
'cpf' => $this->request->cpf,
'nome' => $tramite->nome,
'lotesTramites' => $lotesTramites,
// 'tramites' => $tramites,
'pessoasLote' => $pessoasLote,
'lotes' => $lotes,
'pessoa' => $pessoa,
'documentoPessoa' => $documentoPessoa,
'agendamento' => $agendamento,
'titulos' => $titulo,
]);
} else {
return view('cpfValidoSemTitulo')->with(['cpf' => $this->request->cpf, 'nome' => $tramite->nome]);
} }
} }
} }
} }
return view(
'admin.pages.titulos.index',
[
'pessoa' => $pessoa,
'pessoasLote' => $pessoasLote,
'lotes' => $lotes,
'titulos' => $titulos,
'documentoPessoa' => $documentoPessoa,
]
);
} }
} else { } else {
return view('cpfInvalido')->with(['cpf' => $this->request->cpf]); return view('cpfInvalido')->with(['cpf' => $this->request->cpf]);
...@@ -205,5 +228,4 @@ class TituloController extends Controller ...@@ -205,5 +228,4 @@ class TituloController extends Controller
} }
} }
...@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB; ...@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB;
class Agendamento extends Model class Agendamento extends Model
{ {
protected $table = 'agendamento.agendamentos'; protected $table = 'agendamento.agendamentos';
protected $fillable = ['data']; // protected $fillable = ['data'];
// public function search($filter = null) // public function search($filter = null)
// { // {
......
...@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model; ...@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
class Titulo extends Model class Titulo extends Model
{ {
protected $table = 'sige.titulos'; protected $table = 'sige.titulos';
protected $fillable = ['id', 'numero_titulo', 'gleba_id']; // protected $fillable = ['id', 'numero_titulo', 'gleba_id'];
public function search($filter = null) public function search($filter = null)
{ {
......
...@@ -86,7 +86,7 @@ return [ ...@@ -86,7 +86,7 @@ return [
'layout_topnav' => null, 'layout_topnav' => null,
'layout_boxed' => null, 'layout_boxed' => null,
'layout_fixed_sidebar' => null, 'layout_fixed_sidebar' => true,
'layout_fixed_navbar' => null, 'layout_fixed_navbar' => null,
'layout_fixed_footer' => null, 'layout_fixed_footer' => null,
...@@ -238,15 +238,22 @@ return [ ...@@ -238,15 +238,22 @@ return [
'topnav' => true, 'topnav' => true,
], ],
[ [
// 'text' => 'Agendar', 'text' => 'Agendar',
// 'url' => 'agendamentos/create', 'url' => 'agendamentos/create',
], ],
[ [
// 'text' => 'Listar agendamentos', 'text' => 'Listar agendamentos',
// 'url' => 'agendamentos', 'url' => 'agendamentos',
// 'icon' => 'far fa-fw fa-file', 'icon' => 'far fa-fw fa-file',
//'label' => 4, // 'label' => 4,
// 'label_color' => 'success', 'label_color' => 'success',
],
[
'text' => 'Agendamentos de hoje',
'url' => 'agendamentosHoje',
'icon' => 'far fa-fw fa-file',
// 'label' => 4,
'label_color' => 'success',
], ],
// ['header' => 'account_settings'], // ['header' => 'account_settings'],
// [ // [
...@@ -260,57 +267,58 @@ return [ ...@@ -260,57 +267,58 @@ return [
// 'icon' => 'fas fa-fw fa-lock', // 'icon' => 'fas fa-fw fa-lock',
// ], // ],
// [ // [
// 'text' => 'multilevel', // 'text' => 'Agendamentos',
// 'icon' => 'fas fa-fw fa-share', // 'icon' => 'fas fa-fw fa-share',
// 'submenu' => [ // 'submenu' => [
// [ // [
// 'text' => 'level_one',~ // 'text' => 'Todos',
// 'url' => '#', // 'url' => 'agendamentos',
// ],
// [
// 'text' => 'level_one',
// 'url' => '#',
// 'submenu' => [
// [
// 'text' => 'level_two',
// 'url' => '#',
// ],
// [
// 'text' => 'level_two',
// 'url' => '#',
// 'submenu' => [
// [
// 'text' => 'level_three',
// 'url' => '#',
// ],
// [
// 'text' => 'level_three',
// 'url' => '#',
// ],
// ],
// ],
// ],
// ], // ],
// [ // [
// 'text' => 'level_one', // 'text' => 'Agendamentos de Hoje',
// 'url' => '#', // 'url' => '#',
// ], // ],
// // [
// // 'text' => 'level_one',
// // 'url' => '#',
// // 'submenu' => [
// // [
// // 'text' => 'level_two',
// // 'url' => '#',
// // ],
// // [
// // 'text' => 'level_two',
// // 'url' => '#',
// // 'submenu' => [
// // [
// // 'text' => 'level_three',
// // 'url' => '#',
// // ],
// // [
// // 'text' => 'level_three',
// // 'url' => '#',
// // ],
// // ],
// // ],
// // ],
// // ],
// ], // ],
// ], // ],
// ['header' => 'labels'], // ['header' => 'Agendamentos'],
// [ // [
// 'text' => 'important', // 'text' => 'Todos',
// 'icon_color' => 'red', // 'icon_color' => 'yellow',
// 'url' => '#', // 'url' => 'agendamentos',
// ], // ],
// [ // [
// 'text' => 'warning', // 'text' => 'Agendamentos de hoje',
// 'icon_color' => 'yellow', // 'icon_color' => 'yellow',
// 'url' => '#', // 'url' => 'agendamentos',
// ], // ],
// [ // [
// 'text' => 'information', // 'text' => 'information',
// 'icon_color' => 'cyan', // 'icon_color' => 'yellow',
// 'url' => '#', // 'url' => '#',
// ], // ],
], ],
......
...@@ -175,6 +175,7 @@ return [ ...@@ -175,6 +175,7 @@ return [
App\Providers\EventServiceProvider::class, App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
App\Providers\RepositoryServiceProvider::class, App\Providers\RepositoryServiceProvider::class,
Barryvdh\DomPDF\ServiceProvider::class,
], ],
...@@ -227,6 +228,7 @@ return [ ...@@ -227,6 +228,7 @@ return [
'URL' => Illuminate\Support\Facades\URL::class, 'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class, 'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class, 'View' => Illuminate\Support\Facades\View::class,
'PDF' => Barryvdh\DomPDF\Facade::class,
], ],
......
...@@ -23,19 +23,20 @@ ...@@ -23,19 +23,20 @@
</div> </div>
<div class="card card-outline card-success"> <div class="card card-outline card-success">
<div class="card-header"> <div class="card-header">
<h3 class="card-title"><b>Listagem dos Agendamentos</b></h3> <h3 class="card-title"><b>AGENDAMENTOS DE HOJE</b></h3>
</div> </div>
<!-- /.card-header --> <!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>PROTOCOLO</th>
<th>NOME</th> <th>DETENTOR</th>
<th>CPF</th> <th>CPF</th>
<th>TELEFONE</th> <th>TÍTULO</th>
<th>SERVIÇO</th>
<th>DATA</th> <th>DATA</th>
<th>HORA</th>
<th>LOCAL DA ENTREGA</th>
<th width="100">AÇÕES</th> <th width="100">AÇÕES</th>
</tr> </tr>
</thead> </thead>
...@@ -43,17 +44,15 @@ ...@@ -43,17 +44,15 @@
@foreach ($agendamentos as $agendamento) @foreach ($agendamentos as $agendamento)
<tr> <tr>
<td>{{ $agendamento->id }}</td> <td>{{ $agendamento->id }}</td>
<td>{{ $agendamento->nome }}</td> <td>{{ $agendamento->detentor }}</td>
<td>{{ $agendamento->cpf }}</td> <td>{{ $agendamento->cpf }}</td>
<td>{{ $agendamento->telefone }}</td> <td>{{ $agendamento->titulo }}</td>
<td>{{ $agendamento->servico }}</td> <td>{{ date('d/m/Y', strtotime($agendamento->data)) }}</td>
<td>{{ $agendamento->data }}</td> <td>{{ $agendamento->hora }}</td>
<td>{{ $agendamento->escritorio }}</td>
<td> <td>
<a href="{{ route('agendamentos.edit', $agendamento->id) }}"
class="badge bg-green">Editar</a>
<a href="{{ route('agendamentos.show', $agendamento->id) }}" <a href="{{ route('agendamentos.show', $agendamento->id) }}"
class="badge bg-green">Detalhes</a> class="badge bg-green">Entregar Título</a>
</td> </td>
</tr> </tr>
...@@ -109,9 +108,9 @@ ...@@ -109,9 +108,9 @@
</tbody> </tbody>
</table> --}} </table> --}}
@if (isset($filters)) {{-- @if (isset($filters))
{!! $agendamentos->appends($filters)->links() !!} {!! $agendamentos->appends($filters)->links() !!}
@endif @endif
{!! $agendamentos->links() !!} {!! $agendamentos->links() !!} --}}
@endsection @endsection
@extends('adminlte::page') @extends('adminlte::page')
@section('title', 'Dados Atendimento')
@section('content')
<div class="card card-outline card-info half">
<div class="card-header">
<h3 class="card-title"></h3>
</div>
<div class="card-body">
<div class="container">
<form method="post" action="{{ route('datepickerAgendamento', $agendamentos->tecnico_id) }}" id="form"
enctype="multipart/form-data">
@csrf
<div class="row">
<div class="form-group ">
<img class="logoidace" src="{{ asset('img/logo-idace.png') }}">
<ul class="list-group">
<li class="list-group-item list-group-item-info"><strong>CONFIRA OS DADOS</strong></li>
<li class="list-group-item">Número do Protocolo: <strong>{{ $agendamentos->id }}</strong></li>
<li class="list-group-item">Data: <strong>{{ date('d/m/Y', strtotime($agendamentos->data)) }}</strong></li>
<li class="list-group-item">Detentor: <strong>{{ $agendamentos->detentor }}</strong></li>
<li class="list-group-item">CPF: <strong>{{ $agendamentos->cpf }}</strong></li>
</ul>
<hr>
<input class="text form-control" type="hidden" id="datepicker1" name="tecnico_id"
value="{{ $agendamentos->tecnico_id }}"><br>
<a href="{{ route('admin.pages.agendamentos.show') }}" type="button"
class="btn btn-block btn-primary btn_pesquisa btn-success">Finalizar Entrega</a>
</div>
{{-- <a class="btn btn-primary" href="{{ route('datepicker.createPDF') }}">Export to PDF</a> --}}
</div>
</form>
<a href="{{ route('pesquisaCpf') }}" type="button"
class="btn btn-block btn-primary btn_pesquisa">Voltar</a>
</div>
</div>
</div>
@endsection
@extends('adminlte::page')
@section('title', "Detalhes {$agendamentos->data}") @section('title', "Detalhes {$agendamentos->data}")
@section('content_header') @section('content_header')
@endsection @endsection
@section('content') {{-- @section('content')
<div class="card card-outline card-success"> <div class="card card-outline card-success">
<div class="card-header"> <div class="card-header">
<h3 class="card-title"><b>Detalhes dos Agendamentos</b><a href="{{ route('agendamentos.index') }}"> <<</a></h3> <h3 class="card-title"><b>Detalhes dos Agendamentos</b><a href="{{ route('agendamentos.index') }}"> <<</a></h3>
...@@ -30,25 +73,5 @@ ...@@ -30,25 +73,5 @@
</div> </div>
@endsection @endsection
--}}
{{-- @section('content')
<h1>Agendamentos do dia: {{ $agendamentos->data }} <a href="{{ route('agendamentos.index') }}"> <<</a></h1>
<ul>
<li><strong>Id: </strong> {{ $agendamentos->id }}</li>
<li><strong>Nome: </strong> {{ $agendamentos->nome }}</li>
<li><strong>Cpf: </strong> {{ $agendamentos->cpf }}</li>
<li><strong>Telefone: </strong> {{ $agendamentos->telefone }}</li>
<li><strong>Serviço: </strong> {{ $agendamentos->servico }}</li>
<li><strong>Data: </strong> {{ $agendamentos->data }}</li>
</ul>
<form action="{{ route('agendamentos.destroy', $agendamentos->id) }}" method="post">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger">Deletar o produto {{ $agendamentos->id }}</button>
</form>
@endsection --}}
\ No newline at end of file
...@@ -31,22 +31,39 @@ ...@@ -31,22 +31,39 @@
<th>PROPRIETÁRIO</th> <th>PROPRIETÁRIO</th>
<th>LOTE</th> <th>LOTE</th>
<th>CPF</th> <th>CPF</th>
<th>STATUS</th> <th>TRÂMITE</th>
<th width="100">AÇÕES</th> <th>TÍTULO</th>
<th width="100">STATUS</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach ($pessoasLote as $pessoaLote) @foreach ($pessoasLote as $pessoaLote)
<tr>
<td>{{ $pessoaLote->lote->municipio->nome }}</td>
<td>{{ $pessoaLote->pessoa->nome }}</td>
<td>{{ $pessoaLote->lote->numero }}</td>
<td>{{ $documentoPessoa->cpf }}</td>
<td>{{ $tramite->nome }}</td>
<td><a href="{{ route('titulos.show', $pessoaLote->lote->id) }}"
class="badge bg-green">DETALHES</a></td>
</tr>
@endforeach @endforeach
@foreach ($lotes as $lote)
@endforeach
<tr>
<td>{{ $lote->municipio->nome }}</td>
<td>{{ $pessoa->nome }}</td>
<td>{{ $lote->numero }}</td>
<td>{{ $documentoPessoa->cpf }}</td>
{{-- @foreach ($tramites as $tramite) --}}
<td>
{{ $nome }}
</td>
{{-- @endforeach --}}
<td>
{{ $titulos->numero_titulo }}
</td>
<td>
<a href="#" class="btn btn-info btn-sm">
<span class="glyphicon glyphicon-ok"></span> Ok
</a>
</td>
{{-- <td><a href="{{ route('titulos.show', $lote->id) }}"
class="badge bg-green">DETALHES</a></td> --}}
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
...@@ -58,25 +75,47 @@ ...@@ -58,25 +75,47 @@
<div class="card-body"> <div class="card-body">
<div class="container"> <div class="container">
<form method="post" id="form" <form method="post" id="form"
action="{{ route('datepicker', [$pessoaLote->pessoa->nome, $documentoPessoa->cpf, $agendamento->id]) }}" action="{{ route('datepicker', [$pessoa->nome, $documentoPessoa->cpf, $agendamento->id]) }}"
enctype="multipart/form-data"> enctype="multipart/form-data">
@csrf @csrf
<div class="row"> <div class="row">
<div class="form-group "> <div class="form-group">
<h4 style="text-align:center"><strong>Escolha data e hora do agendamento</strong></h4> <h4 style="text-align:center"><strong>Escolha data e hora do agendamento</strong></h4>
<input class="text form-control" type="hidden" id="datepicker1" name="id" <input class="text form-control" type="hidden" id="datepicker1" name="id"
value="{{ $agendamento->id }}"> value="{{ $agendamento->id }}">
<strong>DATA: </strong><br> <input class="text form-control" type="hidden" id="datepicker1" name="titulo"
value="{{ $titulos->numero_titulo }}">
<strong>Data: </strong><br>
<input style="margin-top: 5px;" class="data form-control" type="text" id="datepicker" <input style="margin-top: 5px;" class="data form-control" type="text" id="datepicker"
name="data"> name="data">
<input class="text form-control" type="hidden" id="datepicker1" name="detentor" <input class="text form-control" type="hidden" id="datepicker1" name="detentor"
value="{{ $pessoaLote->pessoa->nome }}"> value="{{ $pessoa->nome }}">
<input class="text form-control" type="hidden" id="datepicker1" name="cpf" <input class="text form-control" type="hidden" id="datepicker1" name="cpf"
value="{{ $documentoPessoa->cpf }}"><br> value="{{ $documentoPessoa->cpf }}"><br>
<strong>HORA: </strong><br> <strong>Hora: </strong><br>
<input style="margin-top: 5px;margin-bottom: 20px;" class="form-control" type="text" <input style="margin-top: 5px;margin-bottom: 20px;" class="form-control" type="text"
id="timepicker" name="hora"><br> id="timepicker" name="hora">
<button type="submit" class="btn btn-success" class="badge bg-green">AGENDAR</a></button> <div class="form-group">
<label for="escritorio">Local de Entrega do Título</label>
<select class="form-control" name="escritorio">
<option value="null">-- Selecione o Local --</option>
<option value="IDACE">Sede do IDACE</option>
<option value="Acaraú">Escritório de Acaraú</option>
<option value="Crateús">Escritório de Crateús</option>
<option value="Itapipoca">Escritório de Itapipoca</option>
<option value="Jaguaretama">Escritório de Jaguaretama</option>
<option value="Limoeiro do Norte">Escritório de Limoeiro do Norte</option>
<option value="Quixeramobim">Escritório de Quixeramobim</option>
<option value="Várzea Alegre">Escritório de Várzea Alegre</option>
</select>
</div>
<div align="right">
<button type="submit" class="btn btn-success" class="badge bg-green"
style="align-items: ">Agendar</a></button>
</div>
</div> </div>
</div> </div>
</form> </form>
...@@ -86,7 +125,7 @@ ...@@ -86,7 +125,7 @@
<script type="text/javascript"> <script type="text/javascript">
$('#datepicker').datepicker({ $('#datepicker').datepicker({
autoclose: true, autoclose: true,
format: 'dd/mm/yyyy' format: 'dd-mm-yyyy'
}); });
$('#datepicker1').datepicker(); $('#datepicker1').datepicker();
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
@section('title', 'CPF Inválido') @section('title', 'CPF Inválido')
@section('content') @section('content')
<div class="card card-outline card-warning half"> <br><br><br><br><br><br>
<div class="card card-outline card-danger half">
<div class="card-header"> <div class="card-header">
<h3 class="card-title"></h3> <h3 class="card-title"></h3>
</div> </div>
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<div class="form-group "> <div class="form-group ">
<img class="logoidace" src="{{ asset('img/logo-idace.png') }}"> <img class="logoidace" src="{{ asset('img/logo-idace.png') }}">
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item list-group-item-warning"><strong>NENHUM DADO ENCONTRADO PARA ESTE CPF</strong></li> <li class="list-group-item list-group-item-danger"><strong>NENHUM DADO ENCONTRADO PARA ESTE CPF</strong></li>
<li class="list-group-item">CPF: <strong>{{ $cpf }}</strong></li> <li class="list-group-item">CPF: <strong>{{ $cpf }}</strong></li>
</ul> </ul>
<hr> <hr>
......
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
@section('title', 'Dados Atendimento') @section('title', 'Dados Atendimento')
@section('content') @section('content')
<div class="card card-outline card-danger half"> <br><br><br><br><br>
<div class="card card-outline card-info half">
<div class="card-header"> <div class="card-header">
<h3 class="card-title"></h3> <h3 class="card-title"></h3>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="container"> <div class="container">
<form method="GET" id="form" <form method="GET" id="form"
...@@ -16,7 +18,7 @@ ...@@ -16,7 +18,7 @@
<div class="form-group "> <div class="form-group ">
<img class="logoidace" src="{{ asset('img/logo-idace.png') }}"> <img class="logoidace" src="{{ asset('img/logo-idace.png') }}">
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item list-group-item-danger"><strong>NENHUM TÍTULO PRONTO PARA ESTE CPF</strong></li> <li class="list-group-item list-group-item-info"><strong>NENHUM TÍTULO PRONTO PARA ESTE CPF</strong></li>
<li class="list-group-item">CPF: <strong>{{ $cpf }}</strong></li> <li class="list-group-item">CPF: <strong>{{ $cpf }}</strong></li>
<li class="list-group-item">STATUS DO TÍTULO: <strong>{{ $nome }}</strong></li> <li class="list-group-item">STATUS DO TÍTULO: <strong>{{ $nome }}</strong></li>
</ul> </ul>
......
...@@ -17,11 +17,13 @@ ...@@ -17,11 +17,13 @@
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item list-group-item-success"><strong>AGENDAMENTO REALIZADO COM <li class="list-group-item list-group-item-success"><strong>AGENDAMENTO REALIZADO COM
SUCESSO</strong></li> SUCESSO</strong></li>
<li class="list-group-item">Número do Protocolo: <strong>{{ $id + 1 }}</strong></li> <li class="list-group-item">Número do Protocolo: <strong>{{ $id+2 }}</strong></li>
<li class="list-group-item">Local da Entrega: <strong>{{ $escritorio }}</strong></li>
<li class="list-group-item">Data: <strong>{{ $data }}</strong></li> <li class="list-group-item">Data: <strong>{{ $data }}</strong></li>
<li class="list-group-item">Hora: <strong>{{ $hora }}</strong></li> <li class="list-group-item">Hora: <strong>{{ $hora }}</strong></li>
<li class="list-group-item">Detentor: <strong>{{ $detentor }}</strong></li> <li class="list-group-item">Detentor: <strong>{{ $detentor }}</strong></li>
<li class="list-group-item">CPF: <strong>{{ $cpf }}</strong></li> <li class="list-group-item">CPF: <strong>{{ $cpf }}</strong></li>
</ul> </ul>
<hr> <hr>
<p class="text-center">Caso tenha alguma dúvida, entre em contato através do telefone: 85 <p class="text-center">Caso tenha alguma dúvida, entre em contato através do telefone: 85
......
...@@ -9,11 +9,10 @@ Route::get('many-to-one', 'ManyToOneController@manyToOne'); ...@@ -9,11 +9,10 @@ Route::get('many-to-one', 'ManyToOneController@manyToOne');
Route::get('one-to-many', 'OneToManyController@oneToMany'); Route::get('one-to-many', 'OneToManyController@oneToMany');
//Route::get('one-to-many', 'oneToManyController@oneToManyLoteProcesso'); //Route::get('one-to-many', 'oneToManyController@oneToManyLoteProcesso');
Route::get('one-to-one', 'OneToOneController@oneToOne'); Route::get('one-to-one', 'OneToOneController@oneToOne');
Route::any('agendamentos/search', 'AgendamentoController@search')->name('agendamentos.search')->middleware('auth');//->middleware('auth');
Route::any('titulos/search', 'TituloController@search')->name('titulos.search')->middleware('auth');//->middleware('auth');
Route::resource('titulos', 'TituloController');
Route::get('titulos/{id}', 'TituloController@show')->name('titulos.show');//->middleware('auth');
Route::resource('agendamentos', 'AgendamentoController')->middleware('auth');
Route::any('lotes/search', 'LoteController@search')->name('lotes.search'); Route::any('lotes/search', 'LoteController@search')->name('lotes.search');
Route::resource('lotes', 'LoteController')->middleware('auth'); Route::resource('lotes', 'LoteController')->middleware('auth');
Route::resource('municipios', 'MunicipioController')->middleware('auth'); Route::resource('municipios', 'MunicipioController')->middleware('auth');
...@@ -23,8 +22,19 @@ Route::any('glebas/search', 'GlebaController@search')->name('glebas.search')->mi ...@@ -23,8 +22,19 @@ Route::any('glebas/search', 'GlebaController@search')->name('glebas.search')->mi
Route::get('datepicker','DatepickerController@create')->name('datepicker'); Route::get('datepicker','DatepickerController@create')->name('datepicker');
Route::post('datepicker','DatepickerController@datepicker')->name('datepicker.datepicker'); Route::post('datepicker','DatepickerController@datepicker')->name('datepicker.datepicker');
Route::post('datepickerAgendamento','DatepickerController@datepickerAgendamento')->name('datepickerAgendamento');
// Route::post('datepicker','DatepickerController@createPDF')->name('createPDF.createPDF'); // Route::post('datepicker','DatepickerController@createPDF')->name('createPDF.createPDF');
//TÍTULOS
Route::any('titulos/search', 'TituloController@search')->name('titulos.search')->middleware('auth');//->middleware('auth');
Route::resource('titulos', 'TituloController');
Route::get('titulos/{id}', 'TituloController@show')->name('titulos.show');//->middleware('auth');
//AGENDAMENTOS
Route::any('agendamentos/search', 'AgendamentoController@search')->name('agendamentos.search')->middleware('auth');//->middleware('auth');
Route::resource('agendamentos', 'AgendamentoController');
Route::get('agendamentos/{id}', 'AgendamentoController@show')->name('agendamentos.show');//->middleware('auth');
Route::get('agendamentosHoje', 'AgendamentoController@agendamentosHoje')->name('agendamentos.agendamentosHoje');//->middleware('auth');
Route::resource('teste', 'TesteController'); Route::resource('teste', 'TesteController');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment