1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
@extends('layouts.app')
@section('content')
<div class="row justify-content-center" style="margin-top: 100px;">
<div class="col-md-11">
<div class="row">
<div class="col-sm-4">
<div class="card-body" style="padding-top: 0.2rem;">
<div class="container">
<div class="form-row mt-3">
<div class="col-md-12"><h5 style="color: #1492E6; font-size: 20px;">Edital - {{$evento->nome}}</h5></div>
<div class="col-md-12"><h6 style="color: #234B8B; margin-bottom:-0.4rem; font-weight: bold; font-size: 14px;">Propostas Submetidas</h6><br></div>
<div class="col-md-12">
<select id="" class="form-control select-submeta" onchange="teste(this)" style="width: 200px;">
<option value="todos" selected>Todos</option>
<option value="aprovado">Recomendados</option>
<option value="reprovado">Não Recomendados</option>
<option value="submetido">Submetidos</option>
<option value="avaliado">Avaliados</option>
@foreach($grandesAreas as $grandeArea)
<option value="{{$grandeArea->nome}}">
Grande Área: {{ $grandeArea->nome }}
</option>
@foreach($areas as $area)
@if($grandeArea->id == $area->grande_area_id)
<option value="{{$area->nome}}">
- Área: {{ $area->nome }}
</option>
@endif
@endforeach
@endforeach
</select>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-3" style="display:flex; align-items: end;">
<input type="text" class="form-control form-control-edit" placeholder="Título do projeto ou nome do Proponente" onkeyup="buscar(this)"> <img src="{{asset('img/icons/logo_lupa.png')}}" alt="">
</div>
<div class="col-sm-5" style="display:flex; align-items: center;">
<h6 style="color: #234B8B; font-weight: bold; margin-left: 30px;">
<img src="{{asset('img/icons/pendente.png')}}" style="width: 22px"/>
Proposta Pendente
<img src="{{asset('img/icons/aprovado.png')}}" style="width: 22px"/>
Proposta Recomendada
<img src="{{asset('img/icons/negado.png')}}" style="width: 22px"/>
Proposta Negada
<br>
<svg width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"/><path d="M3 10H2V4.003C2 3.449 2.455 3 2.992 3h18.016A.99.99 0 0 1 22 4.003V10h-1v10.001a.996.996 0 0 1-.993.999H3.993A.996.996 0 0 1 3 20.001V10zm16 0H5v9h14v-9zM4 5v3h16V5H4zm5 7h6v2H9v-2z"/></g></svg>
Proposta Arquivada
</h6>
</div>
</div>
</div>
</div>
<div id="projetos">
@foreach( $trabalhos as $trabalho )
<!--Informações Proponente-->
<div class="row justify-content-center allTrab apareceu {{$trabalho->status}} {{$trabalho->grandeArea->nome}} {{$trabalho->area->nome}}" style="margin-top: 20px;" >
<br>
<div class="col-md-11" onclick="myFunc({{$trabalho->id}})">
<a href="{{route('admin.analisarProposta',['id'=>$trabalho->id])}}" id="vizuProposta{{$trabalho->id}}" hidden></a>
<div class="card" style="border-radius: 5px;margin-left: 25px;margin-right: 25 px;
@if($trabalho->arquivado == true)background-color: #e7e7e7;@endif">
<div class="card-body" style="padding-top: 0.2rem; padding-left: 25px;padding-right: 25px;">
<div class="form-row mt-3">
<div class="col-md-10 tituloProj"><h5 style="color: #234B8B; font-weight: bold; margin-top: 15px;">Título: {{ $trabalho->titulo }}</h5></div>
<div class="col-md-2">
@if($trabalho->arquivado == true)
<div title="Proposta Arquivada">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
style="width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;"><g><path fill="none" d="M0 0h24v24H0z"/><path d="M3 10H2V4.003C2 3.449 2.455 3 2.992 3h18.016A.99.99 0 0 1 22 4.003V10h-1v10.001a.996.996 0 0 1-.993.999H3.993A.996.996 0 0 1 3 20.001V10zm16 0H5v9h14v-9zM4 5v3h16V5H4zm5 7h6v2H9v-2z"/></g></svg></div>
@else
@if($trabalho->status == "aprovado")
<img src="{{asset('img/icons/aprovado.png')}}" style="width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;" alt="">
@elseif($trabalho->status == "reprovado")
<img src="{{asset('img/icons/negado.png')}}" style="width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;" alt="">
@else
<img src="{{asset('img/icons/pendente.png')}}" style="width: 20%;margin: auto;display: flex;justify-content: center;align-items: center;" alt="">
@endif
@endif
</div>
</div>
<hr style="border-top: 1px solid#1492E6">
<div class="form-row mt-3">
<div class="col-md-12">
<p class="proponenteProj" style="color: #4D4D4D; padding: 0px"><b>Proponente:</b> {{ App\Proponente::find($trabalho->proponente_id)->user->name }}</p>
</div>
<div class="col-md-12"> <p style="color: #4D4D4D; padding: 0px"><b>Discentes:</b>
@foreach($trabalho->participantes as $participante)
{{$participante->user->name}};
@endforeach
</div>
@if($trabalho->grande_area_id != null && $trabalho->area_id != null && $trabalho->sub_area_id != null)
<div class="col-md-12">
<h6 style="color: #234B8B; font-weight: bold;font-size: 13px;">{{$trabalho->grandeArea->nome}} > {{$trabalho->area->nome}} > {{$trabalho->subArea->nome}}</h6>
</div>
@endif
</div>
</div>
</div>
</div>
</div>
@endforeach
</div>
@endsection
@section('javascript')
<script type="application/javascript">
function myFunc(i){
document.getElementById("vizuProposta"+i).click();
}
function buscar(input) {
let trabalhos = document.getElementById("projetos").children;
//console.log(trabalhos)
if(input.value.length > 2) {
for(let i = 0; i < trabalhos.length; i++){
if(trabalhos[i].classList.contains("apareceu")){
let tituloProjeto = trabalhos[i].getElementsByClassName("tituloProj")[0].textContent
let nomeProponente = trabalhos[i].getElementsByClassName("proponenteProj")[0].textContent
if(tituloProjeto.toLowerCase().substr(0).indexOf(input.value.toLowerCase()) >= 0 || nomeProponente.toLowerCase().substr(0).indexOf(input.value.toLowerCase()) >= 0) {
trabalhos[i].style.display = "";
}else {
trabalhos[i].style.display = "none";
}
}
}
}else {
for(let i = 0; i < trabalhos.length; i++) {
if(trabalhos[i].classList.contains("apareceu")){
trabalhos[i].style.display = "";
}
}
}
}
function teste(select) {
let todos = document.getElementsByClassName("allTrab");
let selecionados = document.getElementsByClassName(select.value);
if(select.value == "todos"){
for(let i = 0; i < todos.length; i++){
todos[i].style.display = ""
if(!todos[i].classList.contains("apareceu")){
todos[i].classList.add("apareceu");
}
}
}else {
for(let j = 0; j < todos.length; j++){
todos[j].style.display = "none";
todos[j].classList.remove("apareceu");
}
for(let k = 0; k < selecionados.length; k++){
selecionados[k].style.display = "";
selecionados[k].classList.add("apareceu");
}
}
}
</script>
@endsection
<style>
html{
overflow-x:hidden;
}
</style>