This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Regulacao;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Regulacao\ParametrizacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ParametrizacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'regulacao';
|
||||
protected $funcionalidade = 'parametrizacao';
|
||||
|
||||
public function autocompleteGrupoExame()
|
||||
{
|
||||
return datatables()
|
||||
->of(ParametrizacaoService::autocompleteGrupoExame())
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function autocompleteExame()
|
||||
{
|
||||
return datatables()
|
||||
->of(ParametrizacaoService::autocompleteExame())
|
||||
->editColumn('grupo_id', fn ($i) => is_null($i->grupo_id) ? null : (int) $i->grupo_id)
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function autocompleteProcedimentoCirurgico()
|
||||
{
|
||||
return datatables()
|
||||
->of(ParametrizacaoService::autocompleteProcedimentoCirurgico())
|
||||
->editColumn('grupo_id', fn ($i) => is_null($i->grupo_id) ? null : (int) $i->grupo_id)
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function autocompleteEspecialidade()
|
||||
{
|
||||
return datatables()->of(ParametrizacaoService::autocompleteEspecialidade())->toJson();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(ParametrizacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ParametrizacaoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ParametrizacaoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user