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
77e108f8
"app/Http/vscode:/vscode.git/clone" did not exist on "150c75eee3166d7200f776c127ba805a6c38d4b1"
Commit
77e108f8
authored
Feb 10, 2023
by
Lucas Henrique
Browse files
Evita edição desnecessária dos campos do barema
parent
828f86bd
Changes
1
Show whitespace changes
Inline
Side-by-side
resources/views/evento/editarEvento.blade.php
View file @
77e108f8
...
...
@@ -479,7 +479,7 @@
<
div
class
=
"row justify-content-center"
style
=
"margin-top:10px; display: none"
id
=
"displayCampos"
>
<
div
class
=
"row align-items-end mb-4"
>
<
label
class
=
"col-sm-3"
for
=
"pontuacao"
>
Valor
total
da
pontuação
por
Barema
:<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
label
>
<
input
type
=
"number"
name
=
"pontuacao"
min
=
"
1
"
class
=
"col-sm-1 form-control"
id
=
"pontuacao"
value
=
"
{
{old('pontuacao')?old('pontuacao'):$pontuacao}
}
"
/>
<
input
type
=
"number"
name
=
"pontuacao"
min
=
"
0
"
class
=
"col-sm-1 form-control"
id
=
"pontuacao"
value
=
"
{
{old('pontuacao')?old('pontuacao'):$pontuacao}
}
"
/>
</
div
>
<
label
>
Campos
do
Barema
:</
label
>
<
table
class
=
"table table-bordered col-sm-12"
id
=
"dynamicAddRemove"
>
...
...
@@ -491,7 +491,9 @@
<
th
>
Ação
</
th
>
</
tr
>
@
if
(
$camposAvaliacao
->
count
()
!=
0
)
@
php
$somaNotas
=
0
;
@
endphp
@
foreach
(
$camposAvaliacao
as
$campoAvaliacao
)
@
php
$somaNotas
+=
$campoAvaliacao
->
nota_maxima
;
@
endphp
@
if
(
$numCampos
==
0
)
<
tr
>
...
...
@@ -619,7 +621,7 @@
A
soma
das
notas
máximas
deve
ser
igual
a
pontuação
total
definida
.
</
div
>
<
input
type
=
"checkbox"
id
=
"checkB[0]"
checked
name
=
"campos[]"
value
=
"0"
hidden
>
<
input
type
=
"checkbox"
id
=
"checkB[0]"
checked
name
=
"campos[]"
value
=
"0"
hidden
disabled
>
<
input
type
=
"number"
name
=
"somaNotas"
value
=
"0"
id
=
"somaNotas"
hidden
>
...
...
@@ -742,10 +744,13 @@
if
(
numCampos
>
1
)
{
for
(
let
y
=
1
;
y
<
(
numCampos
);
y
++
)
{
$
(
"#displayCampos"
)
.
append
(
'<input type="checkbox" id="checkB['
+
y
+
']" checked name="campos[]" value="'
+
y
+
'" hidden>'
);
$
(
"#displayCampos"
)
.
append
(
'<input type="checkbox" id="checkB['
+
y
+
']" checked name="campos[]" value="'
+
y
+
'" hidden
disabled
>'
);
addOrdemPrioridade
();
}
}
@
if
(
old
(
'tipoAvaliacao'
)
==
'campos'
||
$evento
->
tipoAvaliacao
==
'campos'
)
$
(
'#somaNotas'
)
.
val
(
'{{$somaNotas}}'
);
@
endif
z
=
0
@
foreach
(
$camposAvaliacao
as
$campoAvaliacao
)
...
...
@@ -757,6 +762,10 @@
});
$
(
"input[name^='inputField']"
)
.
on
(
'change'
,
function
()
{
$
(
"input[name^='campos']"
)
.
prop
(
'disabled'
,
false
);
});
// Adiciona campo de avaliação
$
(
"#dynamic-ar"
)
.
click
(
function
()
{
...
...
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