This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\RequisicaoAberturaFechamentoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RequisicaoAberturaFechamentoController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'requisicao-abertura-fechamento';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return RequisicaoAberturaFechamentoService::datatable();
|
||||
}
|
||||
|
||||
public function getEstoque($materialId, $centroCustoAlmoxarifadoId)
|
||||
{
|
||||
return response()->json(
|
||||
RequisicaoAberturaFechamentoService::getEstoque($materialId, $centroCustoAlmoxarifadoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
|
||||
public function getMateriaisPermitidos($centroCustoAlmoxarifadoId)
|
||||
{
|
||||
return response()->json(
|
||||
RequisicaoAberturaFechamentoService::getMateriaisPermitidos($centroCustoAlmoxarifadoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user