Commit 3e27f13a authored by S-Nathalia's avatar S-Nathalia
Browse files

Merge branch 'master' of github.com:lmtsufape/submeta

parents 6e2bf42a 3daa4e92
APP_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
<?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(){
}
}
}
...@@ -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
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
@endphp @endphp
<div @if(!$participante) hidden @endif class="form-row mb-1 col-md-6" style="margin-top: 10px" id="part{{$i}}"> <div @if(!$participante) hidden @endif class="form-row mb-3 col-md-6" style="margin-top: 10px" id="part{{$i}}">
<div class="col-sm-2" style="display: flex; align-items: center;"> <div class="col-sm-2" style="display: flex; align-items: center;">
<img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt=""> <img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt="">
</div> </div>
......
...@@ -17,16 +17,17 @@ ...@@ -17,16 +17,17 @@
<div class="row justify-content-start" style="alignment: center"> <div class="row justify-content-start" style="alignment: center">
@foreach($projeto->participantes as $participante) @foreach($projeto->participantes as $participante)
<div class="col-sm-1"> <div class="col-sm-1 mt-4">
<img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt=""> <img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt="">
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5 mt-4">
<h5>{{$participante->user->name}}</h5> <h5 class="mb-0">Nome: {{$participante->user->name}}</h5>
<h5>{{$participante->planoTrabalho->titulo}}</h5> <h5 class="mb-0">Plano: {{$participante->planoTrabalho->titulo}}</h5>
<h9> <h6>
<a href="" data-toggle="modal" data-target="#modalVizuParticipante{{$participante->id}}" class="button">Informações</a> <a href="" data-toggle="modal" data-target="#modalVizuParticipante{{$participante->id}}" class="button">Informações</a>
</h9> </h6>
</div> </div>
<!-- Modal visualizar informações participante --> <!-- Modal visualizar informações participante -->
<div class="modal fade" id="modalVizuParticipante{{$participante->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="modalVizuParticipante{{$participante->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl"> <div class="modal-dialog modal-dialog-centered modal-xl">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment