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
c51e429f
Commit
c51e429f
authored
Jul 11, 2020
by
Gabriel-31415
Browse files
conflito resolvido
parents
cd09440d
d6bb053c
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
c51e429f
No preview for this file type
resources/views/projeto/editar.blade.php
View file @
c51e429f
...
...
@@ -478,37 +478,15 @@
});
// Habilitando / desabilitando plano de trabalho
$
(
'.simPlano'
)
.
click
(
function
(
e
)
{
$
(
document
)
.
on
(
'click'
,
'.simPlano'
,
function
(
e
)
{
e
.
preventDefault
();
var
possuiPlano
=
$
(
this
)
.
parent
()
.
parent
()
.
next
();
//se o participante não tem plano, adicionar; se ele já tem, apenas exibir
if
(
possuiPlano
[
0
]
.
firstElementChild
==
null
){
linha
=
linhaPlanoTrabalho
();
possuiPlano
.
append
(
linha
);
possuiPlano
[
0
]
.
style
.
display
=
'block'
;
}
else
if
(
possuiPlano
[
0
]
.
firstElementChild
.
className
==
'exibirPlano'
){
possuiPlano
[
0
]
.
style
.
display
=
'block'
;
}
//esconder a imagem de deletar
deletar
=
$
(
this
)
.
parent
()
.
next
()[
0
];
deletar
.
style
.
display
=
"none"
;
var
plano
=
$
(
this
)
.
next
()
.
next
()[
0
];
plano
.
style
.
display
=
'block'
;
});
// se não há plano de trabalho, esconder a div planoHabilitado e exibir imagem de deletar
$
(
document
)
.
on
(
'click'
,
'.naoPlano'
,
function
(
e
)
{
e
.
preventDefault
();
var
plano
=
$
(
this
)
.
parent
()
.
parent
()
.
next
()[
0
];
var
plano
=
$
(
this
)
.
next
()[
0
];
plano
.
style
.
display
=
'none'
;
deletar
=
$
(
this
)
.
parent
()
.
next
()[
0
]
deletar
.
style
.
display
=
"block"
;
//comunicar ao controller para deletar somente o plano
$
(
this
)
.
next
()
.
val
(
'sim'
);
});
//se há plano de trabalho, esconder a imagem de deletar
...
...
@@ -538,11 +516,18 @@
function
montarLinhaInput
()
{
return
"<div id="
+
"novoParticipante"
+
">"
+
"<div class='row'>"
+
"<div class='col-sm-9'>"
+
"<br><h4>Dados do participante</h4>"
+
"</div>"
+
"<div class='col-sm-3'>"
+
"</div>"
+
"</div>"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"col-sm-5"
+
">"
+
"<label>Nome Completo</label>"
+
"<input"
+
" type="
+
'text'
+
" style="
+
"margin-bottom:10px"
+
" class="
+
'form-control'
+
" @error('nomeParticipante') is-invalid @enderror"
+
"name="
+
'nomeParticipante[]'
+
" placeholder="
+
"Nome"
+
"
required
>"
+
"<label>Nome Completo
*
</label>"
+
"<input"
+
" type="
+
'text'
+
" style="
+
"margin-bottom:10px"
+
" class="
+
'form-control'
+
" @error('nomeParticipante') is-invalid @enderror"
+
"name="
+
'nomeParticipante[]'
+
" placeholder="
+
"Nome"
+
">"
+
"@error('nomeParticipante')"
+
"<span class='invalid-feedback'"
+
"role='alert'"
+
"style='overflow: visible; display:block'>"
+
"<strong>{{
$message
}}</strong>"
+
...
...
@@ -550,8 +535,8 @@
"@enderror"
+
"</div>"
+
"<div class="
+
"col-sm-4"
+
">"
+
"<label>E-mail</label>"
+
"<input type='email'"
+
"style='margin-bottom:10px'"
+
"class="
+
"form-control @error('emailParticipante') is-invalid @enderror"
+
"name='emailParticipante[]'"
+
"placeholder='email'
required
>"
+
"<label>E-mail
*
</label>"
+
"<input type='email'"
+
"style='margin-bottom:10px'"
+
"class="
+
"form-control @error('emailParticipante') is-invalid @enderror"
+
"name='emailParticipante[]'"
+
"placeholder='email' >"
+
"@error('emailParticipante')"
+
"<span class='invalid-feedback'"
+
"role='alert'"
+
"style='overflow: visible; display:block'>"
+
"<strong>{{
$message
}}</strong>"
+
...
...
@@ -559,7 +544,7 @@
"@enderror"
+
"</div>"
+
"<div class='col-sm-3'>"
+
"<label>Função:</label>"
+
"<label>Função
*
:</label>"
+
"<select class="
+
"form-control @error('funcaoParticipante') is-invalid @enderror"
+
"name='funcaoParticipante[]'"
+
"id='funcaoParticipante'> "
+
"<option value='' disabled selected hidden> Função </option>"
+
"@foreach(
$funcaoParticipantes
as
$funcaoParticipante
)"
+
...
...
@@ -573,11 +558,15 @@
"</select>"
+
"</div>"
+
"</div>"
+
"<h6 class='mb-1'>Possui plano de trabalho?</h6>"
+
"<button class="
+
"'btn btn-primary mt-2 mb-2 mr-1 simPlano'"
+
">Sim</button>"
+
"<button class="
+
"'btn btn-primary mt-2 mb-2 mr-1 naoPlano'"
+
">Não</button>"
+
"<div id="
+
"planoHabilitado"
+
" style="
+
"'display:none;'"
+
">"
+
"<h5>Dados do plano de trabalho</h5>"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"col-sm-4"
+
">"
+
"<label>Titulo</label>"
+
"<input"
+
" type="
+
'text'
+
" style="
+
"margin-bottom:10px"
+
" class="
+
"form-control @error('nomePlanoTrabalho') is-invalid @enderror"
+
" name="
+
'nomePlanoTrabalho[]'
+
" placeholder="
+
"Nome"
+
"
required
>"
+
"<label>Titulo
*
</label>"
+
"<input"
+
" type="
+
'text'
+
" style="
+
"margin-bottom:10px"
+
" class="
+
"form-control @error('nomePlanoTrabalho') is-invalid @enderror"
+
" name="
+
'nomePlanoTrabalho[]'
+
" placeholder="
+
"Nome"
+
">"
+
"@error('nomePlanoTrabalho')"
+
"<span class='invalid-feedback'"
+
"role='alert'"
+
"style='overflow: visible; display:block'>"
+
"<strong>{{
$message
}}</strong>"
+
...
...
@@ -585,15 +574,15 @@
"@enderror"
+
"</div>"
+
"<div class="
+
"col-sm-7"
+
">"
+
"<label for="
+
"nomeTrabalho"
+
">Anexo </label>"
+
"<label for="
+
"nomeTrabalho"
+
">Anexo
*
</label>"
+
"<div class="
+
"input-group"
+
">"
+
"<div class='input-group-prepend'>"
+
"<span class='input-group-text' id='
inputGroupFileAddon01
'>Selecione um arquivo:</span>"
+
"<span class='input-group-text' id='
anexoPlanoTrabalho
'>Selecione um arquivo:</span>"
+
"</div>"
+
"<div class='custom-file'>"
+
"<input type='file' class='custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror"
+
"id='anexoPlanoTrabalho'"
+
"aria-describedby='anexoPlanoTrabalho'"
+
"name='anexoPlanoTrabalho[]' required"
+
"aria-describedby='
inputGroupFileAddon01
'>"
+
"<input type='file' class='custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror"
+
"id='anexoPlanoTrabalho'"
+
"
aria-describedby='
anexoPlanoTrabalho' name='anexoPlanoTrabalho[]
'>"
+
"<label class='custom-file-label' id='custom-file-label' for='inputGroupFile01'>O arquivo deve ser no formato PDF de até 2mb.</label>"
+
"</div>"
+
"</div>"
+
...
...
@@ -605,10 +594,13 @@
"</div>"
+
"<div class="
+
"col-sm-1"
+
">"
+
"<a class="
+
"delete"
+
">"
+
"<img src="
+
"/img/icons/user-times-solid.svg"
+
" style="
+
"width:25px;margin-top:35px"
+
">"
+
"<img src="
+
"
{{ asset('
/img/icons/user-times-solid.svg
') }}
"
+
" style="
+
"width:25px;margin-top:35px"
+
">"
+
"</a>"
+
"</div>"
+
"</div>"
+
"</div>"
+
"<a href='#' class="
+
"'btn btn-danger mt-2 mb-2 delete'"
+
" style='width:100%;margin-top:10px'"
+
">Remover participante</a>"
+
"</div>"
;
}
// function montarLinhaInputPlanoTrabalho(){
...
...
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