This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Manutencao;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Manutencao\GerenciamentoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class GerenciamentoController extends Controller
|
||||
{
|
||||
protected $modulo = 'manutencao';
|
||||
protected $funcionalidade = 'gerenciamento';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return datatables()
|
||||
->of(GerenciamentoService::datatable())
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(GerenciamentoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteUsuarioSolicitante()
|
||||
{
|
||||
|
||||
return datatables()
|
||||
->of(GerenciamentoService::autocompleteUsuarioSolicitante())
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(GerenciamentoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(GerenciamentoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Manutencao;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Manutencao\ParametrizacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ParametrizacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'manutencao';
|
||||
protected $funcionalidade = 'parametrizacao';
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Manutencao;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Manutencao\RelatorioSolicitacoesService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RelatorioSolicitacoesController extends Controller
|
||||
{
|
||||
protected $modulo = 'manutencao';
|
||||
protected $funcionalidade = 'relatorio-solicitacoes';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioSolicitacoesService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(RelatorioSolicitacoesService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RelatorioSolicitacoesService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteUsuarioSolicitante()
|
||||
{
|
||||
|
||||
return datatables()
|
||||
->of(RelatorioSolicitacoesService::autocompleteUsuarioSolicitante())
|
||||
->toJson();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Manutencao;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Manutencao\SolicitacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class SolicitacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'manutencao';
|
||||
protected $funcionalidade = 'solicitacao';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return datatables()
|
||||
->of(SolicitacaoService::datatable())
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SolicitacaoService::create(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SolicitacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SolicitacaoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SolicitacaoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SolicitacaoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SolicitacaoService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user