arreglo evidencias 3
This commit is contained in:
parent
33ee3d0225
commit
1d614acb12
@ -91,7 +91,7 @@ public function update(Request $request)
|
||||
if (Evidencias::where(["id" => $request->id])->exists()) {
|
||||
$evidencia = Evidencias::find($request->id);
|
||||
$plan = plan::find($evidencia->id_plan);
|
||||
if ($plan->id_user == $id_user->id or $id_user->isAdmin()) {
|
||||
if ($id_user->isCreadorPlan($plan->id) or $id_user->isAdmin()) {
|
||||
$evidencia->codigo = $request->codigo;
|
||||
$evidencia->denominacion = $request->denominacion;
|
||||
$path = $request->adjunto->store('evidencias');
|
||||
@ -122,7 +122,7 @@ public function delete($id)
|
||||
if (Evidencias::where(["id" => $id])->exists()) {
|
||||
$evidencia = Evidencias::find($id);
|
||||
$plan = plan::find($evidencia->id_plan);
|
||||
if ($plan->id_user == $id_user->id or $id_user->isAdmin()) {
|
||||
if ($id_user->isCreadorPlan($plan->id) or $id_user->isAdmin()) {
|
||||
$evidencia->delete();
|
||||
return response([
|
||||
"status" => 1,
|
||||
|
Loading…
Reference in New Issue
Block a user