change descripcion as value
This commit is contained in:
parent
c59b752ebf
commit
50b21f3e45
@ -75,7 +75,7 @@ public function update(Request $request,$id){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*--------------------------------Causas-------------------------------*/
|
/*--------------------------------Causas-------------------------------*/
|
||||||
$causas = $request->causas;
|
$causas = $request->causas_raices;
|
||||||
//Eliminar causas que no esten en el Request
|
//Eliminar causas que no esten en el Request
|
||||||
$existingsIds = collect($causas)->pluck('id')->filter();
|
$existingsIds = collect($causas)->pluck('id')->filter();
|
||||||
$plan->causasRaices()->whereNotIn('id', $existingsIds)->delete();
|
$plan->causasRaices()->whereNotIn('id', $existingsIds)->delete();
|
||||||
@ -386,15 +386,14 @@ public function deletePlan($id){
|
|||||||
public function showPlan($id){
|
public function showPlan($id){
|
||||||
if(plan::where("id",$id)->exists()){
|
if(plan::where("id",$id)->exists()){
|
||||||
$plan = plan::find($id);
|
$plan = plan::find($id);
|
||||||
$plan->fuentes = Fuentes::where("id_plan",$id)->get();
|
$plan->fuentes = Fuentes::where("id_plan",$id)->get(['id', 'descripcion as value']);
|
||||||
$plan->problemas_oportunidades = ProblemasOportunidades::where("id_plan",$id)->get();
|
$plan->problemas_oportunidades = ProblemasOportunidades::where("id_plan",$id)->get(['id', 'descripcion as value']);
|
||||||
$plan->causas_raices = CausasRaices::where("id_plan",$id)->get();
|
$plan->causas_raices = CausasRaices::where("id_plan",$id)->get(['id', 'descripcion as value']);
|
||||||
$plan->acciones_mejoras = AccionesMejoras::where("id_plan",$id)->get();
|
$plan->acciones_mejoras = AccionesMejoras::where("id_plan",$id)->get(['id', 'descripcion as value']);
|
||||||
$plan->recursos = Recursos::where("id_plan",$id)->get();
|
$plan->recursos = Recursos::where("id_plan",$id)->get(['id', 'descripcion as value']);
|
||||||
$plan->metas = Metas::where("id_plan",$id)->get();
|
$plan->metas = Metas::where("id_plan",$id)->get(['id', 'descripcion as value']);
|
||||||
$plan->observaciones = Observaciones::where("id_plan",$id)->get();
|
$plan->observaciones = Observaciones::where("id_plan",$id)->get(['id', 'descripcion as value']);
|
||||||
$plan->evidencias_planes_mejoras = Evidencias::where("id_plan",$id)->get();
|
$plan->responsables = Responsables::where("id_plan",$id)->get(['id', 'nombre as value']);
|
||||||
$plan->responsables = Responsables::where("id_plan",$id)->get();
|
|
||||||
$plan->evidencias = Evidencias::where("id_plan",$id)->get();
|
$plan->evidencias = Evidencias::where("id_plan",$id)->get();
|
||||||
return response([
|
return response([
|
||||||
"status" => 1,
|
"status" => 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user