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
31ebffc8
Unverified
Commit
31ebffc8
authored
Dec 12, 2023
by
Antônio Durval
Committed by
GitHub
Dec 12, 2023
Browse files
Merge pull request #936 from antonioDurval/master
Corrigindo substituição apenas do plano de trabalho
parents
d11c026d
f13ff566
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
31ebffc8
...
@@ -1957,32 +1957,30 @@ class TrabalhoController extends Controller
...
@@ -1957,32 +1957,30 @@ class TrabalhoController extends Controller
$evento
=
Evento
::
find
(
$request
->
editalId
);
$evento
=
Evento
::
find
(
$request
->
editalId
);
$participanteSubstituido
=
Participante
::
where
(
'id'
,
$request
->
participanteId
)
->
first
();
$participanteSubstituido
=
Participante
::
where
(
'id'
,
$request
->
participanteId
)
->
first
();
$usuarioNovo
=
User
::
where
(
'id'
,
$request
->
novoParticianteId
)
->
first
();
$usuarioNovo
=
User
::
where
(
'id'
,
$request
->
novoParticianteId
)
->
first
();
$enderecoUsuarioNovo
=
$usuarioNovo
->
endereco
;
$enderecoUsuarioNovo
=
$usuarioNovo
?
$usuarioNovo
->
endereco
:
null
;
$participanteNovo
=
$usuarioNovo
->
participantes
->
first
();
$participanteNovo
=
$usuarioNovo
?
$usuarioNovo
->
participantes
->
first
()
:
null
;
$planoAntigo
=
Arquivo
::
where
(
'id'
,
$participanteSubstituido
->
planoTrabalho
->
id
)
->
first
();
$planoAntigo
=
Arquivo
::
where
(
'id'
,
$participanteSubstituido
->
planoTrabalho
->
id
)
->
first
();
//dd($enderecoUsuarioNovo);
//dd($usuarioNovo);
$passwordTemporario
=
Str
::
random
(
8
);
$passwordTemporario
=
Str
::
random
(
8
);
$data
[
'name'
]
=
$usuarioNovo
->
name
;
//$request->name;
$data
[
'name'
]
=
$usuarioNovo
?
$usuarioNovo
->
name
:
null
;
$data
[
'email'
]
=
$usuarioNovo
->
email
;
//$request->emai
l;
$data
[
'email'
]
=
$usuarioNovo
?
$usuarioNovo
->
email
:
nul
l
;
$data
[
'password'
]
=
$usuarioNovo
->
password
;
//bcrypt($passwordTemporario)
;
$data
[
'password'
]
=
$usuarioNovo
?
$usuarioNovo
->
password
:
null
;
$data
[
'data_de_nascimento'
]
=
$participanteNovo
->
data_de_nascimento
;
//$request
->data_de_nascimento;
$data
[
'data_de_nascimento'
]
=
$participanteNovo
?
$participanteNovo
->
data_de_nascimento
:
null
;
$data
[
'data_entrada'
]
=
$request
->
data_entrada
;
$data
[
'data_entrada'
]
=
$request
->
data_entrada
;
$data
[
'cpf'
]
=
$usuarioNovo
->
cpf
;
//$request->cpf;
$data
[
'cpf'
]
=
$usuarioNovo
?
$usuarioNovo
->
cpf
:
null
;
//$request->cpf;
$data
[
'tipo'
]
=
'participante'
;
$data
[
'tipo'
]
=
'participante'
;
$data
[
'funcao_participante_id'
]
=
4
;
$data
[
'funcao_participante_id'
]
=
4
;
$data
[
'rg'
]
=
$participanteNovo
->
rg
;
//$request->rg;
$data
[
'rg'
]
=
$participanteNovo
?
$participanteNovo
->
rg
:
null
;
//$request->rg;
$data
[
'celular'
]
=
$usuarioNovo
->
celular
;
//$request->celular;
$data
[
'celular'
]
=
$usuarioNovo
?
$usuarioNovo
->
celular
:
null
;
//$request->celular;
$data
[
'linkLattes'
]
=
$participanteNovo
->
linkLattes
;
//$request->linkLattes;
$data
[
'linkLattes'
]
=
$participanteNovo
?
$participanteNovo
->
linkLattes
:
null
;
//$request->linkLattes;
$data
[
'cep'
]
=
$enderecoUsuarioNovo
->
cep
;
//$request->cep;
$data
[
'cep'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
cep
:
null
;
//$request->cep;
$data
[
'uf'
]
=
$enderecoUsuarioNovo
->
uf
;
//$request->uf;
$data
[
'uf'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
uf
:
null
;
//$request->uf;
$data
[
'cidade'
]
=
$enderecoUsuarioNovo
->
cidade
;
//$request->cidade;
$data
[
'cidade'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
cidade
:
null
;
//$request->cidade;
$data
[
'rua'
]
=
$enderecoUsuarioNovo
->
rua
;
//$request->rua;
$data
[
'rua'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
rua
:
null
;
//$request->rua;
$data
[
'numero'
]
=
$enderecoUsuarioNovo
->
numero
;
//$request->numero;
$data
[
'numero'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
numero
:
null
;
//$request->numero;
$data
[
'bairro'
]
=
$enderecoUsuarioNovo
->
bairro
;
//$request->bairro;
$data
[
'bairro'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
bairro
:
null
;
//$request->bairro;
$data
[
'complemento'
]
=
$enderecoUsuarioNovo
->
complemento
;
//$request->complemento;
$data
[
'complemento'
]
=
$enderecoUsuarioNovo
?
$enderecoUsuarioNovo
->
complemento
:
null
;
//$request->complemento;
//dd($request->all());
if
(
$request
->
instituicao
!=
"Outra"
)
{
if
(
$request
->
instituicao
!=
"Outra"
)
{
$data
[
'instituicao'
]
=
$request
->
instituicao
;
$data
[
'instituicao'
]
=
$request
->
instituicao
;
}
else
{
}
else
{
...
...
resources/views/administrador/substituirParticipante.blade.php
View file @
31ebffc8
...
@@ -106,11 +106,11 @@
...
@@ -106,11 +106,11 @@
Substituir
Participante
Substituir
Participante
</
button
>
</
button
>
</
div
>
-->
</
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}
}
)"
>
<
button
style
=
" width:220px;"
type
=
"button"
id
=
"btnSubmitManter"
class
=
"btn btn-info"
onclick
=
"subsDiscentePlano(
{
{$participante->id}
}
)"
>
Substituir
Plano
de
Trabalho
Substituir
Plano
de
Trabalho
</
button
>
</
button
>
</
div
>
-->
</
div
>
<
div
class
=
"col-4"
style
=
"margin:auto"
>
<
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}
}
)"
>
<
button
style
=
"float: left; width:220px;"
type
=
"button"
id
=
"btnSubmitCompleto"
class
=
"btn btn-info"
onclick
=
"subsDiscenteCompleto(
{
{$participante->id}
}
)"
>
Substituir
Ambos
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