diff --git a/app/Http/Controllers/Admin/WorkersController.php b/app/Http/Controllers/Admin/WorkersController.php index ce8dbc6..5e59621 100644 --- a/app/Http/Controllers/Admin/WorkersController.php +++ b/app/Http/Controllers/Admin/WorkersController.php @@ -39,20 +39,7 @@ class WorkersController extends Controller $find_status_work = ""; if (isset($request->status_work)) { $find_status_work = $request->status_work; - //$users = $users->where('position_work', '=', $find_status_work); - - /*if ($request->status_work > 0) - $users = $users->with(['workers' => function($query) use ($find_status_work){ - $query->where('position_work', $find_status_work); - }]); - else - $users = $users->with('workers');*/ - - /*$users = $users->where(function($query) use($find_status_work) { - $query->with(['workers' => function($query1) use ($find_status_work){ - $query1->where('position_work', $find_status_work); - }]); - });*/ + if ($request->status_work > 0) { $users = $users->with('workers')-> whereHas('workers', @@ -80,43 +67,7 @@ class WorkersController extends Controller }); } - $users = $users->Realuser()->paginate(15); - - /* - $Arr = array(); - $where = ''; - $find_status_work = ""; - if (isset($request->status_work)) { - $find_status_work = $request->status_work; - //$users = $users->where('position_work', '=', $find_status_work); - $where.= ' and (w.position_work = :uid1)'; - $Arr['uid1'] = $find_status_work; - } - - $find_key = ""; - if (isset($request->find)) { - $find_key = $request->find; - /*$users = $users->where(function($query) use($find_key) { - $query->Where('name_man', 'LIKE', "%$find_key%") - ->orWhere('email', 'LIKE', "%$find_key%") - ->orWhere('telephone', 'LIKE', "%$find_key%"); - });*/ - /*$where.= " and ((u.name_man LIKE %:uid2%) or (w.email LIKE %:uid2%) or (w.telephone LIKE %:uid2%))"; - $Arr['uid2'] = $find_key; - } - - //$users = $users->paginate(15); - - //DB::enableQueryLog(); - $users = DB::select('SELECT u.*, w.*, j.* - FROM workers w - JOIN users u ON u.id = w.user_id - JOIN job_titles j ON j.id = w.position_work - Where (u.is_worker = 1) - '.$where, $Arr); - //dump(DB::getQueryLog()); - dd($users); - */ + $users = $users->orderByDesc('id')->Realuser()->paginate(15); $status_wor = $this->Status_work; diff --git a/resources/views/layout/pdf.blade.php b/resources/views/layout/pdf.blade.php index 3064414..07b8f17 100644 --- a/resources/views/layout/pdf.blade.php +++ b/resources/views/layout/pdf.blade.php @@ -98,12 +98,12 @@ } .main__table_experience td { - width: 25% !important; + width: 5%; hyphens: auto; overflow: hidden; } - .main__table_experience body td:nth-child(1){ - width: 50% !important; + .main__table_experience td:first-child { + width: 80%; } .main__table_three td:last-child { @@ -346,20 +346,19 @@
Опыт работы | +Опыт работы | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Должность | -Название т/х | -Тип судна | -Марка ГД | -Мощность ГД (кВТ) | -Водо- измещение (DWT) | -Название компании | -Начало контракта | -Окончание контракта | +Должность | +Название т/х | +Тип судна | +Марка ГД | +Мощность ГД (кВТ) | +Водо- измещение (DWT) | +Название компании | +Начало и окончание контракта | {{ $it->KBT }} | {{ $it->GRT }} | {{ $it->name_company }} | -{{ date('d.m.Y', strtotime($it->begin_work)) }} | -{{ date('d.m.Y', strtotime($it->end_work)) }} | ++ {{ date('d.m.Y', strtotime($it->begin_work)) }} + - + {{ date('d.m.Y', strtotime($it->end_work)) }} + | @endforeach @else @@ -384,7 +386,6 @@- | - | - | -- | @endif