Commit b2c6b081 authored by carlos's avatar carlos
Browse files

bug do plano de trabalho em editar projeto

Showing with 21 additions and 20 deletions
+21 -20
......@@ -537,7 +537,6 @@ class TrabalhoController extends Controller
foreach ($users as $user) {
array_push($emailParticipantes, $user->email);
}
foreach ($request->emailParticipante as $key => $value) {
// criando novos participantes que podem ter sido adicionados
if (!(in_array($request->emailParticipante[$key], $emailParticipantes, false))) {
......@@ -603,6 +602,7 @@ class TrabalhoController extends Controller
$participante->update();
//atualizando planos de trabalho
if ($request->anexoPlanoTrabalho != null) {
if (array_key_exists($key, $request->anexoPlanoTrabalho)) {
if (!(is_null($request->anexoPlanoTrabalho[$key]))) {
$arquivo = Arquivo::where('participanteId', $participante->id)->first();
......@@ -627,6 +627,7 @@ class TrabalhoController extends Controller
}
}
}
}
// Atualizando possiveis usuários removidos
$participantesUsersIds = Participante::where('trabalho_id', '=', $trabalho->id)->select('user_id')->get();
......
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