Ejemplo n.º 1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($programid, $workstreamid, $subjectid)
 {
     $program = Program::findOrFail($programid);
     $workstream = WorkStream::where('id', $workstreamid)->with('RAGs', 'Risks', 'Projects.RAGs', 'Members.User', 'Tasks.ActionOwner')->first();
     $subject = Project::where('id', $subjectid)->with('RAGs', 'Risks', 'Members.User', 'Tasks.ActionOwner', 'Comments')->first();
     $subjecttype = 'Project';
     $subjectid = $subject->id;
     return view('Project.show', compact('program', 'workstream', 'subject', 'subjecttype', 'subjectid'));
 }
Ejemplo n.º 2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $subject = Program::where('id', $id)->with('RAGs', 'Risks', 'Members.User', 'Tasks.ActionOwner')->first();
     if (!$subject) {
         abort(404, 'Program not found');
     }
     //get worksteams for this program
     //todo : Move this to a seperate model to ensure single responsibility.  Should add number of active projects to the workstream list.  Maybe a nice small char
     $workstreams = WorkStream::where('program_id', $id)->orderBy('phase')->orderBy('status')->orderBy('name')->with('RAGs', 'Risks', 'Members.User')->get();
     //return $program->Tasks;
     $subjecttype = 'Program';
     $subjectid = $subject->id;
     return view('Program.show', compact('subject', 'workstreams', 'subjecttype', 'subjectid'));
 }
 public function show($programid, $workstreamid)
 {
     try {
         $program = Program::findOrFail($programid);
     } catch (ModelNotFoundException $e) {
         App::abort(404, 'Program not found');
     }
     $subject = WorkStream::where('id', $workstreamid)->with('RAGs', 'Risks', 'Projects.RAGs', 'Members.User', 'Tasks.ActionOwner')->first();
     if (!$subject) {
         App::abort(404, 'WorkStream not found');
     }
     $subjecttype = 'WorkStream';
     $subjectid = $subject->id;
     return view('workstream.show', compact('program', 'subject', 'subjecttype', 'subjectid'));
 }