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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
@extends('layouts.app')
@section('content')
<div class="container">
@if(isset($mensagem))
<div class="col-sm-12">
<br>
<div class="alert alert-success">
<p>{{ $mensagem }}</p>
</div>
</div>
@endif
@if(session('mensagem'))
<div class="col-sm-12">
<br>
<div class="alert alert-success">
<p>{{session('mensagem')}}</p>
</div>
</div>
@endif
<div class="row justify-content-center" style="margin-top: 3rem;">
<div class="col-md-11" style="margin-bottom: -3rem">
<div class="card card_conteudo shadow bg-white" style="border-radius:12px; border-width:0px;">
<div class="card-header" style="border-top-left-radius: 12px; border-top-right-radius: 12px; background-color: #fff">
<div class="d-flex justify-content-between align-items-center" style="margin-top: 9px; margin-bottom:-1rem">
<div class="bottomVoltar" style="margin-top: -20px">
<a href="{{ route('proponente.index') }}" class="btn btn-secondary" style=""><img src="{{asset('img/icons/logo_esquerda.png')}}" alt="" width="15px"></a>
</div>
<div class="form-group">
@if($flag == 'false')
<h5 class="card-title mb-0" style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">Minhas propostas</h5>
@else
<div class="form-group" style="margin-bottom: 1px">
<h5 class="card-title mb-0" style="font-size:25px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">Minhas propostas</h5>
<h5 class="card-title mb-0" style="font-size:15px; font-family:Arial, Helvetica, sans-serif; color:#1492E6">Resultado da busca por: <span style="font-style: italic; font-weight:bold">{{$busca}}</span></h5>
</div>
@endif
</div>
<div style="margin-top: -2rem">
<div class="form-group">
<div style="margin-top:30px;">
<form action="{{route('proponente.projetos')}}" method="get">
@csrf
<div class="btn-group">
<input type="text" class="form-control" name="buscar" placeholder="Pesquisar propostas" value="{{$busca}}" style="margin-right: 5px;border-radius:8px; border-color:#dcdcdc;">
<button type="submit" class="btn btn-light shadow-sm" style="border-radius: 8px; margin-right:3px"><img src="{{asset('img/icons/logo_lupa.png')}}" alt="" width="20px"></button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="card-body" >
@if(count($projetos)>0)
<table class="table table-bordered table-hover" style="display: block; overflow-x: visible; white-space: nowrap; border-radius:10px; margin-bottom:0px">
<thead>
<tr>
<th scope="col">Edital</th>
<th scope="col" style="width: 100%;">Projeto</th>
<th scope="col" style="text-align: center">Data de Criação</th>
<th scope="col" style="text-align: center">Status</th>
<th scope="col">Opção</th>
</tr>
</thead>
<tbody id="projetos">
@foreach ($projetos as $projeto)
@if ($projeto->proponente_id === Auth()->user()->proponentes->id)
<tr>
<td>
{{ $projeto->evento->nome }}
</td>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">
{{ $projeto->titulo }}
</td>
<td style="text-align: center">{{ date('d-m-Y \à\s H:i\h', strtotime($projeto->updated_at)) }}</td>
@if($projeto->status !=null)
<td style="color: rgb(6, 85, 6); text-align: center;text-transform: capitalize;">{{$projeto->status}}</td>
@else
<td style="color: rgb(0, 0, 0); text-align: center">Submetido</td>
@endif
<td>
<div class="dropright dropdown-options" style="width: 100%; text-align:center; float:none">
<a id="options" class="dropdown-toggle btn btn-light" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px">
</a>
<div class="dropdown-menu">
@if($hoje <= $projeto->evento->inicioProjeto)
<a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;">
Editar
</a>
<hr class="dropdown-hr">
@endif
@if( $projeto->status== 'aprovado')
<a href="{{route('trabalho.trocaParticipante', ['evento_id' => $projeto->evento->id, 'projeto_id' => $projeto->id])}}" class="dropdown-item" style="text-align: center;">
Solicitar Substituições
</a>
<hr class="dropdown-hr">
{{--<hr class="dropdown-hr">
<a href="" class="dropdown-item" style="text-align: center">
Solicitar Certificado
</a>--}}
@endif
<a href="{{route('docComplementar.listar', ['projeto_id' => $projeto->id])}}" class="dropdown-item" style="text-align: center">
Documentos Complementares
</a>
<hr class="dropdown-hr">
@if($projeto->status != 'rascunho')
<a href="{{ route('trabalho.show', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center">
Visualizar
</a>
@endif
<hr class="dropdown-hr">
<a href="{{route('planos.listar', ['id' => $projeto->id])}}" class="dropdown-item" style="text-align: center">
Relatórios
</a>
{{-- <a href="" class="dropdown-item" style="text-align: center">
Recorrer
</a>
--}}
<!-- Button trigger modal -->
@if(($projeto->status == "rascunho") || ($projeto->evento->fimSubmissao > $hoje))
<div class="container">
<div class="row">
<div class="col text-center" style="margin-left: 20px">
<button type="button" class="dropdown-item dropdown-item-delete" data-toggle="modal" data-target="#modal{{$projeto->id}}" style="text-align: center">
<img src="{{asset('img/icons/logo_lixeira.png')}}" alt=""> Deletar
</button>
</div>
</div>
</div>
@endif
</div>
</div>
</td>
</tr>
@endif
<!-- Modal deletar -->
<div class="modal fade" id="modal{{$projeto->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Deletar projeto</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Você tem certeza que deseja deletar o projeto: {{ $projeto->titulo }}?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancelar</button>
<a href="{{ route('trabalho.destroy', ['id' => $projeto->id]) }}" class="btn btn-primary" style="text-align: center">
Deletar
</a>
</div>
</div>
</div>
</div>
@endforeach
</tbody>
</table>
@else
@if($flag == "true")
<div class="form-row justify-content-center" style="margin-top: 5rem; margin-bottom:9rem;">
<div class="col-md-12" style="text-align: center; margin-bottom:20px">
<img src="{{asset('img/icons/logo_projeto.png')}}" style="width:200px">
</div>
<div class="col-md-12" style="text-align: center; color:#909090">
<h5>Nenhuma proposta encontrada!</h5>
</div>
<div class="col-md-12" style="text-align: center;">
</div>
</div>
@else
<div class="form-row justify-content-center" style="margin-top: 5rem; margin-bottom:9rem;">
<div class="col-md-12" style="text-align: center; margin-bottom:20px">
<img src="{{asset('img/icons/logo_projeto.png')}}" style="width:200px">
</div>
<div class="col-md-12" style="text-align: center; color:#909090">
<h5>Nenhuma proposta submetida!</h5>
</div>
<div class="col-md-12" style="text-align: center;">
</div>
</div>
@endif
@endif
</div>
<div class="col-md-12" style="padding-left: 20px">
{{ $projetos->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script>
</script>
@endsection