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
6804f40a
"database/seeders/DatabaseSeeder.php" did not exist on "3bc67fa99eb68bef2c89b18b6b83326b60a38ecf"
Commit
6804f40a
authored
Jul 18, 2020
by
Gabriel-31415
Browse files
editar area de avaliador
parent
7b04089f
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/UserController.php
View file @
6804f40a
...
@@ -100,6 +100,12 @@ class UserController extends Controller
...
@@ -100,6 +100,12 @@ class UserController extends Controller
return
redirect
()
->
back
()
->
withErrors
([
'nova_senha'
=>
'Senhas diferentes'
]);
return
redirect
()
->
back
()
->
withErrors
([
'nova_senha'
=>
'Senhas diferentes'
]);
}
}
}
}
if
(
Auth
()
->
user
()
->
avaliadors
!=
null
&&
$request
->
area
!=
null
&&
Auth
()
->
user
()
->
tipo
!=
"avaliador"
){
$avaliador
=
Avaliador
::
where
(
'user_id'
,
'='
,
$id
)
->
first
();
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
area_id
=
$request
->
area
;
$avaliador
->
update
();
}
switch
(
$request
->
tipo
)
{
switch
(
$request
->
tipo
)
{
case
"administradorResponsavel"
:
case
"administradorResponsavel"
:
...
@@ -110,6 +116,7 @@ class UserController extends Controller
...
@@ -110,6 +116,7 @@ class UserController extends Controller
case
"avaliador"
:
case
"avaliador"
:
$avaliador
=
Avaliador
::
where
(
'user_id'
,
'='
,
$id
)
->
first
();
$avaliador
=
Avaliador
::
where
(
'user_id'
,
'='
,
$id
)
->
first
();
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
area_id
=
$request
->
area
;
$avaliador
->
update
();
$avaliador
->
update
();
break
;
break
;
case
"proponente"
:
case
"proponente"
:
...
...
resources/views/user/perfilUser.blade.php
View file @
6804f40a
...
@@ -95,6 +95,38 @@
...
@@ -95,6 +95,38 @@
</
span
>
</
span
>
@
enderror
@
enderror
</
div
>
</
div
>
@
if
(
Auth
()
->
user
()
->
avaliadors
)
<
div
class
=
"col-md-4"
>
<
label
for
=
"area"
class
=
"col-form-label"
>
{{
__
(
'Área:'
)
}}
</
label
>
<
select
style
=
"display: inline"
class
=
"form-control @error('area') is-invalid @enderror"
name
=
"area"
id
=
"area"
>
@
if
(
Auth
()
->
user
()
->
avaliadors
->
area_id
==
null
)
<
option
value
=
""
selected
>
Indefinida
</
option
>
@
foreach
(
App\Area
::
all
()
as
$area
)
@
if
(
Auth
()
->
user
()
->
avaliadors
->
area_id
==
$area
->
id
)
<
option
value
=
"{{
$area->id
}}"
selected
>
{{
$area
->
nome
}}
</
option
>
@
else
<
option
value
=
"{{
$area->id
}}"
>
{{
$area
->
nome
}}
</
option
>
@
endif
@
endforeach
@
else
@
foreach
(
App\Area
::
all
()
as
$area
)
@
if
(
Auth
()
->
user
()
->
avaliadors
->
area_id
==
$area
->
id
)
<
option
value
=
"{{
$area->id
}}"
selected
>
{{
$area
->
nome
}}
</
option
>
@
else
<
option
value
=
"{{
$area->id
}}"
>
{{
$area
->
nome
}}
</
option
>
@
endif
@
endforeach
@
endif
</
select
>
@
error
(
'area'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
@
endif
</
div
>
</
div
>
<
div
class
=
"form-group row"
>
<
div
class
=
"form-group row"
>
<
div
class
=
"col-md-4"
>
<
div
class
=
"col-md-4"
>
...
...
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