From df30926bdb6409bf3a80251f13d1961f0d0be369 Mon Sep 17 00:00:00 2001 From: cgonzalesmo Date: Sat, 10 Dec 2022 21:44:19 -0500 Subject: [PATCH] Update estandar 2.0 (esEncargado) --- app/Http/Controllers/Api/EstandarController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/EstandarController.php b/app/Http/Controllers/Api/EstandarController.php index e10fb11..6e65576 100644 --- a/app/Http/Controllers/Api/EstandarController.php +++ b/app/Http/Controllers/Api/EstandarController.php @@ -77,7 +77,7 @@ public function showEstandar($id) public function updateEstandar(Request $request, $id) { $id_user = auth()->user(); - if ($id_user->isEncargado() || $id_user->isAdmin()) { + if ($id_user->isEncargadoEstandar($id) || $id_user->isAdmin()) { $estandar = Estandar::find($id); $estandar->name = isset($request->name) ? $request->name : $estandar->name; $estandar->cabecera = isset($request->cabecera) ? $request->cabecera : $estandar->cabecera;