diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index d53683f8b1e3df2c068c6e7d0fe13c28e9f97d1c..616b9de0d590c31604403b27e1861bbc3f066a61 100755 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -822,7 +822,7 @@ class TrabalhoController extends Controller } return abort(404); } - +//xxfa public function update(UpdateTrabalho $request, $id) { @@ -927,8 +927,15 @@ class TrabalhoController extends Controller } $data['nomePlanoTrabalho'] = $request->nomePlanoTrabalho[$part]; - // $participante = Participante::find($request->participante_id[$part]); - $user = User::where('email', $data['email'])->first(); + if($request->participante_id[$part] != null){ + $participante = Participante::find($request->participante_id[$part]); + $user = User::where('email', $participante->user->email)->first(); + }else{ + $user = User::where('email', $data['email'])->first(); + } + + + if ($user == null) { $data['usuarioTemp'] = true; diff --git a/resources/views/projeto/editaFormulario/participantes.blade.php b/resources/views/projeto/editaFormulario/participantes.blade.php index 4d626745592d44d7f04de1f5096131613cbe3e29..bf77d7bbe1bfc6fcb499a9f8ce9cf0a0f0aa1a88 100644 --- a/resources/views/projeto/editaFormulario/participantes.blade.php +++ b/resources/views/projeto/editaFormulario/participantes.blade.php @@ -1,494 +1,782 @@ -
-
-
-
-
-
Dados do(s) Discente(s)
-
- - - -
-
-
-
-
    -
  1. -
    -
    - @for($i = 0; $i < $edital->numParticipantes; $i++) - @php - $participante = null; - if ($projeto->participantes->keys()->contains($i)) { - $participante = $projeto->participantes[$i]; - } - - @endphp - - - -
  2. + +
+ +
+
+
+
+
+