@extends('layouts.admin') @push('js') @endpush @section('content')

Exibir agendamento {{ $tipoAgendamento->getValue() }}

@csrf @method('PUT') @alerts @endalerts
@if ($tipoAgendamento->isOdontologico())
@php if ($agendamento->status->isAtendido()) { $prestadorSelecionado = $agendamento->atendimento->prestadorServico; } else { $prestadorSelecionado = $agendamento->prestadorServico; } @endphp
@endif
@if (! $agendamento->status->isAberto())
@if ($agendamento->status->isDesmarcou())
@endif @endif

@button([ 'route' => 'admin.agendamentos-atendimentos.index', 'routeParams' => ['tipo' => $agendamento->tipo->getName()], 'icon' => 'arrow-left', 'label' => 'Voltar', 'class' => 'btn-secondary' ]) @endbutton @if ($tipoAgendamento->isJuridico()) @button([ 'icon' => 'file-text', 'label' => 'Processos', 'class' => 'btn-primary', 'route' => 'admin.processos-juridicos.index', 'routeParams' => ['pessoa' => $agendamento->agendavel, 'tipo' => $tipo, 'agendamento' => $agendamento] ]) @endbutton @endif @if ($agendamento->status->isAberto() || $agendamento->status->isEsperandoRecepcao()) @button([ 'icon' => 'x', 'label' => 'Desmarcar', 'class' => 'btn-danger btn-desmarcar', 'route' => 'admin.agendamentos-atendimentos.desmarcar', 'routeParams' => ['agendamento' => $agendamento] ]) @endbutton @endif @if ($agendamento->status->isAberto() || $agendamento->status->isEsperandoRecepcao()) @button([ 'icon' => 'x', 'label' => 'Faltou', 'class' => 'btn-danger btn-faltou', 'route' => 'admin.agendamentos-atendimentos.faltou', 'routeParams' => ['agendamento' => $agendamento] ]) @endbutton @endif @if ($agendamento->tipo->isOdontologico()) @button([ 'icon' => 'clipboard', 'label' => 'Atender', 'class' => 'btn-primary', 'route' => 'admin.atendimentos-odontologicos.create', 'routeParams' => ['agendamento' => $agendamento] ]) @endbutton @endif @if ($agendamento->status->isAtendido()) @if ($agendamento->tipo->isOdontologico()) @button([ 'icon' => 'clipboard', 'label' => 'Atendimento', 'class' => 'btn-primary', 'route' => 'admin.atendimentos-odontologicos.edit', 'routeParams' => ['agendamento' => $agendamento, 'atendimento' => $agendamento->atendimento] ]) @endbutton @else @button([ 'icon' => 'clipboard', 'label' => 'Atendimento', 'class' => 'btn-primary', 'route' => 'admin.atendimentos-juridicos.edit', 'routeParams' => ['agendamento' => $agendamento, 'atendimento' => $agendamento->atendimento, 'processo' => $agendamento->atendimento->processoJuridico] ]) @endbutton @endif @endif @if ($agendamento->status->isAberto()) @button([ 'icon' => 'users', 'label' => 'Esperando', 'class' => 'btn-primary btn-esperando', 'route' => 'admin.agendamentos-atendimentos.esperando', 'routeParams' => ['agendamento' => $agendamento] ]) @endbutton @endif @if ($agendamento->tipo->isOdontologico()) @button([ 'route' => 'admin.atendimentos-odontologicos.historico', 'routeParams' => ['agendamento' => $agendamento], 'target' => '_blank', 'icon' => 'list', 'label' => 'Histórico', 'class' => 'btn-secondary' ]) @endbutton @endif
@endsection