Commit 831bbfdc989034cbcf59575305f78f7ca3463248

Authored by Андрей Ларионов
Exists in master

uncommited files

Showing 3 changed files Side-by-side Diff

app/Http/Controllers/Admin/WorkersController.php
... ... @@ -39,20 +39,7 @@ class WorkersController extends Controller
39 39 $find_status_work = "";
40 40 if (isset($request->status_work)) {
41 41 $find_status_work = $request->status_work;
42   - //$users = $users->where('position_work', '=', $find_status_work);
43   -
44   - /*if ($request->status_work > 0)
45   - $users = $users->with(['workers' => function($query) use ($find_status_work){
46   - $query->where('position_work', $find_status_work);
47   - }]);
48   - else
49   - $users = $users->with('workers');*/
50   -
51   - /*$users = $users->where(function($query) use($find_status_work) {
52   - $query->with(['workers' => function($query1) use ($find_status_work){
53   - $query1->where('position_work', $find_status_work);
54   - }]);
55   - });*/
  42 +
56 43 if ($request->status_work > 0) {
57 44 $users = $users->with('workers')->
58 45 whereHas('workers',
... ... @@ -80,43 +67,7 @@ class WorkersController extends Controller
80 67 });
81 68 }
82 69  
83   - $users = $users->Realuser()->paginate(15);
84   -
85   - /*
86   - $Arr = array();
87   - $where = '';
88   - $find_status_work = "";
89   - if (isset($request->status_work)) {
90   - $find_status_work = $request->status_work;
91   - //$users = $users->where('position_work', '=', $find_status_work);
92   - $where.= ' and (w.position_work = :uid1)';
93   - $Arr['uid1'] = $find_status_work;
94   - }
95   -
96   - $find_key = "";
97   - if (isset($request->find)) {
98   - $find_key = $request->find;
99   - /*$users = $users->where(function($query) use($find_key) {
100   - $query->Where('name_man', 'LIKE', "%$find_key%")
101   - ->orWhere('email', 'LIKE', "%$find_key%")
102   - ->orWhere('telephone', 'LIKE', "%$find_key%");
103   - });*/
104   - /*$where.= " and ((u.name_man LIKE %:uid2%) or (w.email LIKE %:uid2%) or (w.telephone LIKE %:uid2%))";
105   - $Arr['uid2'] = $find_key;
106   - }
107   -
108   - //$users = $users->paginate(15);
109   -
110   - //DB::enableQueryLog();
111   - $users = DB::select('SELECT u.*, w.*, j.*
112   - FROM workers w
113   - JOIN users u ON u.id = w.user_id
114   - JOIN job_titles j ON j.id = w.position_work
115   - Where (u.is_worker = 1)
116   - '.$where, $Arr);
117   - //dump(DB::getQueryLog());
118   - dd($users);
119   - */
  70 + $users = $users->orderByDesc('id')->Realuser()->paginate(15);
120 71  
121 72 $status_wor = $this->Status_work;
122 73  
resources/views/layout/pdf.blade.php
... ... @@ -98,12 +98,12 @@
98 98 }
99 99  
100 100 .main__table_experience td {
101   - width: 25% !important;
  101 + width: 5%;
102 102 hyphens: auto;
103 103 overflow: hidden;
104 104 }
105   - .main__table_experience body td:nth-child(1){
106   - width: 50% !important;
  105 + .main__table_experience td:first-child {
  106 + width: 80%;
107 107 }
108 108  
109 109 .main__table_three td:last-child {
... ... @@ -346,20 +346,19 @@
346 346 <table class="main__table main__table_experience">
347 347 <thead>
348 348 <tr>
349   - <th colspan="9">Опыт работы</th>
  349 + <th colspan="8">Опыт работы</th>
350 350 </tr>
351 351 </thead>
352 352 <tbody>
353 353 <tr>
354   - <td style="width: 20.1%;"><b>Должность</b></td>
355   - <td style="width: 11.1%;"><b>Название т/х</b></td>
356   - <td style="width: 11.1%;"><b>Тип судна</b></td>
357   - <td style="width: 11.1%;"><b>Марка ГД</b></td>
358   - <td style="width: 11.1%;"><b>Мощность ГД (кВТ)</b></td>
359   - <td style="width: 11.1%;"><b>Водо- измещение (DWT)</b></td>
360   - <td style="width: 11.1%;"><b>Название компании</b></td>
361   - <td style="width: 11.1%;"><b>Начало контракта</b></td>
362   - <td style="width: 11.1%;"><b>Окончание контракта</b></td>
  354 + <td><b>Должность</b></td>
  355 + <td><b>Название т/х</b></td>
  356 + <td><b>Тип судна</b></td>
  357 + <td><b>Марка ГД</b></td>
  358 + <td><b>Мощность ГД (кВТ)</b></td>
  359 + <td><b>Водо- измещение (DWT)</b></td>
  360 + <td><b>Название компании</b></td>
  361 + <td><b>Начало и окончание контракта</b></td>
363 362 </tr>
364 363 @if (count($Query[0]->place_worker) > 0)
365 364 @foreach($Query[0]->place_worker as $it)
... ... @@ -371,8 +370,11 @@
371 370 <td>{{ $it->KBT }}</td>
372 371 <td>{{ $it->GRT }}</td>
373 372 <td>{{ $it->name_company }}</td>
374   - <td>{{ date('d.m.Y', strtotime($it->begin_work)) }}</td>
375   - <td>{{ date('d.m.Y', strtotime($it->end_work)) }}</td>
  373 + <td>
  374 + {{ date('d.m.Y', strtotime($it->begin_work)) }}
  375 + -
  376 + {{ date('d.m.Y', strtotime($it->end_work)) }}
  377 + </td>
376 378 </tr>
377 379 @endforeach
378 380 @else
... ... @@ -384,7 +386,6 @@
384 386 <td>-</td>
385 387 <td>-</td>
386 388 <td>-</td>
387   - <td>-</td>
388 389 @endif
389 390 </tbody>
390 391 </table>
resources/views/worker.blade.php
... ... @@ -201,7 +201,7 @@
201 201 </div>
202 202  
203 203 <div class="main__spoiler">
204   - <button type="button" class="main__spoiler-toper js-toggle">Сертификаты / документы</button>
  204 + <button type="button" class="main__spoiler-toper js-toggle active">Сертификаты / документы</button>
205 205 <div class="main__spoiler-body">
206 206  
207 207 @if (isset($Query[0]->sertificate))
... ... @@ -226,7 +226,7 @@
226 226 </div>
227 227  
228 228 <div class="main__spoiler">
229   - <button type="button" class="main__spoiler-toper js-toggle">Дополнительные документы</button>
  229 + <button type="button" class="main__spoiler-toper js-toggle active">Дополнительные документы</button>
230 230 <div class="main__spoiler-body">
231 231 @if ($infoblocks->count())
232 232 <table class="main__table">
... ... @@ -268,7 +268,7 @@
268 268 </div>
269 269  
270 270 <div class="main__spoiler">
271   - <button type="button" class="main__spoiler-toper js-toggle">Опыт работы</button>
  271 + <button type="button" class="main__spoiler-toper js-toggle active">Опыт работы</button>
272 272 <div class="main__spoiler-body">
273 273  
274 274 @if (isset($Query[0]->place_worker))
... ... @@ -307,7 +307,7 @@
307 307 </div>
308 308  
309 309 <div class="main__spoiler">
310   - <button type="button" class="main__spoiler-toper js-toggle">Данные о прошлых компаниях</button>
  310 + <button type="button" class="main__spoiler-toper js-toggle active">Данные о прошлых компаниях</button>
311 311 <div class="main__spoiler-body">
312 312 @if ((isset($worker->prev_company)) && ($worker->prev_company->count()))
313 313 <table class="main__table">
... ... @@ -339,7 +339,7 @@
339 339 @if (App\Classes\StatusUser::Status()==0)
340 340 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
341 341 <div class="main__resume-profile-about-buttons flex width100">
342   - <button type="button" class="like js-toggle mr-10 js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($Query[0]) }}"
  342 + <button type="button" class="like js-toggle active mr-10 js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($Query[0]) }}"
343 343 name="footer-like-button"
344 344 >
345 345 <svg class="mr-10">