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
66dd5d33
"database/seeders/AdministradorSeeder.php" did not exist on "3bc67fa99eb68bef2c89b18b6b83326b60a38ecf"
Commit
66dd5d33
authored
Jan 30, 2022
by
Guilherme Silva
Browse files
Permitindo criação avaliador selecionando seu tipo
parent
6ec36cc3
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
66dd5d33
...
@@ -182,6 +182,7 @@ class AdministradorController extends Controller
...
@@ -182,6 +182,7 @@ class AdministradorController extends Controller
case
"avaliador"
:
case
"avaliador"
:
$avaliador
=
new
Avaliador
();
$avaliador
=
new
Avaliador
();
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
tipo
=
$request
->
tipoAvaliador
;
$avaliador
->
save
();
$avaliador
->
save
();
break
;
break
;
case
"proponente"
:
case
"proponente"
:
...
...
resources/views/administrador/novo_user.blade.php
View file @
66dd5d33
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
</
div
>
</
div
>
<
div
class
=
"col-md-4"
>
<
div
class
=
"col-md-4"
>
<
label
for
=
"tipo"
class
=
"col-form-label"
>
{{
__
(
'Tipo*'
)
}}
</
label
>
<
label
for
=
"tipo"
class
=
"col-form-label"
>
{{
__
(
'Tipo*'
)
}}
</
label
>
<
select
name
=
"tipo"
id
=
"tipo"
onchange
=
"mudar()"
class
=
"form-control"
>
<
select
name
=
"tipo"
id
=
"tipo"
onchange
=
"mudar()
; avaliadorCheck();
"
class
=
"form-control"
>
@
if
(
auth
()
->
user
()
->
tipo
==
'administrador'
)
@
if
(
auth
()
->
user
()
->
tipo
==
'administrador'
)
<
option
@
if
(
old
(
'tipo'
)
==
"administradorResponsavel"
)
required
@
endif
value
=
"administradorResponsavel"
>
Administrador
responsável
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
"administradorResponsavel"
)
required
@
endif
value
=
"administradorResponsavel"
>
Administrador
responsável
</
option
>
@
endif
@
endif
...
@@ -74,6 +74,15 @@
...
@@ -74,6 +74,15 @@
<
option
@
if
(
old
(
'tipo'
)
==
"participante"
)
required
@
endif
value
=
"participante"
>
Discente
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
"participante"
)
required
@
endif
value
=
"participante"
>
Discente
</
option
>
</
select
>
</
select
>
</
div
>
</
div
>
<
div
>
<
label
id
=
"labTipoAvaliador"
style
=
"display: none"
for
=
"tipoAvaliador"
class
=
"col-form-label"
>
{{
__
(
'Avaliador*'
)
}}
</
label
>
<
select
id
=
"tipoAvaliador"
style
=
"display: none"
name
=
"tipoAvaliador"
class
=
"form-control"
>
<
option
@
if
(
old
(
'tipo'
)
==
"Externo"
)
@
endif
value
=
"Externo"
>
Externo
</
option
>
<
option
@
if
(
old
(
'tipo'
)
==
"Interno"
)
@
endif
value
=
"Interno"
>
Interno
</
option
>
</
select
>
</
div
>
<
div
class
=
"col-md-2"
>
<
div
class
=
"col-md-2"
>
<
label
for
=
"celular"
class
=
"col-form-label"
>
{{
__
(
'Celular*'
)
}}
</
label
>
<
label
for
=
"celular"
class
=
"col-form-label"
>
{{
__
(
'Celular*'
)
}}
</
label
>
<
input
id
=
"celular"
type
=
"text"
class
=
"form-control @error('celular') is-invalid @enderror"
name
=
"celular"
value
=
"{{ old('celular') }}"
required
autocomplete
=
"celular"
autofocus
>
<
input
id
=
"celular"
type
=
"text"
class
=
"form-control @error('celular') is-invalid @enderror"
name
=
"celular"
value
=
"{{ old('celular') }}"
required
autocomplete
=
"celular"
autofocus
>
...
@@ -357,6 +366,22 @@
...
@@ -357,6 +366,22 @@
instituicao
.
parentElement
.
style
.
display
=
'none'
;
instituicao
.
parentElement
.
style
.
display
=
'none'
;
}
}
}
}
function
avaliadorCheck
()
{
var
tipoUser
=
document
.
getElementById
(
'tipo'
);
var
tipoAval
=
document
.
getElementById
(
"tipoAvaliador"
);
var
labAval
=
document
.
getElementById
(
"labTipoAvaliador"
)
if
(
tipo
.
value
==
"avaliador"
)
{
tipoAval
.
style
.
display
=
""
;
labAval
.
style
.
display
=
""
;
tipo
.
parentElement
.
className
=
'col-md-2'
}
else
{
tipo
.
parentElement
.
className
=
'col-md-4'
labAval
.
parentElement
.
className
=
''
tipoAval
.
parentElement
.
className
=
''
tipoAval
.
style
.
display
=
"none"
;
labAval
.
style
.
display
=
"none"
;
}
}
window
.
onload
=
showInstituicao
();
window
.
onload
=
showInstituicao
();
</
script
>
</
script
>
@
endsection
@
endsection
\ No newline at end of file
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