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
3daa4e92
Unverified
Commit
3daa4e92
authored
Jul 21, 2022
by
GuilhermeGz
Committed by
GitHub
Jul 21, 2022
Browse files
Merge pull request #508 from antonioDurval/master
Adição de campo para buscar usuários(perfil ADMIN)
parents
1d43c241
690c5927
Changes
3
Hide whitespace changes
Inline
Side-by-side
.env.example
View file @
3daa4e92
A
PP_NAME=Laravel
PP_NAME=Laravel
APP_ENV=local
APP_ENV=local
APP_KEY=
APP_KEY=
APP_DEBUG=true
APP_DEBUG=true
...
@@ -43,4 +43,4 @@ PUSHER_APP_SECRET=
...
@@ -43,4 +43,4 @@ PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
\ No newline at end of file
app/Policies/UsuariosPolicy.php
deleted
100755 → 0
View file @
1d43c241
<?php
namespace
App\Policies
;
use
App\User
;
use
App\Evento
;
use
App\CoordenadorComissao
;
use
App\AdministradorResponsavel
;
use
Illuminate\Auth\Access\HandlesAuthorization
;
class
UsuariosPolicy
{
use
HandlesAuthorization
;
/**
* Create a new policy instance.
*
* @return void
*/
public
function
__construct
()
{
}
public
function
isUser
(
User
$user
){
if
(
$user
->
has
(
''
)){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
}
}
resources/views/administrador/usersAdmin.blade.php
View file @
3daa4e92
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<
div
class
=
"container"
style
=
"margin-top: 30px;"
>
<
div
class
=
"container"
style
=
"margin-top: 30px;"
>
<
div
class
=
"container"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
@
if
(
session
(
'mensagem'
))
@
if
(
session
(
'mensagem'
))
<
div
class
=
"col-md-12"
style
=
"margin-top: 30px;"
>
<
div
class
=
"col-md-12"
style
=
"margin-top: 30px;"
>
...
@@ -29,6 +29,9 @@
...
@@ -29,6 +29,9 @@
</
div
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
hr
>
<
div
class
=
"col-sm-4 mb-3"
style
=
"display:flex; margin:auto;"
>
<
input
type
=
"text"
class
=
"form-control form-control-edit"
placeholder
=
"Digite o nome do usuário..."
onkeyup
=
"buscar(this)"
>
<
img
src
=
"
{
{asset('img/icons/logo_lupa.png')}
}
"
alt
=
""
>
</
div
>
<
table
class
=
"table table-bordered"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
thead
>
<
tr
>
<
tr
>
...
@@ -38,11 +41,11 @@
...
@@ -38,11 +41,11 @@
<
th
scope
=
"col"
>
Opções
</
th
>
<
th
scope
=
"col"
>
Opções
</
th
>
</
tr
>
</
tr
>
</
thead
>
</
thead
>
<
tbody
>
<
tbody
id
=
"usuarios"
>
@
foreach
(
$users
as
$user
)
@
foreach
(
$users
as
$user
)
@
if
(
auth
()
->
user
()
->
id
!=
$user
->
id
)
@
if
(
auth
()
->
user
()
->
id
!=
$user
->
id
)
@
if
(
auth
()
->
user
()
->
id
!=
"administrador"
)
@
if
(
auth
()
->
user
()
->
id
!=
"administrador"
)
<
tr
>
<
tr
class
=
"apareceu"
>
<
td
>
<
td
>
{{
$user
->
name
}}
{{
$user
->
name
}}
</
td
>
</
td
>
...
@@ -117,6 +120,32 @@
...
@@ -117,6 +120,32 @@
@
section
(
'javascript'
)
@
section
(
'javascript'
)
<
script
>
<
script
>
function
buscar
(
input
)
{
let
nome_usuarios
=
document
.
getElementById
(
"usuarios"
)
.
children
;
if
(
input
.
value
.
length
>
2
)
{
for
(
let
i
=
0
;
i
<
nome_usuarios
.
length
;
i
++
){
if
(
nome_usuarios
[
i
]
.
classList
.
contains
(
"apareceu"
)){
let
nameUser
=
nome_usuarios
[
i
]
.
children
[
0
]
.
textContent
;
console
.
log
(
nameUser
);
if
(
nameUser
.
toLowerCase
()
.
substr
(
0
)
.
indexOf
(
input
.
value
.
toLowerCase
())
>=
0
)
{
nome_usuarios
[
i
]
.
style
.
display
=
""
;
}
else
{
nome_usuarios
[
i
]
.
style
.
display
=
"none"
;
}
}
}
}
else
{
for
(
let
i
=
0
;
i
<
nome_usuarios
.
length
;
i
++
)
{
if
(
nome_usuarios
[
i
]
.
classList
.
contains
(
"apareceu"
)){
nome_usuarios
[
i
]
.
style
.
display
=
""
;
}
}
}
}
</
script
>
</
script
>
@
endsection
@
endsection
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