75 lines
1.9 KiB
PHP
75 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Almoxarifado;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\Almoxarifado\RequisicaoPendentePermissaoService;
|
|
use Illuminate\Http\Response;
|
|
|
|
class RequisicaoPendentePermissaoController extends Controller
|
|
{
|
|
protected $modulo = 'almoxarifado';
|
|
protected $funcionalidade = 'requisicao-pendente-permissao';
|
|
|
|
public function datatable()
|
|
{
|
|
return RequisicaoPendentePermissaoService::datatable();
|
|
}
|
|
|
|
public function datatablePermissao()
|
|
{
|
|
return RequisicaoPendentePermissaoService::datatablePermissao();
|
|
}
|
|
|
|
public function getMateriais($centroCustoRequisitanteId)
|
|
{
|
|
return response()->json(
|
|
RequisicaoPendentePermissaoService::getMateriais($centroCustoRequisitanteId),
|
|
Response::HTTP_OK
|
|
);
|
|
}
|
|
|
|
public function datatableHistorico()
|
|
{
|
|
return RequisicaoPendentePermissaoService::datatableHistorico();
|
|
}
|
|
|
|
public function storePermissoes()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(RequisicaoPendentePermissaoService::storePermissoes(), Response::HTTP_CREATED);
|
|
}
|
|
|
|
public function createImportacao($centroCustoDestinoId)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(
|
|
RequisicaoPendentePermissaoService::createImportacao($centroCustoDestinoId),
|
|
Response::HTTP_OK
|
|
);
|
|
}
|
|
|
|
public function storeImportacao()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(RequisicaoPendentePermissaoService::storeImportacao(), Response::HTTP_CREATED);
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(RequisicaoPendentePermissaoService::edit($id), Response::HTTP_OK);
|
|
}
|
|
|
|
public function update($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(RequisicaoPendentePermissaoService::update($id), Response::HTTP_OK);
|
|
}
|
|
}
|