Commit 6afb8fb7 authored by Gabriel-31415's avatar Gabriel-31415
Browse files

conflict resolved

parents b2538c9c ff70569f
# EventosCientificos_ModuloTrabalhos
<a href="http://app.uag.ufrpe.br/submeta/" target="_blank"><img src="http://app.uag.ufrpe.br/submeta/img/icons/logo_submeta_pemenor.png"><a>
......@@ -33,6 +33,7 @@ use App\Mail\SubmissaoTrabalho;
use App\Mail\EventoCriado;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use App\OutrasInfoParticipante;
class TrabalhoController extends Controller
{
......@@ -45,7 +46,7 @@ class TrabalhoController extends Controller
{
$edital = Evento::find($id);
$grandeAreas = GrandeArea::orderBy('nome')->get();
$funcaoParticipantes = FuncaoParticipantes::all();
$funcaoParticipantes = FuncaoParticipantes::orderBy('nome')->get();
$proponente = Proponente::where('user_id', Auth::user()->id)->first();
if($proponente == null){
......@@ -61,7 +62,8 @@ class TrabalhoController extends Controller
'edital' => $edital,
'grandeAreas' => $grandeAreas,
'funcaoParticipantes'=> $funcaoParticipantes,
'rascunho' => $rascunho
'rascunho' => $rascunho,
'enum_turno' => OutrasInfoParticipante::ENUM_TURNO
]);
}
......@@ -82,7 +84,7 @@ class TrabalhoController extends Controller
* @return \Illuminate\Http\Response
*/
public function store(Request $request){
// dd($request->all());
dd($request);
$mytime = Carbon::now('America/Recife');
$mytime = $mytime->toDateString();
$evento = Evento::find($request->editalId);
......@@ -128,7 +130,7 @@ class TrabalhoController extends Controller
'anexoComiteEtica' => [($request->anexoComitePreenchido!=='sim'&&$request->anexoJustificativaPreenchido!=='sim'?'required_without:justificativaAutorizacaoEtica':''), 'file', 'mimes:pdf', 'max:2048'],
'justificativaAutorizacaoEtica' => [($request->anexoJustificativaPreenchido!=='sim'&&$request->anexoComitePreenchido!=='sim'?'required_without:anexoComiteEtica':''), 'file', 'mimes:pdf', 'max:2048'],
'anexoLattesCoordenador' => [($request->anexoLattesPreenchido!=='sim'?'required': ''), 'file', 'mimes:pdf', 'max:2048'],
'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf,xls,xlsx', 'max:2048'],
'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:xls,xlsx,ods', 'max:2048'],
'anexoPlanoTrabalho.*' => ['nullable', 'file', 'mimes:pdf', 'max:2048'],
]);
......@@ -175,7 +177,7 @@ class TrabalhoController extends Controller
'nomePlanoTrabalho.*' => ['nullable', 'string'],
'anexoProjeto' => [($request->anexoProjetoPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'],
'anexoLattesCoordenador' => [($request->anexoLattesPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'],
'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf,xls,xlsx', 'max:2048'],
'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:xls,xlsx,ods', 'max:2048'],
'anexoPlanoTrabalho.*' => ['nullable', 'file', 'mimes:pdf', 'max:2048'],
]);
......
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class OutrasInfoParticipante extends Model
{
protected $fillable = ['name', 'user_id', 'trabalho_id', 'participante_id'];
public const ENUM_TURNO = ['Matutino', 'Vespertino', 'Noturno', 'Integral'];
}
......@@ -636,16 +636,16 @@
},
{
"name": "laravel/framework",
"version": "v6.20.24",
"version": "v6.20.26",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "addc44fce390c783b2dee0d617300dce97e895f4"
"reference": "0117d797dc1ab64b1f88d4f6b966380ea7def091"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/addc44fce390c783b2dee0d617300dce97e895f4",
"reference": "addc44fce390c783b2dee0d617300dce97e895f4",
"url": "https://api.github.com/repos/laravel/framework/zipball/0117d797dc1ab64b1f88d4f6b966380ea7def091",
"reference": "0117d797dc1ab64b1f88d4f6b966380ea7def091",
"shasum": ""
},
"require": {
......@@ -785,7 +785,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-04-20T13:46:19+00:00"
"time": "2021-04-28T14:38:32+00:00"
},
{
"name": "laravel/tinker",
......@@ -911,16 +911,16 @@
},
{
"name": "league/commonmark",
"version": "1.5.8",
"version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf"
"reference": "19a9673b833cc37770439097b381d86cd125bfe8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf",
"reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/19a9673b833cc37770439097b381d86cd125bfe8",
"reference": "19a9673b833cc37770439097b381d86cd125bfe8",
"shasum": ""
},
"require": {
......@@ -1008,7 +1008,7 @@
"type": "tidelift"
}
],
"time": "2021-03-28T18:51:39+00:00"
"time": "2021-05-01T19:00:49+00:00"
},
{
"name": "league/flysystem",
......@@ -1259,16 +1259,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.46.0",
"version": "2.47.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4"
"reference": "606262fd8888b75317ba9461825a24fc34001e1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4",
"reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/606262fd8888b75317ba9461825a24fc34001e1e",
"reference": "606262fd8888b75317ba9461825a24fc34001e1e",
"shasum": ""
},
"require": {
......@@ -1348,20 +1348,20 @@
"type": "tidelift"
}
],
"time": "2021-02-24T17:30:44+00:00"
"time": "2021-04-13T21:54:02+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.10.4",
"version": "v4.10.5",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f",
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f",
"shasum": ""
},
"require": {
......@@ -1402,9 +1402,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5"
},
"time": "2020-12-20T10:01:03+00:00"
"time": "2021-05-03T19:11:20+00:00"
},
{
"name": "opis/closure",
......@@ -1693,16 +1693,16 @@
},
{
"name": "psr/log",
"version": "1.1.3",
"version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
......@@ -1726,7 +1726,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
......@@ -1737,9 +1737,9 @@
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.3"
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
"time": "2020-03-23T09:12:05+00:00"
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "psr/simple-cache",
......@@ -2081,16 +2081,16 @@
},
{
"name": "symfony/console",
"version": "v4.4.21",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "1ba4560dbbb9fcf5ae28b61f71f49c678086cf23"
"reference": "36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/1ba4560dbbb9fcf5ae28b61f71f49c678086cf23",
"reference": "1ba4560dbbb9fcf5ae28b61f71f49c678086cf23",
"url": "https://api.github.com/repos/symfony/console/zipball/36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625",
"reference": "36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625",
"shasum": ""
},
"require": {
......@@ -2150,7 +2150,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/console/tree/v4.4.21"
"source": "https://github.com/symfony/console/tree/v4.4.22"
},
"funding": [
{
......@@ -2166,20 +2166,20 @@
"type": "tidelift"
}
],
"time": "2021-03-26T09:23:24+00:00"
"time": "2021-04-16T17:32:19+00:00"
},
{
"name": "symfony/css-selector",
"version": "v5.2.4",
"version": "v5.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "f65f217b3314504a1ec99c2d6ef69016bb13490f"
"reference": "59a684f5ac454f066ecbe6daecce6719aed283fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/f65f217b3314504a1ec99c2d6ef69016bb13490f",
"reference": "f65f217b3314504a1ec99c2d6ef69016bb13490f",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/59a684f5ac454f066ecbe6daecce6719aed283fb",
"reference": "59a684f5ac454f066ecbe6daecce6719aed283fb",
"shasum": ""
},
"require": {
......@@ -2215,7 +2215,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/css-selector/tree/v5.2.4"
"source": "https://github.com/symfony/css-selector/tree/v5.3.0-BETA1"
},
"funding": [
{
......@@ -2231,20 +2231,20 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:01:46+00:00"
"time": "2021-04-07T16:07:52+00:00"
},
{
"name": "symfony/debug",
"version": "v4.4.20",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "157bbec4fd773bae53c5483c50951a5530a2cc16"
"reference": "45b2136377cca5f10af858968d6079a482bca473"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/157bbec4fd773bae53c5483c50951a5530a2cc16",
"reference": "157bbec4fd773bae53c5483c50951a5530a2cc16",
"url": "https://api.github.com/repos/symfony/debug/zipball/45b2136377cca5f10af858968d6079a482bca473",
"reference": "45b2136377cca5f10af858968d6079a482bca473",
"shasum": ""
},
"require": {
......@@ -2284,7 +2284,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/debug/tree/v4.4.20"
"source": "https://github.com/symfony/debug/tree/v4.4.22"
},
"funding": [
{
......@@ -2300,7 +2300,7 @@
"type": "tidelift"
}
],
"time": "2021-01-28T16:54:48+00:00"
"time": "2021-04-02T07:50:12+00:00"
},
{
"name": "symfony/deprecation-contracts",
......@@ -2371,16 +2371,16 @@
},
{
"name": "symfony/error-handler",
"version": "v4.4.21",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "48e81a375525872e788c2418430f54150d935810"
"reference": "76603a8df8e001436df80758eb03a8baa5324175"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/48e81a375525872e788c2418430f54150d935810",
"reference": "48e81a375525872e788c2418430f54150d935810",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/76603a8df8e001436df80758eb03a8baa5324175",
"reference": "76603a8df8e001436df80758eb03a8baa5324175",
"shasum": ""
},
"require": {
......@@ -2420,7 +2420,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/error-handler/tree/v4.4.21"
"source": "https://github.com/symfony/error-handler/tree/v4.4.22"
},
"funding": [
{
......@@ -2436,7 +2436,7 @@
"type": "tidelift"
}
],
"time": "2021-03-08T10:28:40+00:00"
"time": "2021-04-02T07:50:12+00:00"
},
{
"name": "symfony/event-dispatcher",
......@@ -2741,16 +2741,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v4.4.20",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "02d968647fe61b2f419a8dc70c468a9d30a48d3a"
"reference": "1a6f87ef99d05b1bf5c865b4ef7992263e1cb081"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/02d968647fe61b2f419a8dc70c468a9d30a48d3a",
"reference": "02d968647fe61b2f419a8dc70c468a9d30a48d3a",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/1a6f87ef99d05b1bf5c865b4ef7992263e1cb081",
"reference": "1a6f87ef99d05b1bf5c865b4ef7992263e1cb081",
"shasum": ""
},
"require": {
......@@ -2789,7 +2789,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v4.4.20"
"source": "https://github.com/symfony/http-foundation/tree/v4.4.22"
},
"funding": [
{
......@@ -2805,20 +2805,20 @@
"type": "tidelift"
}
],
"time": "2021-02-25T17:11:33+00:00"
"time": "2021-04-30T12:05:50+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v4.4.21",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "0248214120d00c5f44f1cd5d9ad65f0b38459333"
"reference": "cd2e325fc34a4a5bbec91eecf69dda8ee8c5ea4f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/0248214120d00c5f44f1cd5d9ad65f0b38459333",
"reference": "0248214120d00c5f44f1cd5d9ad65f0b38459333",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/cd2e325fc34a4a5bbec91eecf69dda8ee8c5ea4f",
"reference": "cd2e325fc34a4a5bbec91eecf69dda8ee8c5ea4f",
"shasum": ""
},
"require": {
......@@ -2893,7 +2893,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v4.4.21"
"source": "https://github.com/symfony/http-kernel/tree/v4.4.22"
},
"funding": [
{
......@@ -2909,20 +2909,20 @@
"type": "tidelift"
}
],
"time": "2021-03-29T05:11:04+00:00"
"time": "2021-05-01T14:38:48+00:00"
},
{
"name": "symfony/mime",
"version": "v5.2.6",
"version": "v5.2.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
"reference": "1b2092244374cbe48ae733673f2ca0818b37197b"
"reference": "7af452bf51c46f18da00feb32e1ad36db9426515"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/1b2092244374cbe48ae733673f2ca0818b37197b",
"reference": "1b2092244374cbe48ae733673f2ca0818b37197b",
"url": "https://api.github.com/repos/symfony/mime/zipball/7af452bf51c46f18da00feb32e1ad36db9426515",
"reference": "7af452bf51c46f18da00feb32e1ad36db9426515",
"shasum": ""
},
"require": {
......@@ -2976,7 +2976,7 @@
"mime-type"
],
"support": {
"source": "https://github.com/symfony/mime/tree/v5.2.6"
"source": "https://github.com/symfony/mime/tree/v5.2.7"
},
"funding": [
{
......@@ -2992,7 +2992,7 @@
"type": "tidelift"
}
],
"time": "2021-03-12T13:18:39+00:00"
"time": "2021-04-29T20:47:09+00:00"
},
{
"name": "symfony/polyfill-ctype",
......@@ -3644,16 +3644,16 @@
},
{
"name": "symfony/process",
"version": "v4.4.20",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a"
"reference": "f5481b22729d465acb1cea3455fc04ce84b0148b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/7e950b6366d4da90292c2e7fa820b3c1842b965a",
"reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a",
"url": "https://api.github.com/repos/symfony/process/zipball/f5481b22729d465acb1cea3455fc04ce84b0148b",
"reference": "f5481b22729d465acb1cea3455fc04ce84b0148b",
"shasum": ""
},
"require": {
......@@ -3685,7 +3685,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v4.4.20"
"source": "https://github.com/symfony/process/tree/v4.4.22"
},
"funding": [
{
......@@ -3701,20 +3701,20 @@
"type": "tidelift"
}
],
"time": "2021-01-27T09:09:26+00:00"
"time": "2021-04-07T16:22:29+00:00"
},
{
"name": "symfony/routing",
"version": "v4.4.20",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "69919991c845b34626664ddc9b3aef9d09d2a5df"
"reference": "049e7c5c41f98511959668791b4adc0898a821b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/69919991c845b34626664ddc9b3aef9d09d2a5df",
"reference": "69919991c845b34626664ddc9b3aef9d09d2a5df",
"url": "https://api.github.com/repos/symfony/routing/zipball/049e7c5c41f98511959668791b4adc0898a821b3",
"reference": "049e7c5c41f98511959668791b4adc0898a821b3",
"shasum": ""
},
"require": {
......@@ -3773,7 +3773,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v4.4.20"
"source": "https://github.com/symfony/routing/tree/v4.4.22"
},
"funding": [
{
......@@ -3789,7 +3789,7 @@
"type": "tidelift"
}
],
"time": "2021-02-22T15:37:04+00:00"
"time": "2021-04-11T12:59:39+00:00"
},
{
"name": "symfony/service-contracts",
......@@ -4038,16 +4038,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v4.4.21",
"version": "v4.4.22",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806"
"reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806",
"reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
"reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
"shasum": ""
},
"require": {
......@@ -4107,7 +4107,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v4.4.21"
"source": "https://github.com/symfony/var-dumper/tree/v4.4.22"
},
"funding": [
{
......@@ -4123,7 +4123,7 @@
"type": "tidelift"
}
],
"time": "2021-03-27T19:49:03+00:00"
"time": "2021-04-19T13:36:17+00:00"
},
{
"name": "thiagocfn/inscricaoestadual",
......@@ -4373,16 +4373,16 @@
},
{
"name": "facade/flare-client-php",
"version": "1.7.0",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/facade/flare-client-php.git",
"reference": "6bf380035890cb0a09b9628c491ae3866b858522"
"reference": "69742118c037f34ee1ef86dc605be4a105d9e984"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/6bf380035890cb0a09b9628c491ae3866b858522",
"reference": "6bf380035890cb0a09b9628c491ae3866b858522",
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/69742118c037f34ee1ef86dc605be4a105d9e984",
"reference": "69742118c037f34ee1ef86dc605be4a105d9e984",
"shasum": ""
},
"require": {
......@@ -4426,7 +4426,7 @@
],
"support": {
"issues": "https://github.com/facade/flare-client-php/issues",
"source": "https://github.com/facade/flare-client-php/tree/1.7.0"
"source": "https://github.com/facade/flare-client-php/tree/1.8.0"
},
"funding": [
{
......@@ -4434,7 +4434,7 @@
"type": "github"
}
],
"time": "2021-04-12T09:30:36+00:00"
"time": "2021-04-30T11:11:50+00:00"
},
{
"name": "facade/ignition",
......
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\OutrasInfoParticipante;
class CreateOutrasInfoParticipantesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('outras_info_participantes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string("rg");
$table->date("data_de_nascimento");
$table->string("curso");
$table->enum("turno", OutrasInfoParticipante::ENUM_TURNO)->nullable(true);
$table->integer("ordem_prioridade")->nullable(true);
$table->string("periodo_atual")->nullable(true);
$table->string("total_periodos")->nullable(true);
$table->double("media_do_curso", 3, 2)->nullable(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('outras_info_participantes');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnParticipante extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('participantes', function (Blueprint $table) {
$table->unsignedBigInteger('outras_info_participante_id')->nullable(true);
$table->foreign('outras_info_participante_id')->references('id')->on('outras_info_participantes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
......@@ -34,6 +34,11 @@ class FuncaoParticipanteSeeder extends Seeder
DB::table('funcao_participantes')->insert([
'nome'=>'Voluntário',
]);
DB::table('funcao_participantes')->insert([
'nome'=>'Pesquisador',
]);
}
}
......@@ -89,13 +89,13 @@
</div>
<hr>
<h3>Coordenador</h3>
<h3>Proponente</h3>
{{-- Coordenador --}}
<div class="row justify-content-center">
<div class="col-sm-6">
<label for="nomeCoordenador" class="col-form-label">{{ __('Coordenador:') }}</label>
<label for="nomeCoordenador" class="col-form-label">{{ __('Proponente:') }}</label>
<input class="form-control" type="text" id="nomeCoordenador" name="nomeCoordenador" disabled="disabled" value="{{ Auth()->user()->name }}">
</div>
<div class="col-sm-6">
......@@ -169,7 +169,7 @@
</div>
<div class="col-sm-6">
<label for="anexoLattesCoordenador" class="col-form-label">{{ __('Anexo do Lattes do Coordenador*:') }}</label>
<label for="anexoLattesCoordenador" class="col-form-label">{{ __('Anexo do Lattes do Coordenador dos últimos 5 anos*:') }}</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>
......@@ -236,7 +236,7 @@
<div class="custom-file">
<input type="file" class="custom-file-input @error('anexoPlanilha') is-invalid @enderror" id="anexoPlanilha" aria-describedby="anexoPlanilhaDescribe" name="anexoPlanilha" onchange="exibirAnexoTemp(this)">
<label class="custom-file-label" id="custom-file-label" for="anexoPlanilha">O arquivo deve ser no formato PDF, XLS ou XLSX de até 2MB.</label>
<label class="custom-file-label" id="custom-file-label" for="anexoPlanilha">O arquivo deve ser no formato XLS, XLSX ou ODS de até 2MB.</label>
</div>
</div>
@error('anexoPlanilha')
......@@ -252,7 +252,7 @@
</div>
<div class="col-sm-6">
<label for="nomeTrabalho" class="col-form-label">{{ __('Justificativa*:') }}</label>
<label for="nomeTrabalho" class="col-form-label">{{ __('Declaração de não necessidade de autorizações especiais*:') }}</label>
@if(old('anexoJustificativaPreenchido') != null || (isset($rascunho) && $rascunho->justificativaAutorizacaoEtica != "" && $rascunho->justificativaAutorizacaoEtica != null))
<a id="anexoJustificativaTemp" href="{{ route('baixar.anexo.temp', ['eventoId' => $edital->id,
'nomeAnexo' => 'justificativaAutorizacaoEtica' ])}}">Arquivo atual</a>
......@@ -323,10 +323,11 @@
<div id="novoParticipante" style="display: block;">
<br>
<h4>Dados do participante</h4>
<h6>Dados pessoais</h6>
<div class="row">
<div class="col-sm-5">
<label>Nome Completo*</label>
<input type="text" style="margin-bottom:10px" class="form-control @error('nomeParticipante') is-invalid @enderror" name="nomeParticipante[]" placeholder="Nome" value="{{old('nomeParticipante.'.$i)}}">
<input type="text" style="margin-bottom:10px" class="form-control @error('nomeParticipante') is-invalid @enderror" name="nomeParticipante[]" placeholder="Nome" value="{{old('nomeParticipante.'.$i)}}" required>
@error('nomeParticipante.'.$i)
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
......@@ -335,7 +336,7 @@
</div>
<div class="col-sm-4">
<label>E-mail*</label>
<input type="email" style="margin-bottom:10px" class="form-control @error('emailParticipante') is-invalid @enderror" name="emailParticipante[]" placeholder="email" value="{{old('emailParticipante.'.$i)}}">
<input type="email" style="margin-bottom:10px" class="form-control @error('emailParticipante') is-invalid @enderror" name="emailParticipante[]" placeholder="email" value="{{old('emailParticipante.'.$i)}}" required>
@error('emailParticipante.'.$i)
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
......@@ -344,7 +345,7 @@
</div>
<div class="col-sm-3">
<label>Função*:</label>
<select class="form-control @error('funcaoParticipante') is-invalid @enderror" name="funcaoParticipante[]" id="funcaoParticipante">
<select class="form-control @error('funcaoParticipante') is-invalid @enderror" name="funcaoParticipante[]" id="funcaoParticipante" required>
<option value="" disabled selected hidden>-- Função --</option>
@foreach($funcaoParticipantes as $funcaoParticipante)
<option @if(old('funcaoParticipante.'.$i)==$funcaoParticipante->id ) selected @endif value="{{$funcaoParticipante->id}}">{{$funcaoParticipante->nome}}</option>
......@@ -357,6 +358,170 @@
@enderror
</div>
</div>
<div id="dados_complemento_1">
<div class="form-group">
<div class="row">
<div class="col-sm-4">
<label for="">{{ __('CPF*') }}</label>
<input type="text" class="form-control cpf" name="cpf[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('RG*') }}</label>
<input type="text" class="form-control rg" name="rg[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('Celular*') }}</label>
<input type="text" class="form-control celular" name="celular[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-4">
<label for="">{{ __('Data de nascimento*') }}</label>
<input type="date" class="form-control" name="data_de_nascimento[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h6>Endereço do participante</h6>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<label for="">{{ __('CEP*') }}</label>
<input type="text" class="form-control" name="cep[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-6">
<label for="">{{ __('Rua*') }}</label>
<input type="text" class="form-control" name="rua[]" required>
</div>
<div class="col-sm-3">
<label for="">{{ __('Número*') }}</label>
<input type="text" class="form-control" name="numero[]" required>
</div>
<div class="col-sm-3">
<label for="">{{ __('Bairro*') }}</label>
<input type="text" class="form-control" name="bairro[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-4">
<label for="">{{ __('Cidade*') }}</label>
<input type="text" class="form-control " name="cidade[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('Complemento*') }}</label>
<input type="text" class="form-control" name="complemento[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('Estado*') }}</label>
<select name="uf[]" id="" class="form-control" required>
<option value="" disabled selected>-- UF --</option>
<option @if(old('uf') == 'AC') selected @endif value="AC">Acre</option>
<option @if(old('uf') == 'AL') selected @endif value="AL">Alagoas</option>
<option @if(old('uf') == 'AP') selected @endif value="AP">Amapá</option>
<option @if(old('uf') == 'AM') selected @endif value="AM">Amazonas</option>
<option @if(old('uf') == 'BA') selected @endif value="BA">Bahia</option>
<option @if(old('uf') == 'CE') selected @endif value="CE">Ceará</option>
<option @if(old('uf') == 'DF') selected @endif value="DF">Distrito Federal</option>
<option @if(old('uf') == 'ES') selected @endif value="ES">Espírito Santo</option>
<option @if(old('uf') == 'GO') selected @endif value="GO">Goiás</option>
<option @if(old('uf') == 'MA') selected @endif value="MA">Maranhão</option>
<option @if(old('uf') == 'MT') selected @endif value="MT">Mato Grosso</option>
<option @if(old('uf') == 'MS') selected @endif value="MS">Mato Grosso do Sul</option>
<option @if(old('uf') == 'MG') selected @endif value="MG">Minas Gerais</option>
<option @if(old('uf') == 'PA') selected @endif value="PA">Pará</option>
<option @if(old('uf') == 'PB') selected @endif value="PB">Paraíba</option>
<option @if(old('uf') == 'PR') selected @endif value="PR">Paraná</option>
<option @if(old('uf') == 'PE') selected @endif value="PE">Pernambuco</option>
<option @if(old('uf') == 'PI') selected @endif value="PI">Piauí</option>
<option @if(old('uf') == 'RJ') selected @endif value="RJ">Rio de Janeiro</option>
<option @if(old('uf') == 'RN') selected @endif value="RN">Rio Grande do Norte</option>
<option @if(old('uf') == 'RS') selected @endif value="RS">Rio Grande do Sul</option>
<option @if(old('uf') == 'RO') selected @endif value="RO">Rondônia</option>
<option @if(old('uf') == 'RR') selected @endif value="RR">Roraima</option>
<option @if(old('uf') == 'SC') selected @endif value="SC">Santa Catarina</option>
<option @if(old('uf') == 'SP') selected @endif value="SP">São Paulo</option>
<option @if(old('uf') == 'SE') selected @endif value="SE">Sergipe</option>
<option @if(old('uf') == 'TO') selected @endif value="TO">Tocantins</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h6>Dados do curso do participante</h6>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label for="">{{ __('Universidade*') }}</label>
<input type="text" class="form-control" name="universidade[]" required>
</div>
<div class="col-sm-6">
<label for="">{{ __('Curso*') }}</label>
<input type="text" class="form-control" name="curso[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-2">
<label for="">{{ __('Turno*') }}</label>
<select id="" class="form-control" name="turno[]" required>
<option value="" disabled selected>-- TURNO --</option>
@foreach ($enum_turno as $turno)
<option value="{{$turno}}">{{$turno}}</option>
@endforeach
</select>
</div>
<div class="col-sm-3">
<label for="">{{ __('Total de periodos do curso*') }}</label>
<select name="total_periodos[]" id="" class="form-control" onchange="gerarPeriodos(this)" required>
<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div class="col-sm-2">
<label for="">{{ __('Periodo atual*') }}</label>
<select name="periodo_cursado[]" id="" class="form-control" required>
<option value="" disabled selected>-- PERÍODO ATUAL --</option>
</select>
</div>
<div class="col-sm-2">
<label for="">{{ __('Ordem de prioridade*') }}</label>
<select name="ordem_prioridade[]" id="" class="form-control" required>
<option value="" disabled selected>-- ORDEM --</option>
<option value="1">1º</option>
<option value="2">2º</option>
<option value="3">3º</option>
<option value="4">4º</option>
</select>
</div>
<div class="col-sm-3">
<label for="">{{ __('Média geral do curso*') }}</label>
<input type="number" class="form-control media" min="0" max="10" step="0.01" value="00.00" name="media_geral_curso[]" required>
</div>
</div>
</div>
</div>
<h6 class="mb-1">Possui plano de trabalho?</h6>
<button class="btn btn-primary mt-2 mb-2 simPlano">Sim</button>
<button class="btn btn-primary mt-2 mb-2 naoPlano">Não</button>
......@@ -395,20 +560,14 @@
</span>
@enderror
</div>
<div class="col-sm-1">
{{-- <a class="delete">
<img src="{{ asset('/img/icons/user-times-solid.svg') }}" style="width:25px;margin-top:35px">
</a> --}}
</div>
</div>
</div>
</div>
</div>
</div>
@if($i != 0)
<a href='#' class="btn btn-danger mt-2 mb-2 delete" style='width:100%;margin-top:10px'>Remover participante</a>
@endif
<button class="btn btn-danger mt-2 mb-2 delete" style='width:100%;margin-top:10px' disabled>Limite minimo de participantes</button>
</div>
{{-- </div>
......@@ -418,7 +577,7 @@
@endif
</div>
<input type="hidden" name="countParticipante" id="countParticipante" value="{{ old('countParticipante') != null ? old('countParticipante') : 1}}">
<a href="#" class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Adicionar participante</a>
<button class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Adicionar participante</button>
</div>
</div>
......@@ -453,14 +612,30 @@
<script type="text/javascript">
$(function() {
var qtdLinhas = 1;
const limiteMaxParticipantes = 3;
const limiteMinParticipantes = 1;
// Coautores
$('#addCoautor').click(function(e) {
var countParticipante = document.getElementById('countParticipante');
if (countParticipante.value < 100) {
if (countParticipante.value < limiteMaxParticipantes) {
e.preventDefault();
linha = montarLinhaInput();
$('#participantes').append(linha);
setParticipanteDiv(parseInt(countParticipante.value) + 1);
var btnsDeletar = document.getElementsByClassName("delete");
for(var i = 0; i < btnsDeletar.length; i++) {
btnsDeletar[i].disabled = "";
$(btnsDeletar[i]).text("Remover participantes");
}
if (countParticipante.value >= limiteMaxParticipantes) {
var btn = document.getElementById('addCoautor');
btn.disabled = "true";
$('#addCoautor').text("Limite de participantes atingido");
}
// aplicarMascaras();
}
});
......@@ -484,9 +659,18 @@
// });
$(document).on('click', '.delete', function() {
var countParticipante = document.getElementById('countParticipante');
if (countParticipante.value >= 2) {
if (countParticipante.value >= limiteMinParticipantes) {
setParticipanteDiv(parseInt(countParticipante.value) - 1);
$(this).closest('#novoParticipante').remove();
document.getElementById("addCoautor").disabled = "";
$('#addCoautor').text("Adicionar participante");
if (countParticipante.value == limiteMinParticipantes) {
var btnsDeletar = document.getElementsByClassName("delete");
for(var i = 0; i < btnsDeletar.length; i++) {
btnsDeletar[i].disabled = true;
$(btnsDeletar).text("Limite minimo de participantes");
}
}
return false;
}
});
......@@ -586,93 +770,255 @@
function montarLinhaInput() {
return "<div id="+"novoParticipante"+">" +
"<div class='row'>"+
"<div class='col-sm-9'>"+
"<br><h4>Dados do participante</h4>" +
"</div>"+
"<div class='col-sm-3'>"+
"</div>"+
"</div>"+
"<div class="+"row"+">"+
"<div class="+"col-sm-5"+">"+
"<label>Nome Completo*</label>"+
"<input"+" type="+'text'+" style="+"margin-bottom:10px"+" class="+'form-control' + " @error('nomeParticipante') is-invalid @enderror" + "name=" +'nomeParticipante[]'+" placeholder="+"Nome"+">"+
"@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 type='email'" + "style='margin-bottom:10px'" + "class=" + "form-control @error('emailParticipante') is-invalid @enderror" + "name='emailParticipante[]'" + "placeholder='email' >" +
"@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)"+
"<option value='{{$funcaoParticipante->id}}'>{{$funcaoParticipante->nome}}</option>"+
"@endforeach"+
"@error('funcaoParticipante'. $i)" +
"<span class='invalid-feedback'" + " role='alert'" + " style='overflow: visible; display:block'>" +
"<strong>{{ $message }}</strong>" +
"</span>" +
"@enderror" +
"</select>"+
"</div>"+
"</div>" +
"<h6 class='mb-1'>Possui plano de trabalho?</h6>"+
"<button class="+"'btn btn-primary mt-2 mb-2 mr-1 simPlano'"+">Sim</button>"+
"<button class="+"'btn btn-primary mt-2 mb-2 mr-1 naoPlano'"+">Não</button>"+
"<div id="+"planoHabilitado"+" style="+"'display:none;'"+">" +
"<h5>Dados do plano de trabalho</h5>" +
"<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>"+
"<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="+"col-sm-1"+">"+
"<a class="+"delete"+">"+
"<img src="+"{{ asset('/img/icons/user-times-solid.svg') }}"+" style="+"width:25px;margin-top:35px"+">"+
"</a>"+
"</div>"+
"</div>"+
"</div>"+
"<a href='#' class="+"'btn btn-danger mt-2 mb-2 delete'"+" style='width:100%;margin-top:10px'"+">Remover participante</a>"+
"</div>";
return `<div id="novoParticipante" style="display: block;">
<br>
<h4>Dados do participante</h4>
<h6>Dados pessoais</h6>
<div class="row">
<div class="col-sm-5">
<label>Nome Completo*</label>
<input type="text" style="margin-bottom:10px" class="form-control @error('nomeParticipante') is-invalid @enderror" name="nomeParticipante[]" placeholder="Nome" value="{{old('nomeParticipante.'.$i)}}" required>
@error('nomeParticipante.'.$i)
<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 type="email" style="margin-bottom:10px" class="form-control @error('emailParticipante') is-invalid @enderror" name="emailParticipante[]" placeholder="email" value="{{old('emailParticipante.'.$i)}}" required>
@error('emailParticipante.'.$i)
<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" required>
<option value="" disabled selected hidden>-- Função --</option>
@foreach($funcaoParticipantes as $funcaoParticipante)
<option @if(old('funcaoParticipante.'.$i)==$funcaoParticipante->id ) selected @endif value="{{$funcaoParticipante->id}}">{{$funcaoParticipante->nome}}</option>
@endforeach
</select>
@error('funcaoParticipante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div id="dados_complemento_1">
<div class="form-group">
<div class="row">
<div class="col-sm-4">
<label for="">{{ __('CPF*') }}</label>
<input type="text" class="form-control cpf" name="cpf[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('RG*') }}</label>
<input type="text" class="form-control rg" name="rg[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('Celular*') }}</label>
<input type="text" class="form-control celular" name="celular[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-4">
<label for="">{{ __('Data de nascimento*') }}</label>
<input type="date" class="form-control" name="data_de_nascimento[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h6>Endereço do participante</h6>
</div>
</div>
<div class="row">
<div class="col-sm-3">
<label for="">{{ __('CEP*') }}</label>
<input type="text" class="form-control" name="cep[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-6">
<label for="">{{ __('Rua*') }}</label>
<input type="text" class="form-control" name="rua[]" required>
</div>
<div class="col-sm-3">
<label for="">{{ __('Número*') }}</label>
<input type="text" class="form-control" name="numero[]" required>
</div>
<div class="col-sm-3">
<label for="">{{ __('Bairro*') }}</label>
<input type="text" class="form-control" name="bairro[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-4">
<label for="">{{ __('Cidade*') }}</label>
<input type="text" class="form-control " name="cidade[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('Complemento*') }}</label>
<input type="text" class="form-control" name="complemento[]" required>
</div>
<div class="col-sm-4">
<label for="">{{ __('Estado*') }}</label>
<select name="uf[]" id="" class="form-control" required>
<option value="" disabled selected>-- UF --</option>
<option @if(old('uf') == 'AC') selected @endif value="AC">Acre</option>
<option @if(old('uf') == 'AL') selected @endif value="AL">Alagoas</option>
<option @if(old('uf') == 'AP') selected @endif value="AP">Amapá</option>
<option @if(old('uf') == 'AM') selected @endif value="AM">Amazonas</option>
<option @if(old('uf') == 'BA') selected @endif value="BA">Bahia</option>
<option @if(old('uf') == 'CE') selected @endif value="CE">Ceará</option>
<option @if(old('uf') == 'DF') selected @endif value="DF">Distrito Federal</option>
<option @if(old('uf') == 'ES') selected @endif value="ES">Espírito Santo</option>
<option @if(old('uf') == 'GO') selected @endif value="GO">Goiás</option>
<option @if(old('uf') == 'MA') selected @endif value="MA">Maranhão</option>
<option @if(old('uf') == 'MT') selected @endif value="MT">Mato Grosso</option>
<option @if(old('uf') == 'MS') selected @endif value="MS">Mato Grosso do Sul</option>
<option @if(old('uf') == 'MG') selected @endif value="MG">Minas Gerais</option>
<option @if(old('uf') == 'PA') selected @endif value="PA">Pará</option>
<option @if(old('uf') == 'PB') selected @endif value="PB">Paraíba</option>
<option @if(old('uf') == 'PR') selected @endif value="PR">Paraná</option>
<option @if(old('uf') == 'PE') selected @endif value="PE">Pernambuco</option>
<option @if(old('uf') == 'PI') selected @endif value="PI">Piauí</option>
<option @if(old('uf') == 'RJ') selected @endif value="RJ">Rio de Janeiro</option>
<option @if(old('uf') == 'RN') selected @endif value="RN">Rio Grande do Norte</option>
<option @if(old('uf') == 'RS') selected @endif value="RS">Rio Grande do Sul</option>
<option @if(old('uf') == 'RO') selected @endif value="RO">Rondônia</option>
<option @if(old('uf') == 'RR') selected @endif value="RR">Roraima</option>
<option @if(old('uf') == 'SC') selected @endif value="SC">Santa Catarina</option>
<option @if(old('uf') == 'SP') selected @endif value="SP">São Paulo</option>
<option @if(old('uf') == 'SE') selected @endif value="SE">Sergipe</option>
<option @if(old('uf') == 'TO') selected @endif value="TO">Tocantins</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="container">
<h6>Dados do curso do participante</h6>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label for="">{{ __('Universidade*') }}</label>
<input type="text" class="form-control" name="universidade[]" required>
</div>
<div class="col-sm-6">
<label for="">{{ __('Curso*') }}</label>
<input type="text" class="form-control" name="curso[]" required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-2">
<label for="">{{ __('Turno*') }}</label>
<select id="" class="form-control" name="turno[]" required>
<option value="" disabled selected>-- TURNO --</option>
@foreach ($enum_turno as $turno)
<option value="{{$turno}}">{{$turno}}</option>
@endforeach
</select>
</div>
<div class="col-sm-3">
<label for="">{{ __('Total de periodos do curso*') }}</label>
<select name="total_periodos[]" id="" class="form-control" onchange="gerarPeriodos(this)" required>
<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
<div class="col-sm-2">
<label for="">{{ __('Periodo atual*') }}</label>
<select name="periodo_cursado[]" id="" class="form-control" required>
<option value="" disabled selected>-- PERÍODO ATUAL --</option>
</select>
</div>
<div class="col-sm-2">
<label for="">{{ __('Ordem de prioridade*') }}</label>
<select name="ordem_prioridade[]" id="" class="form-control" required>
<option value="" disabled selected>-- ORDEM --</option>
<option value="1">1º</option>
<option value="2">2º</option>
<option value="3">3º</option>
<option value="4">4º</option>
</select>
</div>
<div class="col-sm-3">
<label for="">{{ __('Média geral do curso*') }}</label>
<input type="number" class="form-control media" min="0" max="10" step="0.01" value="00.00" name="media_geral_curso[]" required>
</div>
</div>
</div>
</div>
<h6 class="mb-1">Possui plano de trabalho?</h6>
<button class="btn btn-primary mt-2 mb-2 simPlano">Sim</button>
<button class="btn btn-primary mt-2 mb-2 naoPlano">Não</button>
<div id="planoHabilitado" style="display:none;">
<h5>Dados do plano de trabalho</h5>
<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" value="{{old('nomePlanoTrabalho.'.$i)}}">
@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>
</div>
</div>
</div>
</div>
<button class="btn btn-danger mt-2 mb-2 delete" style='width:100%;margin-top:10px' disabled>Limite minimo de participantes</button>
</div>`;
}
......@@ -784,5 +1130,36 @@
}
window.onload = areas();
window.onload = habilitarBotao();
$(document).ready(aplicarMascaras());
function aplicarMascaras() {
$('.cpf').mask('000.000.000-00');
var SPMaskBehavior = function(val) {
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009';
},
spOptions = {
onKeyPress: function(val, e, field, options) {
field.mask(SPMaskBehavior.apply({}, arguments), options);
}
};
$('.celular').mask(SPMaskBehavior, spOptions);
$('.rg').mask('99.999.999-9');
$('.media').mask('00.00');
}
function gerarPeriodos(select) {
var div = select.parentElement.parentElement;
var selectPeriodos = div.children[2].children[1];
var html = `<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>`;
for(var i = 0; i < parseInt(select.value); i++) {
html += `<option value="${i+1}">${i+1}º</option>`;
}
$(selectPeriodos).html('');
$(selectPeriodos).append(html);
}
</script>
@endsection
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