Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
3b4aa12e
Commit
3b4aa12e
authored
Dec 12, 2023
by
antonioDurval
Browse files
Corrigindo substituição apenas do plano de trabalho
parent
4b4dc96d
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
3b4aa12e
...
...
@@ -1957,32 +1957,30 @@ class TrabalhoController extends Controller
$evento
=
Evento
::
find
(
$request
->
editalId
);
$participanteSubstituido
=
Participante
::
where
(
'id'
,
$request
->
participanteId
)
->
first
();
$usuarioNovo
=
User
::
where
(
'id'
,
$request
->
novoParticianteId
)
->
first
();
$enderecoUsuarioNovo
=
$usuarioNovo
->
endereco
;
$participanteNovo
=
$usuarioNovo
->
participantes
->
first
();
$enderecoUsuarioNovo
=
$usuarioNovo
?
$usuarioNovo
->
endereco
:
null
;
$participanteNovo
=
$usuarioNovo
?
$usuarioNovo
->
participantes
->
first
()
:
null
;
$planoAntigo
=
Arquivo
::
where
(
'id'
,
$participanteSubstituido
->
planoTrabalho
->
id
)
->
first
();
//dd($enderecoUsuarioNovo);
//dd($usuarioNovo);
$passwordTemporario
=
Str
::
random
(
8
);
$data
[
'name'
]
=
$usuarioNovo
->
name
;
//$request->name;
$data
[
'email'
]
=
$usuarioNovo
->
email
;
//$request->emai
l;
$data
[
'password'
]
=
$usuarioNovo
->
password
;
//bcrypt($passwordTemporario)
;
$data
[
'data_de_nascimento'
]
=
$participanteNovo
->
data_de_nascimento
;
//$request
->data_de_nascimento;
$data
[
'name'
]
=
$usuarioNovo
?
$usuarioNovo
->
name
:
null
;
$data
[
'email'
]
=
$usuarioNovo
?
$usuarioNovo
->
email
:
nul
l
;
$data
[
'password'
]
=
$usuarioNovo
?
$usuarioNovo
->
password
:
null
;
$data
[
'data_de_nascimento'
]
=
$participanteNovo
?
$participanteNovo
->
data_de_nascimento
:
null
;
$data
[
'data_entrada'
]
=
$request
->
data_entrada
;
$data
[
'cpf'
]
=
$usuarioNovo
->
cpf
;
//$request->cpf;
$data
[
'cpf'
]
=
$usuarioNovo
?
$usuarioNovo
->
cpf
:
null
;
//$request->cpf;
$data
[
'tipo'
]
=
'participante'
;
$data
[
'funcao_participante_id'
]
=
4
;
$data
[
'rg'
]
=
$participanteNovo
->
rg
;
//$request->rg;
$data
[
'celular'
]
=
$usuarioNovo
->
celular
;
//$request->celular;
$data
[
'linkLattes'
]
=
$participanteNovo
->
linkLattes
;
//$request->linkLattes;
$data
[
'cep'
]
=
$enderecoUsuarioNovo
->
cep
;
//$request->cep;
$data
[
'uf'
]
=
$enderecoUsuarioNovo
->
uf
;
//$request->uf;
$data
[
'cidade'
]
=
$enderecoUsuarioNovo
->
cidade
;
//$request->cidade;
$data
[
'rua'
]
=
$enderecoUsuarioNovo
->
rua
;
//$request->rua;
$data
[
'numero'
]
=
$enderecoUsuarioNovo
->
numero
;
//$request->numero;
$data
[
'bairro'
]
=
$enderecoUsuarioNovo
->
bairro
;
//$request->bairro;
$data
[
'complemento'
]
=
$enderecoUsuarioNovo
->
complemento
;
//$request->complemento;
$data
[
'rg'
]
=
$participanteNovo
?
$participanteNovo
->
rg
:
null
;
//$request->rg;
$data
[
'celular'
]
=
$usuarioNovo
?
$usuarioNovo
->
celular
:
null
;
//$request->celular;
$data
[
'linkLattes'
]
=
$participanteNovo
?
$participanteNovo
->
linkLattes
:
null
;
//$request->linkLattes;
$data
[
'cep'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
cep
:
null
;
//$request->cep;
$data
[
'uf'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
uf
:
null
;
//$request->uf;
$data
[
'cidade'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
cidade
:
null
;
//$request->cidade;
$data
[
'rua'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
rua
:
null
;
//$request->rua;
$data
[
'numero'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
numero
:
null
;
//$request->numero;
$data
[
'bairro'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
bairro
:
null
;
//$request->bairro;
$data
[
'complemento'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
complemento
:
null
;
//$request->complemento;
//dd($request->all());
if
(
$request
->
instituicao
!=
"Outra"
)
{
$data
[
'instituicao'
]
=
$request
->
instituicao
;
}
else
{
...
...
resources/views/administrador/substituirParticipante.blade.php
View file @
3b4aa12e
...
...
@@ -106,11 +106,11 @@
Substituir
Participante
</
button
>
</
div
>
-->
<!--
<
div
class
=
"col-4"
style
=
"text-align: center"
>
<
div
class
=
"col-4"
style
=
"text-align: center
; margin-left: 45px;
"
>
<
button
style
=
" width:220px;"
type
=
"button"
id
=
"btnSubmitManter"
class
=
"btn btn-info"
onclick
=
"subsDiscentePlano(
{
{$participante->id}
}
)"
>
Substituir
Plano
de
Trabalho
</
button
>
</
div
>
-->
</
div
>
<
div
class
=
"col-4"
style
=
"margin:auto"
>
<
button
style
=
"float: left; width:220px;"
type
=
"button"
id
=
"btnSubmitCompleto"
class
=
"btn btn-info"
onclick
=
"subsDiscenteCompleto(
{
{$participante->id}
}
)"
>
Substituir
Ambos
...
...
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