"resources/git@sites.upe.br:walter.felipe/submeta.git" did not exist on "ed5a22697fc532441dccc142cbbb1e29f6256f07"
Unverified Commit 0b855c44 authored by Gabriel Antônio da Silva's avatar Gabriel Antônio da Silva Committed by GitHub
Browse files

Merge pull request #19 from lmts-ufape/anexos

Anexos
parents 7b97025b 89078619
......@@ -237,7 +237,7 @@
<div class="row justify-content-center" style="margin: 20px 0 20px 0">
<div class="col-md-6 botao-form-left" style="">
<a class="btn btn-secondary botao-form" href="/" style="width:100%">Voltar</a>
<a class="btn btn-secondary botao-form" href="{{ route('home') }}" style="width:100%">Voltar</a>
</div>
@if($evento->inicioSubmissao <= $mytime)
......
......@@ -273,96 +273,100 @@
<div class="col-sm-12">
<div id="participantes">
@foreach($participantes as $participante)
<div id="novoParticipante">
<br>
<h5>Dados do participante</h5>
<div class="row">
<div class="col-sm-5">
<label>Nome Completo</label>
<input value="{{ $participante->user->name }}" type="text" style="margin-bottom:10px" class="form-control @error('nomeParticipante') is-invalid @enderror" name="nomeParticipante[]" placeholder="Nome" required>
@error('nomeParticipante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-4">
<label>E-mail</label>
<input value="{{ $participante->user->email }}" type="email" style="margin-bottom:10px" class="form-control @error('emailParticipante') is-invalid @enderror" name="emailParticipante[]" placeholder="email" required>
@error('emailParticipante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-3">
<label>Função:</label>
<select class="form-control @error('funcaoParticipante') is-invalid @enderror" name="funcaoParticipante[]" id="funcaoParticipante">
<option value="" disabled selected hidden>-- Função --</option>
@foreach($funcaoParticipantes as $funcaoParticipante)
@if($funcaoParticipante->id === $participante->funcao_participante_id)
<option value="{{$funcaoParticipante->id}}" selected>{{$funcaoParticipante->nome}}</option>
@else
<option value="{{$funcaoParticipante->id}}">{{$funcaoParticipante->nome}}</option>
@endif
@endforeach
@error('funcaoParticipante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</select>
</div>
</div>
<h5>Dados do plano de trabalho</h5>
@foreach ($arquivos as $arquivo)
@if($arquivo->participanteId === $participante->id)
<a href="{{ route('baixar.plano', ['id' => $arquivo->id]) }}">Plano de trabalho atual</a>
@endif
@endforeach
<div class="row">
<div class="col-sm-12">
<div id="planoTrabalho">
<div class="row">
<div class="col-sm-4">
<label>Titulo </label>
<input type="text" style="margin-bottom:10px" class="form-control @error('nomePlanoTrabalho') is-invalid @enderror" name="nomePlanoTrabalho[]" placeholder="Nome">
@error('nomePlanoTrabalho')
@foreach($users as $user)
@if($participante->user_id === $user->id)
<div id="novoParticipante">
<br>
<h5>Dados do participante</h5>
<div class="row">
<div class="col-sm-5">
<label>Nome Completo</label>
<input value="{{ $user->name }}" type="text" style="margin-bottom:10px" class="form-control @error('nomeParticipante') is-invalid @enderror" name="nomeParticipante[]" placeholder="Nome" required>
@error('nomeParticipante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-4">
<label>E-mail</label>
<input value="{{ $user->email }}" type="email" style="margin-bottom:10px" class="form-control @error('emailParticipante') is-invalid @enderror" name="emailParticipante[]" placeholder="email" required>
@error('emailParticipante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-3">
<label>Função:</label>
<select class="form-control @error('funcaoParticipante') is-invalid @enderror" name="funcaoParticipante[]" id="funcaoParticipante">
<option value="" disabled selected hidden>-- Função --</option>
@foreach($funcaoParticipantes as $funcaoParticipante)
@if($funcaoParticipante->id === $participante->funcao_participante_id)
<option value="{{$funcaoParticipante->id}}" selected>{{$funcaoParticipante->nome}}</option>
@else
<option value="{{$funcaoParticipante->id}}">{{$funcaoParticipante->nome}}</option>
@endif
@endforeach
@error('funcaoParticipante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
{{-- Arquivo --}}
<div class="col-sm-7">
<label for="nomeTrabalho">Anexo</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="anexoPlanoTrabalho">Selecione um arquivo:</span>
</select>
</div>
</div>
<h5>Dados do plano de trabalho</h5>
@foreach ($arquivos as $arquivo)
@if($arquivo->participanteId === $participante->id)
<a href="{{ route('baixar.plano', ['id' => $arquivo->id]) }}">Plano de trabalho atual</a>
@endif
@endforeach
<div class="row">
<div class="col-sm-12">
<div id="planoTrabalho">
<div class="row">
<div class="col-sm-4">
<label>Titulo </label>
<input type="text" style="margin-bottom:10px" class="form-control @error('nomePlanoTrabalho') is-invalid @enderror" name="nomePlanoTrabalho[]" placeholder="Nome">
@error('nomePlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
{{-- Arquivo --}}
<div class="col-sm-7">
<label for="nomeTrabalho">Anexo</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="anexoPlanoTrabalho">Selecione um arquivo:</span>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror" id="anexoPlanoTrabalho" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]">
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
@error('anexoPlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanoTrabalho') is-invalid @enderror" id="anexoPlanoTrabalho" aria-describedby="anexoPlanoTrabalho" name="anexoPlanoTrabalho[]">
<label class="custom-file-label" id="custom-file-label" for="inputGroupFile01">O arquivo deve ser no formato PDF de até 2mb.</label>
<div class="col-sm-1">
<a class="delete">
<img src="/img/icons/user-times-solid.svg" style="width:25px;margin-top:35px">
</a>
</div>
</div>
@error('anexoPlanoTrabalho')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-1">
<a class="delete">
<img src="/img/icons/user-times-solid.svg" style="width:25px;margin-top:35px">
</a>
</div>
</div>
</div>
</div>
</div>
</div>
@endif
@endforeach
@endforeach
</div>
<a href="#" class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Participantes +</a>
......@@ -419,7 +423,7 @@
addModalidade($(this).val());
});
$(document).on('click', '.delete', function() {
if (qtdParticipantes > 2) {
if (qtdParticipantes > 1) {
qtdParticipantes--;
$(this).closest('#novoParticipante').remove();
return false;
......
......@@ -35,9 +35,9 @@
<td>
{{ $projeto->titulo }}
</td>
@if($projeto->avaliado)
@if($projeto->status == 'Avaliado')
<td style="color: rgb(6, 85, 6)">Avaliado</td>
@else
@elseif($projeto->status == 'Submetido')
<td style="color: rgb(0, 0, 0)">Submetido</td>
@endif
<td>{{ date('d-m-Y', strtotime($projeto->updated_at)) }}</td>
......@@ -59,6 +59,12 @@
<a href="" class="dropdown-item" style="text-align: center">
Resultado
</a>
@if($projeto->status == 'Submetido')
<a href="{{ route('trabalho.destroy', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center">
Excluir projeto
</a>
@endif
</div>
</div>
</td>
......
......@@ -21,11 +21,11 @@ Auth::routes(['verify' => true]);
//######## Rotas Avaliador ####################################
Route::prefix('avaliador')->name('avaliador.')->group(function(){
Route::get('/index', 'AvaliadorController@index' )->name('index');
Route::get('/trabalhos', 'AvaliadorController@visualizarTrabalhos' )->name('visualizarTrabalho');
Route::post('/parecer', 'AvaliadorController@parecer' )->name('parecer');
Route::get('/editais', 'AvaliadorController@editais' )->name('editais');
Route::post('/Enviarparecer', 'AvaliadorController@enviarParecer' )->name('enviarParecer');
Route::get('/index', 'AvaliadorController@index' )->name('index');
Route::get('/trabalhos', 'AvaliadorController@visualizarTrabalhos' )->name('visualizarTrabalho');
Route::post('/parecer', 'AvaliadorController@parecer' )->name('parecer');
Route::get('/editais', 'AvaliadorController@editais' )->name('editais');
Route::post('/Enviarparecer', 'AvaliadorController@enviarParecer' )->name('enviarParecer');
});
//######### Proponente ########################################
......@@ -87,12 +87,13 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route::post( '/areaModalidade/criar', 'AreaModalidadeController@store' )->name('areaModalidade.store');
//######### Trabalho ########################################
Route::get( '/trabalho/submeter/{id}','TrabalhoController@index' )->name('trabalho.index');
Route::post( '/trabalho/novaVersao', 'TrabalhoController@novaVersao' )->name('trabalho.novaVersao');
Route::post( '/trabalho/criar', 'TrabalhoController@store' )->name('trabalho.store');
Route::get( '/edital/{id}/projetos', 'TrabalhoController@projetosDoEdital' )->name('projetos.edital');
Route::get( '/projeto/{id}/editar', 'TrabalhoController@edit' )->name('trabalho.editar');
Route::post( '/projeto/{id}/atualizar', 'TrabalhoController@update' )->name('trabalho.update');
Route::get( '/trabalho/submeter/{id}', 'TrabalhoController@index' )->name('trabalho.index');
Route::post( '/trabalho/novaVersao', 'TrabalhoController@novaVersao' )->name('trabalho.novaVersao');
Route::post( '/trabalho/criar', 'TrabalhoController@store' )->name('trabalho.store');
Route::get( '/edital/{id}/projetos', 'TrabalhoController@projetosDoEdital' )->name('projetos.edital');
Route::get( '/projeto/{id}/editar', 'TrabalhoController@edit' )->name('trabalho.editar');
Route::post( '/projeto/{id}/atualizar', 'TrabalhoController@update' )->name('trabalho.update');
Route::get( '/projeto/{id}/excluir', 'TrabalhoController@destroy' )->name('trabalho.destroy');
//######### Atribuição #######################################
Route::get( '/atribuir', 'AtribuicaoController@distribuicaoAutomatica' )->name('distribuicao');
......
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