|
@@ -612,9 +612,10 @@ class CriteriaController extends \BaseController
|
612
|
612
|
public function objectivesIndex()
|
613
|
613
|
{
|
614
|
614
|
if (Auth::user()->role == 1) {
|
615
|
|
- //uscar todos los objetivos
|
|
615
|
+ //buscar todos los objetivos
|
616
|
616
|
$objectives = DB::table('program_user')
|
617
|
|
- ->join('objectives', 'objectives.program_id', '=', 'program_user.program_id')
|
|
617
|
+ ->join('objective_program', 'objective_program.program_id', '=', 'program_user.program_id')
|
|
618
|
+ ->join('objectives', 'objectives.id', '=', 'objective_program.objective_id')
|
618
|
619
|
->join('programs', 'programs.id', '=', 'program_user.program_id')
|
619
|
620
|
->select('objectives.id', 'objectives.text', 'programs.name')
|
620
|
621
|
->orderBy('objectives.text', 'asc')
|