예제 #1
0
 public function contract_gta($id)
 {
     $conType = "General Terms Agreement";
     $topics = Contracttopic::where('contract_type_id', 1)->orderBy('sort_order')->get();
     $project = Project::with('company.addresses')->where('id', $id)->first();
     $company = $project->company;
     $adc = ConsortiumGlobal::where('id', '1')->first();
     //dd($project);
     return view('contracts.contract', compact('conType', 'topics', 'project', 'company', 'adc'));
 }
예제 #2
0
 public function profile($id = null)
 {
     $adc = ConsortiumGlobal::where('id', '1')->first();
     $atas = Ata::where('active', 1)->get();
     $disassemblers = Disassembler::lists('name', 'id');
     $user = Auth::user();
     $types = ProjectType::lists('type', 'id');
     $company = Company::where('id', $user->company_id)->first();
     if ($id) {
         $project = Project::find($id);
     } else {
         $project = Project::create(['creator_id' => $user->id, 'company_id' => $user->company_id, 'directory_path' => $company->company . '/' . date('Y') . '/']);
     }
     return view('projects.profile', compact('adc', 'atas', 'company', 'disassemblers', 'project', 'types', 'user'));
 }