Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sistema_mcid
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marcio neto
sistema_mcid
Commits
dd19e3fa
Commit
dd19e3fa
authored
Aug 29, 2023
by
sandroresende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correcao botao fechar
parent
67dc63ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
6 deletions
+32
-6
EntePublicoController.php
app/Http/Controllers/Sistema/EntePublicoController.php
+12
-5
ValidarCpfCnpj.php
app/Http/Requests/ValidarCpfCnpj.php
+4
-1
AppServiceProvider.php
app/Providers/AppServiceProvider.php
+16
-0
No files found.
app/Http/Controllers/Sistema/EntePublicoController.php
View file @
dd19e3fa
...
...
@@ -220,10 +220,12 @@ class EntePublicoController extends Controller
$whereOficio
=
[];
$whereOficio
[]
=
[
'us
er
_id'
,
$usuario
->
id
];
$whereOficio
[]
=
[
'us
uario
_id'
,
$usuario
->
id
];
$whereOficio
[]
=
[
'tipo_arquivo_id'
,
1
];
$dadosArquivoOficio
=
RlcArquivoUser
::
where
(
$whereOficio
)
->
get
();
$dadosArquivoOficio
=
ViewArquivosEnviados
::
where
(
$whereOficio
)
->
get
();
$selecao
=
Selecao
::
where
(
'bln_ativa'
,
true
)
->
get
();
if
(
empty
(
$usuario
)){
...
...
@@ -244,7 +246,7 @@ class EntePublicoController extends Controller
{
# code...
//
return EntePublico::find($request->ente_publico_id);
//
return EntePublico::find($request->ente_publico_id);
//return $request->all();
...
...
@@ -254,6 +256,9 @@ class EntePublicoController extends Controller
$where
[]
=
[
'ente_publico_id'
,
$request
->
ente_publico_id
];
//return $where;
$selecao
=
Selecao
::
where
(
'bln_ativa'
,
true
)
->
get
();
$usuario
=
User
::
where
(
$where
)
->
get
();
...
...
@@ -267,6 +272,8 @@ class EntePublicoController extends Controller
$usuario
=
User
::
where
(
$where
)
->
first
();
$usuario
->
load
(
'tipoUsuario'
,
'statusUsuario'
,
'entePublico.municipio.uf'
);
...
...
@@ -463,7 +470,7 @@ class EntePublicoController extends Controller
public
function
reenviarOficioEntePublico
(
Request
$request
){
// return $request;
// return $request
->all();
;
...
...
@@ -497,7 +504,7 @@ class EntePublicoController extends Controller
$nomeArqOficio
=
'arqCorrecaoOficioTipo1-'
.
$quantOficio
.
'-'
.
$usuario
->
entePublico
->
municipio_id
.
'-'
.
$usuario
->
id
.
'.'
.
$request
->
file
(
'txt_caminho_oficio'
)
->
extension
();
$path_arquivo
=
public_path
()
.
'/uploads_arquivos/modulo_propostas/propostas/oficio'
;
$path_arquivo
=
public_path
()
.
'/uploads_arquivos/modulo_propostas/propostas/oficio'
;
if
(
!
File
::
isDirectory
(
$path_arquivo
)){
...
...
app/Http/Requests/ValidarCpfCnpj.php
View file @
dd19e3fa
...
...
@@ -27,7 +27,7 @@ class ValidarCpfCnpj extends FormRequest
{
return
[
'ente_publico_id'
=>
'required|cnpj'
,
'txt_cpf_usuario'
=>
'required|cpf'
,
'txt_cpf_usuario'
=>
'required|cpf
|usuariobloqueado
'
,
];
}
...
...
@@ -39,6 +39,9 @@ class ValidarCpfCnpj extends FormRequest
'ente_publico_id.cnpj'
=>
'O cnpj está inválido.'
,
'txt_cpf_usuario.required'
=>
'O campo cpf é obrigatório.'
,
'txt_cpf_usuario.cpf'
=>
'O cpf está inválido.'
,
'txt_cpf_usuario.usuariobloqueado'
=>
'Usuário bloqueado ou excluído do sistema.'
,
];
}
...
...
app/Providers/AppServiceProvider.php
View file @
dd19e3fa
...
...
@@ -2,9 +2,12 @@
namespace
App\Providers
;
use
App\User
;
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Support\Facades\Validator
;
use
Illuminate\Support\Facades\Auth
;
class
AppServiceProvider
extends
ServiceProvider
{
...
...
@@ -15,6 +18,19 @@ class AppServiceProvider extends ServiceProvider
*/
public
function
boot
()
{
Validator
::
extend
(
'usuariobloqueado'
,
function
(
$attribute
,
$value
,
$parameters
,
$validator
){
$usuario
=
User
::
where
(
'txt_cpf_usuario'
,
$value
)
->
first
();
if
(
$usuario
->
status_usuario_id
>=
3
){
return
false
;
}
else
{
return
true
;
}
});
//////////////inicio validador de CPF///////////////////////
Validator
::
extend
(
'cpf'
,
function
(
$attribute
,
$value
,
$parameters
,
$validator
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment