66 lines
1.7 KiB
PHP
66 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\AtencaoBasica\AtividadeColetiva;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\AtencaoBasica\AtividadeColetiva\AtividadeColetivaService;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Response;
|
|
|
|
class AtividadeColetivaController extends Controller
|
|
{
|
|
protected $modulo = 'atencao-basica';
|
|
protected $funcionalidade = 'atividade-coletiva';
|
|
|
|
public function index()
|
|
{
|
|
return response()->json(AtividadeColetivaService::index(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function datatable()
|
|
{
|
|
return AtividadeColetivaService::datatable();
|
|
}
|
|
|
|
public function getUnidades()
|
|
{
|
|
return response()->json(AtividadeColetivaService::getUnidades(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function getInfraestruturas()
|
|
{
|
|
return response()->json(AtividadeColetivaService::getInfraestruturas(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function getEquipes()
|
|
{
|
|
return response()->json(AtividadeColetivaService::getEquipes(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function getOcupacoes()
|
|
{
|
|
return response()->json(AtividadeColetivaService::getOcupacoes(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function store(Request $request)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(AtividadeColetivaService::store($request), Response::HTTP_CREATED);
|
|
}
|
|
|
|
public function create()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(AtividadeColetivaService::create(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(AtividadeColetivaService::edit($id), Response::HTTP_OK);
|
|
}
|
|
}
|