diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index 7d9c5388dc79e8743b48627873bf8a6e6617b06e..b0d957fdcb2268eefa6208657d3cfc073fdf7255 100644 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -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 ]); } - /** - * 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($request->all()); 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 diff --git a/app/Notifications/recuperacaoSenha.php b/app/Notifications/recuperacaoSenha.php index 91ae1d77eb1a9924b3a3efac01ffe2f6ddcd7c42..191031147de868669aba2baa6e5cc6a35540a2d1 100644 --- a/app/Notifications/recuperacaoSenha.php +++ b/app/Notifications/recuperacaoSenha.php @@ -42,7 +42,7 @@ class recuperacaoSenha extends Notification { return (new MailMessage) ->subject('Recuperação de senha') - ->greeting('Olá;!') + ->greeting('Olá!') ->line('Você está recebendo este e-mail porque nós recebemos uma requisição de redefinição de senha para sua conta.') ->action('REDEFINIR SENHA', route('password.reset', $this->token)) ->line('Se não foi você que solicitou esta recuperação, apenas ignore este e-mail.') diff --git a/app/Trabalho.php b/app/Trabalho.php index f086f18f624612e54f87a7a08370dc4e5ac41702..e21725143fc1a7f2a2886ad7f17f197865219f6c 100644 --- a/app/Trabalho.php +++ b/app/Trabalho.php @@ -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', diff --git a/database/migrations/2020_02_05_123048_create_trabalhos_table.php b/database/migrations/2020_02_05_123048_create_trabalhos_table.php index 61e12ef4ac649d24301a13d44f7924b927e26e05..391373d2f66fdca16dcfde9b73b2941d0bff00be 100644 --- a/database/migrations/2020_02_05_123048_create_trabalhos_table.php +++ b/database/migrations/2020_02_05_123048_create_trabalhos_table.php @@ -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')->nullable(); - $table->string('linkLattesEstudante'); - $table->string('pontuacaoPlanilha'); + $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('grande_area_id')->nullable(); + $table->unsignedBigInteger('area_id')->nullable(); $table->unsignedBigInteger('sub_area_id')->nullable(); - $table->unsignedBigInteger('evento_id'); - $table->unsignedBigInteger('coordenador_id'); - $table->unsignedBigInteger('proponente_id'); + $table->unsignedBigInteger('evento_id')->nullable(); + $table->unsignedBigInteger('coordenador_id')->nullable(); + $table->unsignedBigInteger('proponente_id')->nullable(); $table->softDeletes(); $table->timestamps(); diff --git a/database/migrations/2020_02_05_123217_create_enderecos_table.php b/database/migrations/2020_02_05_123217_create_enderecos_table.php index 1b07779c6eca349f52382633ea6b8c62e3f10663..df57efdc703db1721026b64be33d1fab5c0a2c56 100644 --- a/database/migrations/2020_02_05_123217_create_enderecos_table.php +++ b/database/migrations/2020_02_05_123217_create_enderecos_table.php @@ -16,12 +16,12 @@ class CreateEnderecosTable extends Migration Schema::create('enderecos', function (Blueprint $table) { $table->bigIncrements('id'); $table->timestamps(); - $table->string('rua'); + $table->string('rua')->nullable(); $table->string('numero')->nullable(); - $table->string('bairro'); - $table->string('cidade'); - $table->string('uf'); - $table->string('cep'); + $table->string('bairro')->nullable(); + $table->string('cidade')->nullable(); + $table->string('uf')->nullable(); + $table->string('cep')->nullable(); $table->string('complemento')->nullable(true); }); } diff --git a/resources/views/evento/submeterTrabalho.blade.php b/resources/views/evento/submeterTrabalho.blade.php index ce1277c15afae63d2ed5607c703bb2ab30862d3b..ca254f74b1abe403522a63c86eaa5521aaaf6dd2 100644 --- a/resources/views/evento/submeterTrabalho.blade.php +++ b/resources/views/evento/submeterTrabalho.blade.php @@ -178,7 +178,7 @@
- + @if(old('anexoLattesPreenchido') != null || (isset($rascunho) && $rascunho->anexoLattesCoordenador != "")) Arquivo atual @@ -1138,9 +1138,10 @@
* Campos obrigatórios
- + + - +
@@ -1195,6 +1196,7 @@ + @endsection @section('javascript') @@ -1992,8 +1994,22 @@ function validarPart3(){ } - +