Commit cada97fa authored by Gabriel-31415's avatar Gabriel-31415
Browse files

status

parent 6d31a6a9
......@@ -38,11 +38,7 @@ use App\OutrasInfoParticipante;
class TrabalhoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index($id)
{
$edital = Evento::find($id);
......@@ -67,23 +63,7 @@ class TrabalhoController extends Controller
'enum_turno' => Participante::ENUM_TURNO
]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request){
$mytime = Carbon::now('America/Recife');
......@@ -496,12 +476,7 @@ class TrabalhoController extends Controller
return $trabalho;
}
/**
* Display the specified resource.
*
* @param \App\Trabalho $trabalho
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
......@@ -528,12 +503,6 @@ class TrabalhoController extends Controller
'arquivos' => $arquivos,]);
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Trabalho $trabalho
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$projeto = Trabalho::find($id);
......@@ -560,13 +529,6 @@ class TrabalhoController extends Controller
]);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Trabalho $trabalho
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$mytime = Carbon::now('America/Recife');
......@@ -796,12 +758,6 @@ class TrabalhoController extends Controller
return redirect()->route('evento.visualizar',['id'=>$request->editalId]);
}
/**
* Remove the specified resource from storage.
*
* @param \App\Trabalho $trabalho
* @return \Illuminate\Http\Response
*/
public function destroy(Request $request)
{
$projeto = Trabalho::find($request->id);
......@@ -1050,7 +1006,7 @@ class TrabalhoController extends Controller
public function salvar(Request $request) {
$edital = Evento::find($request->editalId);
$hoje = now();
// dd();
if (!($edital->inicioSubmissao < $hoje && $edital->fimSubmissao >= $hoje)) {
return redirect()->route('inicial')->with(['error'=> 0, 'mensagem' => 'As submissões para o edital '. $edital->titulo .' foram encerradas.']);
}
......@@ -1089,7 +1045,7 @@ class TrabalhoController extends Controller
$projeto->linkLattesEstudante = $request->linkLattesEstudante;
$projeto->data = $hoje;
$projeto->evento_id = $request->editalId;
$projeto->status = 'Submetido';
$projeto->status = 'submetido';
$projeto->proponente_id = $proponente->id;
// Salvando anexos no storage
......
......@@ -9,11 +9,7 @@ class Trabalho extends Model
{
use SoftDeletes;
/**
* The attributes that are mass assignable.
*
* @var array
*/
// 'rascunho','submetido', 'avaliado', 'corrigido','aprovado','reprovado', 'arquivado'
protected $fillable = [
'titulo',
'data',
......
......@@ -15,13 +15,13 @@ class CreateTrabalhosTable extends Migration
{
Schema::create('trabalhos', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('titulo');
$table->string('status')->nullable();
$table->string('titulo')->nullable();
$table->string('aprovado')->nullable();
$table->string('linkGrupoPesquisa');
$table->string('linkLattesEstudante');
$table->string('pontuacaoPlanilha');
$table->string('linkGrupoPesquisa')->nullable();
$table->string('linkLattesEstudante')->nullable();
$table->string('pontuacaoPlanilha')->nullable();
$table->date('data')->nullable();
$table->enum('status',['rascunho','submetido', 'avaliado', 'corrigido','aprovado','reprovado', 'arquivado'])->default('rascunho')->nullable();
//Anexos
$table->string('anexoProjeto')->nullable();
$table->string('anexoDecisaoCONSU')->nullable();
......@@ -31,12 +31,12 @@ class CreateTrabalhosTable extends Migration
$table->string('anexoAutorizacaoComiteEtica')->nullable();
$table->string('justificativaAutorizacaoEtica')->nullable();
//chaves estrangeiras
$table->unsignedBigInteger('grande_area_id');
$table->unsignedBigInteger('area_id');
$table->unsignedBigInteger('sub_area_id');
$table->unsignedBigInteger('evento_id');
$table->unsignedBigInteger('coordenador_id');
$table->unsignedBigInteger('proponente_id');
$table->unsignedBigInteger('grande_area_id')->nullable();
$table->unsignedBigInteger('area_id')->nullable();
$table->unsignedBigInteger('sub_area_id')->nullable();
$table->unsignedBigInteger('evento_id')->nullable();
$table->unsignedBigInteger('coordenador_id')->nullable();
$table->unsignedBigInteger('proponente_id')->nullable();
$table->softDeletes();
$table->timestamps();
......
......@@ -178,7 +178,7 @@
</div>
<div class="form-group col-md-6" style="margin-top: 10px">
<label for="anexoLattesCoordenador" class="col-form-label">{{ __('Anexo do currículo Lattes do Coordenador') }} <span style="color: red; font-weight:bold">*</span></label>
<label for="anexoLattesCoordenador" class="col-form-label">{{ __('Anexo do currículo Lattes do Proponente') }} <span style="color: red; font-weight:bold">*</span></label>
@if(old('anexoLattesPreenchido') != null || (isset($rascunho) && $rascunho->anexoLattesCoordenador != ""))
<a id="anexoLattesTemp" href="{{ route('baixar.anexo.temp', ['eventoId' => $edital->id,
'nomeAnexo' => 'anexoLattesCoordenador' ])}}">Arquivo atual</a>
......@@ -1138,9 +1138,10 @@
</div>
<div class=" d-flex justify-content-between align-items-center" style="margin-top: 15px; margin-bottom:18px">
<h6 style="font-family:Arial, Helvetica, sans-serif; margin-right:15px"><span style="color: red; font-weight:bold">*</span> Campos obrigatórios</h6>
<input id="rascunhoInput" type="hidden" name="rascunho" value="false">
<button type="button" class="btn btn-primary" id="formRascunho" onclick="rascunho()" >{{ __('Rascunho') }}</button>
<button type="submit" id="clickSubmitForm" style="display: none"></button>
<button type="button" class="btn btn-success" id="idButtonSubmitProjeto" onclick="enviarModalenviarProjeto()" disabled>{{ __('Enviar Projeto') }}</button>
<button type="button" class="btn btn-success" id="idButtonSubmitProjeto" onclick="enviarModalenviarProjeto()" disabled>{{ __('Enviar Proposta') }}</button>
</div>
</div>
</div>
......@@ -1195,6 +1196,7 @@
</div>
</div>
</div>
@endsection
@section('javascript')
......@@ -1992,8 +1994,25 @@ function validarPart3(){
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
$(document).ready(()=>{
function rascunho(){
$("input").removeAttr('required')
$("select").removeAttr('required')
$("textarea").removeAttr('required')
// $('#criarProjetoForm').append("<li>Appended item</li>");
$('#rascunhoInput').val('true');
$('#criarProjetoForm').submit();
}
});
// $("#button").click(function(e){
// e.preventDefault();
......
......@@ -94,7 +94,7 @@
</div>
<div class="row margin">
<div class="col-sm-12 info-evento">
<h4>Submissão de Projetos</h4>
<h4>Submissão de Propostas</h4>
<p>
<img class="" src="{{asset('img/icons/calendar-evento.svg')}}" alt="">
{{date('d/m/Y',strtotime($evento->inicioSubmissao))}} - {{date('d/m/Y',strtotime($evento->fimSubmissao))}}
......@@ -104,7 +104,7 @@
<div class="row margin">
<div class="col-sm-12 info-evento">
<h4>Avaliação de Projetos</h4>
<h4>Avaliação de Propostas</h4>
<p>
<img class="" src="{{asset('img/icons/calendar-evento.svg')}}" alt="">
{{date('d/m/Y',strtotime($evento->inicioRevisao))}} - {{date('d/m/Y',strtotime($evento->fimRevisao))}}
......@@ -313,7 +313,7 @@
@if($evento->inicioSubmissao <= $mytime)
@if($mytime < $evento->fimSubmissao)
<div class="col-md-6 botao-form-right" style="">
<a class="btn btn-primary botao-form" href="{{route('trabalho.index',['id'=>$evento->id])}}" style="width:100%">Submeter Projeto</a>
<a class="btn btn-primary botao-form" href="{{route('trabalho.index',['id'=>$evento->id])}}" style="width:100%">Submeter Proposta</a>
</div>
@endif
@endif
......
......@@ -161,9 +161,9 @@
<a href="{{ route('register') }}" class="btn navbar-text btn-azul-destaque negrito" style="color: rgb(0, 140, 255);">{{ __('Cadastre-se') }}</a>
@else
@if(Auth::user()->administradors != null)
<a href="{{route('admin.editais')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);">Home</a>
<a href="{{route('admin.editais')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);">Editais</a>
@else
<a href="{{route('coord.home')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);">Home</a>
<a href="{{route('coord.home')}}" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);">Editais</a>
@endif
<a id="navbarDropdown" class="btn navbar-text negrito dropdown-toggle" style="color: rgb(0, 140, 255);" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
{{ Auth::user()->name }} <span class="caret"></span>
......
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