60 lines
1.3 KiB
PHP
60 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Ambulatorio;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\Ambulatorio\FilaService;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Response;
|
|
|
|
class FilaController extends Controller
|
|
{
|
|
public function list()
|
|
{
|
|
return response()->json(FilaService::list(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
return response()->json(FilaService::index((object) request()->all()), Response::HTTP_OK);
|
|
}
|
|
|
|
public function sendBack($id)
|
|
{
|
|
FilaService::sendBack($id);
|
|
|
|
return response()->noContent();
|
|
}
|
|
|
|
public function evade($id)
|
|
{
|
|
FilaService::evade($id);
|
|
|
|
return response()->noContent();
|
|
}
|
|
|
|
public function undoEvade($id)
|
|
{
|
|
FilaService::undoEvade($id);
|
|
|
|
return response()->noContent();
|
|
}
|
|
|
|
public function destroy($id)
|
|
{
|
|
FilaService::destroy($id);
|
|
|
|
return response()->noContent();
|
|
}
|
|
|
|
public function getAgendamentosRetroativos()
|
|
{
|
|
return response()->json(FilaService::getAgendamentosRetroativos(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function forward(Request $request, $id)
|
|
{
|
|
return response()->json(FilaService::forward($id, $request->centro_custo_encaminhamento_id), Response::HTTP_OK);
|
|
}
|
|
}
|