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 @@ - + - - - - - - - - - + + + + + + + + @if (count($Query[0]->place_worker) > 0) @foreach($Query[0]->place_worker as $it) @@ -371,8 +370,11 @@ - - + @endforeach @else @@ -384,7 +386,6 @@ - @endif
Опыт работыОпыт работы
ДолжностьНазвание т/хТип суднаМарка ГДМощность ГД (кВТ)Водо- измещение (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)) }} +
- - --
diff --git a/resources/views/worker.blade.php b/resources/views/worker.blade.php index a1feb36..90467c4 100644 --- a/resources/views/worker.blade.php +++ b/resources/views/worker.blade.php @@ -201,7 +201,7 @@
- +
@if (isset($Query[0]->sertificate)) @@ -226,7 +226,7 @@
- +
@if ($infoblocks->count()) @@ -268,7 +268,7 @@
- +
@if (isset($Query[0]->place_worker)) @@ -307,7 +307,7 @@
- +
@if ((isset($worker->prev_company)) && ($worker->prev_company->count()))
@@ -339,7 +339,7 @@ @if (App\Classes\StatusUser::Status()==0) @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
-