Commit 84f2ac341a61a40b87f57aed1952d5cea4239ab5

Authored by Сергей П
1 parent 1c55e51e33
Exists in master

Задачи 42,43,50

Showing 3 changed files with 24 additions and 72 deletions Inline Diff

app/Http/Controllers/Admin/WorkersController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers\Admin; 3 namespace App\Http\Controllers\Admin;
4 4
5 use App\Http\Controllers\Controller; 5 use App\Http\Controllers\Controller;
6 use App\Http\Requests\WorkerRequest; 6 use App\Http\Requests\WorkerRequest;
7 use App\Models\Company; 7 use App\Models\Company;
8 use App\Models\Job_title; 8 use App\Models\Job_title;
9 use App\Models\Static_worker; 9 use App\Models\Static_worker;
10 use App\Models\User; 10 use App\Models\User;
11 use App\Models\Worker; 11 use App\Models\Worker;
12 use Carbon\Carbon; 12 use Carbon\Carbon;
13 use Illuminate\Database\Eloquent\Builder; 13 use Illuminate\Database\Eloquent\Builder;
14 use Illuminate\Http\Request; 14 use Illuminate\Http\Request;
15 use Illuminate\Support\Facades\DB; 15 use Illuminate\Support\Facades\DB;
16 use Illuminate\Support\Facades\Storage; 16 use Illuminate\Support\Facades\Storage;
17 use Illuminate\Support\Facades\Validator; 17 use Illuminate\Support\Facades\Validator;
18 18
19 class WorkersController extends Controller 19 class WorkersController extends Controller
20 { 20 {
21 21
22 public $Status_work = [ 22 public $Status_work = [
23 '0' => 'Не ищу работу', 23 '0' => 'Не ищу работу',
24 '1' => 'Ищу работу', 24 '1' => 'Ищу работу',
25 '2' => 'Не указано' 25 '2' => 'Не указано'
26 ]; 26 ];
27 27
28 public function index(Request $request) { 28 public function index(Request $request) {
29 if ($request->ajax()) { 29 if ($request->ajax()) {
30 $user = User::find($request->id); 30 $user = User::find($request->id);
31 $request->offsetUnset('id'); 31 $request->offsetUnset('id');
32 $user->update($request->all()); 32 $user->update($request->all());
33 } 33 }
34 34
35 $status_work = Job_title::query()->active()->orderBy('name')->get(); 35 $status_work = Job_title::query()->active()->orderBy('name')->get();
36 $users = User::with('jobtitles')->worker()->realuser(); 36 $users = User::with('jobtitles')->worker()->realuser();
37 $all_worker = $users->count(); 37 $all_worker = $users->count();
38 38
39 $find_status_work = ""; 39 $find_status_work = "";
40 if (isset($request->status_work)) { 40 if (isset($request->status_work)) {
41 $find_status_work = $request->status_work; 41 $find_status_work = $request->status_work;
42 //$users = $users->where('position_work', '=', $find_status_work); 42
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 });*/
56 if ($request->status_work > 0) { 43 if ($request->status_work > 0) {
57 $users = $users->with('workers')-> 44 $users = $users->with('workers')->
58 whereHas('workers', 45 whereHas('workers',
59 function (Builder $query) use ($find_status_work) { 46 function (Builder $query) use ($find_status_work) {
60 $query->where('position_work', $find_status_work); 47 $query->where('position_work', $find_status_work);
61 } 48 }
62 ); 49 );
63 } else { 50 } else {
64 $users = $users->with('workers'); 51 $users = $users->with('workers');
65 } 52 }
66 53
67 } else { 54 } else {
68 $users = $users->with('workers'); 55 $users = $users->with('workers');
69 } 56 }
70 57
71 $find_key = ""; 58 $find_key = "";
72 if (isset($request->find)) { 59 if (isset($request->find)) {
73 $find_key = $request->find; 60 $find_key = $request->find;
74 $users = $users->where(function($query) use($find_key) { 61 $users = $users->where(function($query) use($find_key) {
75 $query->Where('name_man', 'LIKE', "%$find_key%") 62 $query->Where('name_man', 'LIKE', "%$find_key%")
76 ->orWhere('email', 'LIKE', "%$find_key%") 63 ->orWhere('email', 'LIKE', "%$find_key%")
77 ->orWhere('telephone', 'LIKE', "%$find_key%") 64 ->orWhere('telephone', 'LIKE', "%$find_key%")
78 ->orWhere('surname', 'LIKE', "%$find_key%") 65 ->orWhere('surname', 'LIKE', "%$find_key%")
79 ->orWhere('surname2', 'LIKE', "%$find_key%"); 66 ->orWhere('surname2', 'LIKE', "%$find_key%");
80 }); 67 });
81 } 68 }
82 69
83 $users = $users->Realuser()->paginate(15); 70 $users = $users->orderByDesc('id')->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 */
120 71
121 $status_wor = $this->Status_work; 72 $status_wor = $this->Status_work;
122 73
123 if ($request->ajax()) { 74 if ($request->ajax()) {
124 return view('admin.worker.index_ajax', compact('users', 'status_wor')); 75 return view('admin.worker.index_ajax', compact('users', 'status_wor'));
125 } else { 76 } else {
126 return view('admin.worker.index', compact('users', 77 return view('admin.worker.index', compact('users',
127 'find_key', 78 'find_key',
128 'find_status_work', 79 'find_status_work',
129 'status_work', 80 'status_work',
130 'status_wor', 81 'status_wor',
131 'all_worker')); 82 'all_worker'));
132 } 83 }
133 } 84 }
134 85
135 public function form_add_worker(User $user) { 86 public function form_add_worker(User $user) {
136 $job_titles = Job_title::query()->active()->orderBy('name')->get(); 87 $job_titles = Job_title::query()->active()->orderBy('name')->get();
137 88
138 $time_end_anketa = 'Создана только'; 89 $time_end_anketa = 'Создана только';
139 $long_days = Company::find(1)->time_resume; 90 $long_days = Company::find(1)->time_resume;
140 $time_end_anketa = date("d.m.Y H:i:s", strtotime(Carbon::now() . "+$long_days days")); 91 $time_end_anketa = date("d.m.Y H:i:s", strtotime(Carbon::now() . "+$long_days days"));
141 92
142 return view('admin.worker.add', compact('user', 'job_titles', 'time_end_anketa')); 93 return view('admin.worker.add', compact('user', 'job_titles', 'time_end_anketa'));
143 } 94 }
144 95
145 public function form_store_worker(WorkerRequest $request, User $user) { 96 public function form_store_worker(WorkerRequest $request, User $user) {
146 $params = $request->all(); 97 $params = $request->all();
147 $worker = Worker::create($params); 98 $worker = Worker::create($params);
148 return redirect()->route('admin.basedata'); 99 return redirect()->route('admin.basedata');
149 } 100 }
150 101
151 public function form_edit_worker(Worker $worker) { 102 public function form_edit_worker(Worker $worker) {
152 $job_titles = Job_title::query()->active()->orderBy('name')->get(); 103 $job_titles = Job_title::query()->active()->orderBy('name')->get();
153 104
154 $time_end_anketa = 'Бессрочно'; 105 $time_end_anketa = 'Бессрочно';
155 if (!empty($worker->updated_at)) { 106 if (!empty($worker->updated_at)) {
156 $long_days = Company::find(1)->time_resume; 107 $long_days = Company::find(1)->time_resume;
157 $time_end_anketa = date("d.m.Y H:i:s", strtotime($worker->updated_at . "+$long_days days")); 108 $time_end_anketa = date("d.m.Y H:i:s", strtotime($worker->updated_at . "+$long_days days"));
158 } 109 }
159 return view('admin.worker.edit', compact('worker', 'job_titles', 'time_end_anketa')); 110 return view('admin.worker.edit', compact('worker', 'job_titles', 'time_end_anketa'));
160 } 111 }
161 112
162 public function form_update_worker(Request $request, Worker $worker) 113 public function form_update_worker(Request $request, Worker $worker)
163 { 114 {
164 $params = $request->all(); 115 $params = $request->all();
165 116
166 $rules = [ 117 $rules = [
167 'email' => 'email|string|max:255', 118 'email' => 'email|string|max:255',
168 //'photo' => 'mimes:jpeg,jpg,png|max:15000', 119 //'photo' => 'mimes:jpeg,jpg,png|max:15000',
169 ]; 120 ];
170 121
171 $messages = [ 122 $messages = [
172 'required' => 'Укажите обязательное поле «:attribute»', 123 'required' => 'Укажите обязательное поле «:attribute»',
173 'confirmed' => 'Пароли не совпадают', 124 'confirmed' => 'Пароли не совпадают',
174 'email' => 'Введите корректный email', 125 'email' => 'Введите корректный email',
175 'min' => [ 126 'min' => [
176 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 127 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
177 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 128 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
178 ], 129 ],
179 'max' => [ 130 'max' => [
180 'string' => 'Поле «:attribute» должно быть не больше :max символов', 131 'string' => 'Поле «:attribute» должно быть не больше :max символов',
181 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 132 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
182 ], 133 ],
183 ]; 134 ];
184 135
185 $validator = Validator::make($params, $rules, $messages); 136 $validator = Validator::make($params, $rules, $messages);
186 137
187 if ($validator->fails()) { 138 if ($validator->fails()) {
188 return back()->withErrors($validator)->withInput(); 139 return back()->withErrors($validator)->withInput();
189 } else { 140 } else {
190 $user_id = $worker->user_id; 141 $user_id = $worker->user_id;
191 if ($request->has('photo')) { 142 if ($request->has('photo')) {
192 if (!empty($worker->photo)) { 143 if (!empty($worker->photo)) {
193 Storage::delete($worker->photo); 144 Storage::delete($worker->photo);
194 } 145 }
195 if (!empty($request->photo)) 146 if (!empty($request->photo))
196 $params['photo'] = $request->file('photo')->store("workers/$user_id", 'public'); 147 $params['photo'] = $request->file('photo')->store("workers/$user_id", 'public');
197 } 148 }
198 $worker->update($params); 149 $worker->update($params);
199 150
200 return redirect()->route('admin.workers'); 151 return redirect()->route('admin.workers');
201 } 152 }
202 } 153 }
203 154
204 // кабинет - статистика работников 155 // кабинет - статистика работников
205 public function static_workers(Request $request) { 156 public function static_workers(Request $request) {
206 $stat = Static_worker::with('users'); 157 $stat = Static_worker::with('users');
207 //->join('users', 'users.id', '=', 'static_workers.user_id'); 158 //->join('users', 'users.id', '=', 'static_workers.user_id');
208 $users = User::query()->active()->OrderBy('id')->get(); 159 $users = User::query()->active()->OrderBy('id')->get();
209 $periods = Static_worker::query()->distinct('year_month')->select('year_month')->get(); 160 $periods = Static_worker::query()->distinct('year_month')->select('year_month')->get();
210 if ($request->ajax()) { 161 if ($request->ajax()) {
211 if (isset($request->user_id)) 162 if (isset($request->user_id))
212 if (!$request->user_id == "0") 163 if (!$request->user_id == "0")
213 $stat = $stat->Where('user_id', '=', $request->user_id); 164 $stat = $stat->Where('user_id', '=', $request->user_id);
214 if (isset($request->year_month)) { 165 if (isset($request->year_month)) {
215 if (!$request->year_month == "0") 166 if (!$request->year_month == "0")
216 $stat = $stat->Where('year_month', '=', $request->year_month); 167 $stat = $stat->Where('year_month', '=', $request->year_month);
217 } 168 }
218 } 169 }
219 170
220 $stat = $stat->OrderByDesc('year_month'); 171 $stat = $stat->OrderByDesc('year_month');
221 //->OrderBy('users.name'); 172 //->OrderBy('users.name');
222 //OrderBy('users.name')-> 173 //OrderBy('users.name')->
223 /*$stat->implode() loadMissing(['users' => function (Builder $query) { 174 /*$stat->implode() loadMissing(['users' => function (Builder $query) {
224 $query->orderBy('name', 'asc'); 175 $query->orderBy('name', 'asc');
225 }]);*/ 176 }]);*/
226 177
227 $stat = $stat->paginate(15); 178 $stat = $stat->paginate(15);
228 179
229 if ($request->ajax()) 180 if ($request->ajax())
230 return view('admin.static.index_workers_ajax', compact('stat')); 181 return view('admin.static.index_workers_ajax', compact('stat'));
231 else 182 else
232 return view('admin.static.index_workers', compact('stat', 'users', 'periods')); 183 return view('admin.static.index_workers', compact('stat', 'users', 'periods'));
233 184
234 } 185 }
235 186
236 } 187 }
237 188
resources/views/layout/pdf.blade.php
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="ru"> 2 <html lang="ru">
3 3
4 @php 4 @php
5 $worker = $Query[0]; 5 $worker = $Query[0];
6 @endphp 6 @endphp
7 7
8 <head> 8 <head>
9 <meta charset="utf-8"> 9 <meta charset="utf-8">
10 <title>Резюме соискателя</title> 10 <title>Резюме соискателя</title>
11 <meta name="viewport" content="width=device-width,initial-scale=1"> 11 <meta name="viewport" content="width=device-width,initial-scale=1">
12 <meta name="theme-color" content="#377D87"> 12 <meta name="theme-color" content="#377D87">
13 <style> 13 <style>
14 body { 14 body {
15 font-family:'DejaVu Sans',sans-serif; 15 font-family:'DejaVu Sans',sans-serif;
16 background:#fff; 16 background:#fff;
17 font-size:1.6rem; 17 font-size:1.6rem;
18 font-weight:400; 18 font-weight:400;
19 color:#363A3F; 19 color:#363A3F;
20 } 20 }
21 21
22 .main { 22 .main {
23 padding: 30px 0; 23 padding: 30px 0;
24 } 24 }
25 25
26 .thing { 26 .thing {
27 color: #3a3b3c; 27 color: #3a3b3c;
28 } 28 }
29 29
30 .thing__profile-photo { 30 .thing__profile-photo {
31 width: 200px; 31 width: 200px;
32 border-radius: 8px; 32 border-radius: 8px;
33 float: left; 33 float: left;
34 margin-right: 20px; 34 margin-right: 20px;
35 } 35 }
36 36
37 .thing__title { 37 .thing__title {
38 width: 100%; 38 width: 100%;
39 font-size: 32px; 39 font-size: 32px;
40 font-weight: 700; 40 font-weight: 700;
41 line-height: 1.1; 41 line-height: 1.1;
42 margin: 0; 42 margin: 0;
43 } 43 }
44 44
45 .thing__text { 45 .thing__text {
46 font-size: 14px; 46 font-size: 14px;
47 line-height: 1.4; 47 line-height: 1.4;
48 margin: 15px 0 0 0; 48 margin: 15px 0 0 0;
49 } 49 }
50 50
51 .main__spoiler { 51 .main__spoiler {
52 margin: 0px 0px 32px 0px; 52 margin: 0px 0px 32px 0px;
53 } 53 }
54 54
55 .main__table { 55 .main__table {
56 border-collapse: collapse; 56 border-collapse: collapse;
57 table-layout: fixed; 57 table-layout: fixed;
58 font-size: 14px; 58 font-size: 14px;
59 width: 100%; 59 width: 100%;
60 background: #ffffff; 60 background: #ffffff;
61 } 61 }
62 62
63 .main__table thead { 63 .main__table thead {
64 color: #ffffff; 64 color: #ffffff;
65 font-size: 16px; 65 font-size: 16px;
66 background-color: #377d87; 66 background-color: #377d87;
67 } 67 }
68 68
69 .main__table th { 69 .main__table th {
70 padding: 8px 16px; 70 padding: 8px 16px;
71 } 71 }
72 72
73 .main__table td { 73 .main__table td {
74 width: 40%; 74 width: 40%;
75 padding: 8px 16px; 75 padding: 8px 16px;
76 border: 1px solid #cecece; 76 border: 1px solid #cecece;
77 } 77 }
78 78
79 .main__table td b { 79 .main__table td b {
80 font-weight: 700; 80 font-weight: 700;
81 } 81 }
82 82
83 .main__table b { 83 .main__table b {
84 display: block; 84 display: block;
85 } 85 }
86 86
87 .main__table a { 87 .main__table a {
88 color: #377d87; 88 color: #377d87;
89 text-decoration: underline; 89 text-decoration: underline;
90 } 90 }
91 91
92 .main__table td + td { 92 .main__table td + td {
93 width: 60%; 93 width: 60%;
94 } 94 }
95 95
96 .main__table_three td { 96 .main__table_three td {
97 width: 25% !important; 97 width: 25% !important;
98 } 98 }
99 99
100 .main__table_experience td { 100 .main__table_experience td {
101 width: 25% !important; 101 width: 5%;
102 hyphens: auto; 102 hyphens: auto;
103 overflow: hidden; 103 overflow: hidden;
104 } 104 }
105 .main__table_experience body td:nth-child(1){ 105 .main__table_experience td:first-child {
106 width: 50% !important; 106 width: 80%;
107 } 107 }
108 108
109 .main__table_three td:last-child { 109 .main__table_three td:last-child {
110 width: 50% !important; 110 width: 50% !important;
111 } 111 }
112 112
113 .main h2 { 113 .main h2 {
114 margin: 0; 114 margin: 0;
115 font-weight: 700; 115 font-weight: 700;
116 font-size: 30px; 116 font-size: 30px;
117 } 117 }
118 118
119 .main p { 119 .main p {
120 margin: 0; 120 margin: 0;
121 font-size: 14px; 121 font-size: 14px;
122 line-height: 1.4; 122 line-height: 1.4;
123 margin: 15px 0 0 0; 123 margin: 15px 0 0 0;
124 } 124 }
125 125
126 .main__resume-profile-info-body-inner li { 126 .main__resume-profile-info-body-inner li {
127 list-style-type: none; 127 list-style-type: none;
128 margin: 0px 0px 20px 0px; 128 margin: 0px 0px 20px 0px;
129 } 129 }
130 130
131 .main__resume-profile-info-body-inner b { 131 .main__resume-profile-info-body-inner b {
132 display: block; 132 display: block;
133 margin: 0px 0px 6px 0px; 133 margin: 0px 0px 6px 0px;
134 color: #377d87; 134 color: #377d87;
135 font-size: 14px; 135 font-size: 14px;
136 } 136 }
137 137
138 .main__resume-profile-info-body-inner span { 138 .main__resume-profile-info-body-inner span {
139 display: block; 139 display: block;
140 } 140 }
141 141
142 .main__resume-profile-info-body-inner a { 142 .main__resume-profile-info-body-inner a {
143 display: block; 143 display: block;
144 text-decoration: none; 144 text-decoration: none;
145 color: inherit; 145 color: inherit;
146 } 146 }
147 147
148 </style> 148 </style>
149 </head> 149 </head>
150 150
151 <body id="body" class="pdf"> 151 <body id="body" class="pdf">
152 <section class="thing thing_pdf"> 152 <section class="thing thing_pdf">
153 <div class="container"> 153 <div class="container">
154 <div class="thing__profile"> 154 <div class="thing__profile">
155 @if (!empty($Query[0]['photo'])) 155 @if (!empty($Query[0]['photo']))
156 <img src="{{ asset(Storage::url($Query[0]['photo'])) }}" alt="" class="thing__profile-photo"> 156 <img src="{{ asset(Storage::url($Query[0]['photo'])) }}" alt="" class="thing__profile-photo">
157 @else 157 @else
158 <img src="{{ asset('images/default_man.jpg') }}" alt="" class="thing__profile-photo"> 158 <img src="{{ asset('images/default_man.jpg') }}" alt="" class="thing__profile-photo">
159 @endif 159 @endif
160 <div class="thing__profile-body"> 160 <div class="thing__profile-body">
161 <h1 class="thing__title">{{ $Query[0]['users']['surname']." ".$Query[0]['users']['name_man']." ".$Query[0]['users']['surname2'] }}</h1> 161 <h1 class="thing__title">{{ $Query[0]['users']['surname']." ".$Query[0]['users']['name_man']." ".$Query[0]['users']['surname2'] }}</h1>
162 <div style="clear:both;"></div> 162 <div style="clear:both;"></div>
163 <p class="thing__text">{{ $Query[0]['text'] }}</p> 163 <p class="thing__text">{{ $Query[0]['text'] }}</p>
164 </div> 164 </div>
165 </div> 165 </div>
166 @if (!empty($Query[0]['users']['file'])) 166 @if (!empty($Query[0]['users']['file']))
167 <a href="{{ asset(Storage::url($Query[0]['users']['file'])) }}">Анкета-файл</a> 167 <a href="{{ asset(Storage::url($Query[0]['users']['file'])) }}">Анкета-файл</a>
168 @endif 168 @endif
169 </div> 169 </div>
170 </section> 170 </section>
171 <main class="main"> 171 <main class="main">
172 <div class="container"> 172 <div class="container">
173 <div class="main__resume-profile"> 173 <div class="main__resume-profile">
174 <div class="main__content"> 174 <div class="main__content">
175 <div class="main__spoiler"> 175 <div class="main__spoiler">
176 <div class="main__spoiler-body"> 176 <div class="main__spoiler-body">
177 <table class="main__table"> 177 <table class="main__table">
178 <thead> 178 <thead>
179 <tr> 179 <tr>
180 <th colspan="2">Основная информация</th> 180 <th colspan="2">Основная информация</th>
181 </tr> 181 </tr>
182 </thead> 182 </thead>
183 <tbody> 183 <tbody>
184 <tr> 184 <tr>
185 <td><b>Статус:</b></td> 185 <td><b>Статус:</b></td>
186 <td>{{ $status_work[$worker->status_work] }}</td> 186 <td>{{ $status_work[$worker->status_work] }}</td>
187 </tr> 187 </tr>
188 <tr> 188 <tr>
189 <td><b>ФИО:</b></td> 189 <td><b>ФИО:</b></td>
190 <td>{{ $worker->users->surname." ".$worker->users->name_man." ".$worker->users->surname2 }}</td> 190 <td>{{ $worker->users->surname." ".$worker->users->name_man." ".$worker->users->surname2 }}</td>
191 </tr> 191 </tr>
192 <tr> 192 <tr>
193 <td><b>Возраст:</b></td> 193 <td><b>Возраст:</b></td>
194 <td>{{ $worker->old_year ?? '-' }}</td> 194 <td>{{ $worker->old_year ?? '-' }}</td>
195 </tr> 195 </tr>
196 <tr> 196 <tr>
197 <td><b>Желаемые вакансии:</b></td> 197 <td><b>Желаемые вакансии:</b></td>
198 <td> 198 <td>
199 @if ($Query[0]->job_titles->count()) 199 @if ($Query[0]->job_titles->count())
200 @foreach ($Query[0]->job_titles as $it) 200 @foreach ($Query[0]->job_titles as $it)
201 @if ($it->is_remove == 0) 201 @if ($it->is_remove == 0)
202 {{ $it->name }} / 202 {{ $it->name }} /
203 @endif 203 @endif
204 @endforeach 204 @endforeach
205 @else 205 @else
206 - 206 -
207 @endif 207 @endif
208 </td> 208 </td>
209 </tr> 209 </tr>
210 <tr> 210 <tr>
211 <td><b>Пожелания по З/П:</b></td> 211 <td><b>Пожелания по З/П:</b></td>
212 <td>{{ $worker->salary_expectations ?? '-' }}</td> 212 <td>{{ $worker->salary_expectations ?? '-' }}</td>
213 </tr> 213 </tr>
214 <tr> 214 <tr>
215 <td><b>Опыт работы:</b></td> 215 <td><b>Опыт работы:</b></td>
216 <td>{{ $worker->experience ?? '-' }}</td> 216 <td>{{ $worker->experience ?? '-' }}</td>
217 </tr> 217 </tr>
218 <tr> 218 <tr>
219 <td><b>Уровень английского:</b></td> 219 <td><b>Уровень английского:</b></td>
220 <td>{{ $worker->english_level ?? '-' }}</td> 220 <td>{{ $worker->english_level ?? '-' }}</td>
221 </tr> 221 </tr>
222 <tr> 222 <tr>
223 <td><b>Дата готовности к посадке:</b></td> 223 <td><b>Дата готовности к посадке:</b></td>
224 <td>{{ $worker->ready_boart_date ?? '-' }}</td> 224 <td>{{ $worker->ready_boart_date ?? '-' }}</td>
225 </tr> 225 </tr>
226 <tr> 226 <tr>
227 <td><b>Предпочтение по типу судна:</b></td> 227 <td><b>Предпочтение по типу судна:</b></td>
228 <td>{{ $worker->boart_type_preference ?? '-' }}</td> 228 <td>{{ $worker->boart_type_preference ?? '-' }}</td>
229 </tr> 229 </tr>
230 <tr> 230 <tr>
231 <td><b>Наличие визы:</b></td> 231 <td><b>Наличие визы:</b></td>
232 <td>{{ $worker->visa_available ?? '-' }}</td> 232 <td>{{ $worker->visa_available ?? '-' }}</td>
233 </tr> 233 </tr>
234 <tr> 234 <tr>
235 <td><b>Наличие танкерных документов:</b></td> 235 <td><b>Наличие танкерных документов:</b></td>
236 <td>{{ $worker->tanker_documents_available ?? '-' }}</td> 236 <td>{{ $worker->tanker_documents_available ?? '-' }}</td>
237 </tr> 237 </tr>
238 <tr> 238 <tr>
239 <td><b>Наличие подтверждения для работы на ВВП:</b></td> 239 <td><b>Наличие подтверждения для работы на ВВП:</b></td>
240 <td>{{ $worker->confirmation_work_for_vvp ?? '-' }}</td> 240 <td>{{ $worker->confirmation_work_for_vvp ?? '-' }}</td>
241 </tr> 241 </tr>
242 <tr> 242 <tr>
243 <td><b>Наличие военного билета / приписного свидетельства:</b></td> 243 <td><b>Наличие военного билета / приписного свидетельства:</b></td>
244 <td>{{ $worker->military_id_available ?? '-' }}</td> 244 <td>{{ $worker->military_id_available ?? '-' }}</td>
245 </tr> 245 </tr>
246 <tr> 246 <tr>
247 <td><b>Город проживания:</b></td> 247 <td><b>Город проживания:</b></td>
248 <td>{{ $worker->city ?? '-' }}</td> 248 <td>{{ $worker->city ?? '-' }}</td>
249 </tr> 249 </tr>
250 <tr> 250 <tr>
251 <td><b>Телефон:</b></td> 251 <td><b>Телефон:</b></td>
252 <td>{{ $worker->telephone ?? '-' }}</td> 252 <td>{{ $worker->telephone ?? '-' }}</td>
253 </tr> 253 </tr>
254 <tr> 254 <tr>
255 <td><b>E-mail:</b></td> 255 <td><b>E-mail:</b></td>
256 <td>{{ $worker->email ?? '-' }}</td> 256 <td>{{ $worker->email ?? '-' }}</td>
257 </tr> 257 </tr>
258 <tr> 258 <tr>
259 <td><b>Контакты родственников:</b></td> 259 <td><b>Контакты родственников:</b></td>
260 <td>{{ $worker->telephone2 ?? '-' }}</td> 260 <td>{{ $worker->telephone2 ?? '-' }}</td>
261 </tr> 261 </tr>
262 </tbody> 262 </tbody>
263 </table> 263 </table>
264 </div> 264 </div>
265 </div> 265 </div>
266 266
267 <div class="main__spoiler"> 267 <div class="main__spoiler">
268 <div class="main__spoiler-body"> 268 <div class="main__spoiler-body">
269 <table class="main__table"> 269 <table class="main__table">
270 <thead> 270 <thead>
271 <tr> 271 <tr>
272 <th colspan="2">Сертификаты / документы</th> 272 <th colspan="2">Сертификаты / документы</th>
273 </tr> 273 </tr>
274 </thead> 274 </thead>
275 <tbody> 275 <tbody>
276 <tr> 276 <tr>
277 <td><b>Название сертификата:</b></td> 277 <td><b>Название сертификата:</b></td>
278 <td><b>Действителен до:</b></td> 278 <td><b>Действителен до:</b></td>
279 </tr> 279 </tr>
280 @if (isset($Query[0]->sertificate) && $Query[0]->sertificate->count()) 280 @if (isset($Query[0]->sertificate) && $Query[0]->sertificate->count())
281 @foreach($Query[0]->sertificate as $it) 281 @foreach($Query[0]->sertificate as $it)
282 <tr> 282 <tr>
283 <td>{{ $it->name }}</td> 283 <td>{{ $it->name }}</td>
284 <td>{{ date('d.m.Y', strtotime($it->end_begin)) }}</td> 284 <td>{{ date('d.m.Y', strtotime($it->end_begin)) }}</td>
285 </tr> 285 </tr>
286 @endforeach 286 @endforeach
287 @else 287 @else
288 <tr> 288 <tr>
289 <td> - </td> 289 <td> - </td>
290 <td> - </td> 290 <td> - </td>
291 </tr> 291 </tr>
292 @endif 292 @endif
293 </tbody> 293 </tbody>
294 </table> 294 </table>
295 </div> 295 </div>
296 </div> 296 </div>
297 297
298 <div class="main__spoiler"> 298 <div class="main__spoiler">
299 <div class="main__spoiler-body"> 299 <div class="main__spoiler-body">
300 <table class="main__table"> 300 <table class="main__table">
301 <thead> 301 <thead>
302 <tr> 302 <tr>
303 <th colspan="2">Дополнительные документы</th> 303 <th colspan="2">Дополнительные документы</th>
304 </tr> 304 </tr>
305 </thead> 305 </thead>
306 <tbody> 306 <tbody>
307 @if ($infoblocks->count()) 307 @if ($infoblocks->count())
308 @foreach ($infoblocks as $info) 308 @foreach ($infoblocks as $info)
309 @php $finder = false; @endphp 309 @php $finder = false; @endphp
310 @if (isset($Query[0]->infobloks)) 310 @if (isset($Query[0]->infobloks))
311 @if ($Query[0]->infobloks->count()) 311 @if ($Query[0]->infobloks->count())
312 312
313 @foreach($Query[0]->infobloks as $it) 313 @foreach($Query[0]->infobloks as $it)
314 @if ($info->id == $it->id) 314 @if ($info->id == $it->id)
315 <tr> 315 <tr>
316 <td><b>{{ $it->name }}</b></td> 316 <td><b>{{ $it->name }}</b></td>
317 <td> 317 <td>
318 @if ($it->model_dop_info[0]->status == 0) Не указано 318 @if ($it->model_dop_info[0]->status == 0) Не указано
319 @elseif($it->model_dop_info[0]->status==1) В наличии 319 @elseif($it->model_dop_info[0]->status==1) В наличии
320 @else Отсутствует 320 @else Отсутствует
321 @endif 321 @endif
322 </td> 322 </td>
323 </tr> 323 </tr>
324 @php $finder = true; @endphp 324 @php $finder = true; @endphp
325 @endif 325 @endif
326 @endforeach 326 @endforeach
327 @endif 327 @endif
328 @endif 328 @endif
329 @if (!$finder) 329 @if (!$finder)
330 <tr> 330 <tr>
331 <td><b>{{ $info->name }}</b></td> 331 <td><b>{{ $info->name }}</b></td>
332 <td> 332 <td>
333 Не указано 333 Не указано
334 </td> 334 </td>
335 </tr> 335 </tr>
336 @endif 336 @endif
337 @endforeach 337 @endforeach
338 @endif 338 @endif
339 </tbody> 339 </tbody>
340 </table> 340 </table>
341 </div> 341 </div>
342 </div> 342 </div>
343 343
344 <div class="main__spoiler"> 344 <div class="main__spoiler">
345 <div class="main__spoiler-body"> 345 <div class="main__spoiler-body">
346 <table class="main__table main__table_experience"> 346 <table class="main__table main__table_experience">
347 <thead> 347 <thead>
348 <tr> 348 <tr>
349 <th colspan="9">Опыт работы</th> 349 <th colspan="8">Опыт работы</th>
350 </tr> 350 </tr>
351 </thead> 351 </thead>
352 <tbody> 352 <tbody>
353 <tr> 353 <tr>
354 <td style="width: 20.1%;"><b>Должность</b></td> 354 <td><b>Должность</b></td>
355 <td style="width: 11.1%;"><b>Название т/х</b></td> 355 <td><b>Название т/х</b></td>
356 <td style="width: 11.1%;"><b>Тип судна</b></td> 356 <td><b>Тип судна</b></td>
357 <td style="width: 11.1%;"><b>Марка ГД</b></td> 357 <td><b>Марка ГД</b></td>
358 <td style="width: 11.1%;"><b>Мощность ГД (кВТ)</b></td> 358 <td><b>Мощность ГД (кВТ)</b></td>
359 <td style="width: 11.1%;"><b>Водо- измещение (DWT)</b></td> 359 <td><b>Водо- измещение (DWT)</b></td>
360 <td style="width: 11.1%;"><b>Название компании</b></td> 360 <td><b>Название компании</b></td>
361 <td style="width: 11.1%;"><b>Начало контракта</b></td> 361 <td><b>Начало и окончание контракта</b></td>
362 <td style="width: 11.1%;"><b>Окончание контракта</b></td>
363 </tr> 362 </tr>
364 @if (count($Query[0]->place_worker) > 0) 363 @if (count($Query[0]->place_worker) > 0)
365 @foreach($Query[0]->place_worker as $it) 364 @foreach($Query[0]->place_worker as $it)
366 <tr> 365 <tr>
367 <td>{{ $it->job_title }}</td> 366 <td>{{ $it->job_title }}</td>
368 <td>{{ $it->teplohod }}</td> 367 <td>{{ $it->teplohod }}</td>
369 <td>{{ $it->GWT }}</td> 368 <td>{{ $it->GWT }}</td>
370 <td>{{ $it->Marka_GD }}</td> 369 <td>{{ $it->Marka_GD }}</td>
371 <td>{{ $it->KBT }}</td> 370 <td>{{ $it->KBT }}</td>
372 <td>{{ $it->GRT }}</td> 371 <td>{{ $it->GRT }}</td>
373 <td>{{ $it->name_company }}</td> 372 <td>{{ $it->name_company }}</td>
374 <td>{{ date('d.m.Y', strtotime($it->begin_work)) }}</td> 373 <td>
375 <td>{{ date('d.m.Y', strtotime($it->end_work)) }}</td> 374 {{ date('d.m.Y', strtotime($it->begin_work)) }}
375 -
376 {{ date('d.m.Y', strtotime($it->end_work)) }}
377 </td>
376 </tr> 378 </tr>
377 @endforeach 379 @endforeach
378 @else 380 @else
379 <td>-</td> 381 <td>-</td>
380 <td>-</td> 382 <td>-</td>
381 <td>-</td> 383 <td>-</td>
382 <td>-</td> 384 <td>-</td>
383 <td>-</td> 385 <td>-</td>
384 <td>-</td> 386 <td>-</td>
385 <td>-</td> 387 <td>-</td>
386 <td>-</td> 388 <td>-</td>
387 <td>-</td>
388 @endif 389 @endif
389 </tbody> 390 </tbody>
390 </table> 391 </table>
391 </div> 392 </div>
392 </div> 393 </div>
393 394
394 <div class="main__spoiler"> 395 <div class="main__spoiler">
395 <div class="main__spoiler-body"> 396 <div class="main__spoiler-body">
396 <table class="main__table main__table_three"> 397 <table class="main__table main__table_three">
397 <thead> 398 <thead>
398 <tr> 399 <tr>
399 <th colspan="4">Данные о прошлых компаниях</th> 400 <th colspan="4">Данные о прошлых компаниях</th>
400 </tr> 401 </tr>
401 </thead> 402 </thead>
402 <tbody> 403 <tbody>
403 <tr> 404 <tr>
404 <td><b>Название компании</b></td> 405 <td><b>Название компании</b></td>
405 <td><b>ФИО сотрудника</b></td> 406 <td><b>ФИО сотрудника</b></td>
406 <td><b>Должность сотрудника</b></td> 407 <td><b>Должность сотрудника</b></td>
407 <td><b>Телефон сотрудника</b></td> 408 <td><b>Телефон сотрудника</b></td>
408 </tr> 409 </tr>
409 @if ((isset($worker->prev_company)) && ($worker->prev_company->count())) 410 @if ((isset($worker->prev_company)) && ($worker->prev_company->count()))
410 @foreach ($worker->prev_company as $prev_company) 411 @foreach ($worker->prev_company as $prev_company)
411 <tr> 412 <tr>
412 <td>{{ $prev_company->name_company }}</td> 413 <td>{{ $prev_company->name_company }}</td>
413 <td>{{ $prev_company->direct }}</td> 414 <td>{{ $prev_company->direct }}</td>
414 <td>{{ $prev_company->telephone }}</td> 415 <td>{{ $prev_company->telephone }}</td>
415 <td>{{ $prev_company->telephone2 }}</td> 416 <td>{{ $prev_company->telephone2 }}</td>
416 </tr> 417 </tr>
417 @endforeach 418 @endforeach
418 @else 419 @else
419 <tr> 420 <tr>
420 <td>-</td> 421 <td>-</td>
421 <td>-</td> 422 <td>-</td>
422 <td>-</td> 423 <td>-</td>
423 <td>-</td> 424 <td>-</td>
424 </tr> 425 </tr>
425 @endif 426 @endif
426 </tbody> 427 </tbody>
427 </table> 428 </table>
428 </div> 429 </div>
429 </div> 430 </div>
430 </div> 431 </div>
431 </div> 432 </div>
432 </div> 433 </div>
433 </main> 434 </main>
434 </body> 435 </body>
resources/views/worker.blade.php
1 @extends('layout.frontend', ['title' => 'Карточка соискателя - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Карточка соискателя - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 $(function(){ 5 $(function(){
6 $('[name="footer-like-button"]').click(function(){ 6 $('[name="footer-like-button"]').click(function(){
7 $('[name="header-like-button"]').click(); 7 $('[name="header-like-button"]').click();
8 $(this).toggleClass('active'); 8 $(this).toggleClass('active');
9 }); 9 });
10 $('[name="header-like-button"]').click(function(){ 10 $('[name="header-like-button"]').click(function(){
11 $('[name="footer-like-button"]').toggleClass('active'); 11 $('[name="footer-like-button"]').toggleClass('active');
12 }); 12 });
13 }); 13 });
14 14
15 console.log('Test system'); 15 console.log('Test system');
16 $(document).on('change', '#jobs', function() { 16 $(document).on('change', '#jobs', function() {
17 var val = $(this).val(); 17 var val = $(this).val();
18 var main_oskar = $('#main_ockar'); 18 var main_oskar = $('#main_ockar');
19 19
20 console.log('Code='+val); 20 console.log('Code='+val);
21 console.log('Click change...'); 21 console.log('Click change...');
22 $.ajax({ 22 $.ajax({
23 type: "GET", 23 type: "GET",
24 url: "", 24 url: "",
25 data: "job="+val, 25 data: "job="+val,
26 success: function (data) { 26 success: function (data) {
27 console.log('Выбор сделан!'); 27 console.log('Выбор сделан!');
28 console.log(data); 28 console.log(data);
29 main_oskar.html(data); 29 main_oskar.html(data);
30 }, 30 },
31 headers: { 31 headers: {
32 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 32 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
33 }, 33 },
34 error: function (data) { 34 error: function (data) {
35 data = JSON.stringify(data); 35 data = JSON.stringify(data);
36 console.log('Error: ' + data); 36 console.log('Error: ' + data);
37 } 37 }
38 }); 38 });
39 }); 39 });
40 </script> 40 </script>
41 41
42 <script> 42 <script>
43 $(document).on('click', '.js_it_button', function() { 43 $(document).on('click', '.js_it_button', function() {
44 var this_ = $(this); 44 var this_ = $(this);
45 var code_user_id = this_.attr('data-uid'); 45 var code_user_id = this_.attr('data-uid');
46 var code_to_user_id = this_.attr('data-tuid'); 46 var code_to_user_id = this_.attr('data-tuid');
47 var code_vacancy = this_.attr('data-vacancy'); 47 var code_vacancy = this_.attr('data-vacancy');
48 var user_id = $('#_user_id'); 48 var user_id = $('#_user_id');
49 var to_user_id = $('#_to_user_id'); 49 var to_user_id = $('#_to_user_id');
50 var vacancy = $('#_vacancy'); 50 var vacancy = $('#_vacancy');
51 51
52 console.log('code_to_user_id='+code_to_user_id); 52 console.log('code_to_user_id='+code_to_user_id);
53 console.log('code_user_id='+code_user_id); 53 console.log('code_user_id='+code_user_id);
54 console.log('code_vacancy='+code_vacancy); 54 console.log('code_vacancy='+code_vacancy);
55 console.log('Клик на кнопке...'); 55 console.log('Клик на кнопке...');
56 56
57 user_id.val(code_user_id); 57 user_id.val(code_user_id);
58 to_user_id.val(code_to_user_id); 58 to_user_id.val(code_to_user_id);
59 vacancy.val(code_vacancy); 59 vacancy.val(code_vacancy);
60 }); 60 });
61 </script> 61 </script>
62 @include('js.favorite-worker') 62 @include('js.favorite-worker')
63 @endsection 63 @endsection
64 64
65 @section('content') 65 @section('content')
66 @php 66 @php
67 $worker = $Query[0]; 67 $worker = $Query[0];
68 @endphp 68 @endphp
69 <section class="thing"> 69 <section class="thing">
70 <div class="container"> 70 <div class="container">
71 <ul class="breadcrumbs thing__breadcrumbs"> 71 <ul class="breadcrumbs thing__breadcrumbs">
72 <li><a href="{{ route('index') }}">Главная</a></li> 72 <li><a href="{{ route('index') }}">Главная</a></li>
73 <li><a href="{{ route('bd_resume') }}">База резюме</a></li> 73 <li><a href="{{ route('bd_resume') }}">База резюме</a></li>
74 <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li> 74 <li><b>@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</b></li>
75 </ul> 75 </ul>
76 <div class="thing__profile"> 76 <div class="thing__profile">
77 <img src="@if (isset($Query[0]->photo)) {{ asset(Storage::url($Query[0]->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="main__resume-base-body-item-photo"> 77 <img src="@if (isset($Query[0]->photo)) {{ asset(Storage::url($Query[0]->photo)) }} @else {{ asset('images/default_man.jpg') }} @endif" alt="" class="main__resume-base-body-item-photo">
78 <div class="thing__profile-body"> 78 <div class="thing__profile-body">
79 <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1> 79 <h1 class="thing__title">@if (isset($Query[0]->users)) {{ $Query[0]->users->surname." ".$Query[0]->users->name_man." ".$Query[0]->users->surname2 }} @else Неизвестно @endif</h1>
80 <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены 80 <p class="thing__text">Сложно сказать, почему ключевые особенности структуры проекта рассмотрены
81 исключительно в разрезе маркетинговых и финансовых предпосылок.</p> 81 исключительно в разрезе маркетинговых и финансовых предпосылок.</p>
82 <div class="main__resume-profile-about-buttons thing__bottom"> 82 <div class="main__resume-profile-about-buttons thing__bottom">
83 <button type="button" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($Query[0]) }}" data-val="{{ $Query[0]->id }}" id="elem{{ $Query[0]->id }}" 83 <button type="button" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($Query[0]) }}" data-val="{{ $Query[0]->id }}" id="elem{{ $Query[0]->id }}"
84 name="header-like-button" 84 name="header-like-button"
85 > 85 >
86 <svg class="mr-10"> 86 <svg class="mr-10">
87 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 87 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
88 </svg> 88 </svg>
89 <span class="to-favorites">В избранное</span> 89 <span class="to-favorites">В избранное</span>
90 <span class="in-favorites">В избранном</span> 90 <span class="in-favorites">В избранном</span>
91 </button> 91 </button>
92 <div class="button button_light mr-10 main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot }}" data-tuid="{{ $Query[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'> 92 <div class="button button_light mr-10 main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot }}" data-tuid="{{ $Query[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
93 <svg> 93 <svg>
94 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 94 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
95 </svg> 95 </svg>
96 Написать 96 Написать
97 </div> 97 </div>
98 <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}" target="_blank"> 98 <a class="button" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}" target="_blank">
99 Скачать резюме 99 Скачать резюме
100 <svg> 100 <svg>
101 <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> 101 <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use>
102 </svg> 102 </svg>
103 </a> 103 </a>
104 </div> 104 </div>
105 </div> 105 </div>
106 </div> 106 </div>
107 </div> 107 </div>
108 </section> 108 </section>
109 <main class="main"> 109 <main class="main">
110 <div class="container"> 110 <div class="container">
111 <div class="main__resume-profile"> 111 <div class="main__resume-profile">
112 <div class="main__content"> 112 <div class="main__content">
113 <div class="main__spoiler"> 113 <div class="main__spoiler">
114 <button type="button" class="main__spoiler-toper js-toggle active"> 114 <button type="button" class="main__spoiler-toper js-toggle active">
115 Основная информация</button> 115 Основная информация</button>
116 116
117 <div class="main__spoiler-body"> 117 <div class="main__spoiler-body">
118 <table class="main__table"> 118 <table class="main__table">
119 <tbody> 119 <tbody>
120 <tr> 120 <tr>
121 <td><b>Статус:</b></td> 121 <td><b>Статус:</b></td>
122 <td>{{ $status_work[$worker->status_work] }}</td> 122 <td>{{ $status_work[$worker->status_work] }}</td>
123 </tr> 123 </tr>
124 <tr> 124 <tr>
125 <td><b>ФИО:</b></td> 125 <td><b>ФИО:</b></td>
126 <td>{{ $worker->users->surname." ".$worker->users->name_man." ".$worker->users->surname2 }}</td> 126 <td>{{ $worker->users->surname." ".$worker->users->name_man." ".$worker->users->surname2 }}</td>
127 </tr> 127 </tr>
128 <tr> 128 <tr>
129 <td><b>Возраст:</b></td> 129 <td><b>Возраст:</b></td>
130 <td>{{ $worker->old_year ?? '-' }}</td> 130 <td>{{ $worker->old_year ?? '-' }}</td>
131 </tr> 131 </tr>
132 <tr> 132 <tr>
133 <td><b>Желаемые вакансии:</b></td> 133 <td><b>Желаемые вакансии:</b></td>
134 <td> 134 <td>
135 @if ($Query[0]->job_titles->count()) 135 @if ($Query[0]->job_titles->count())
136 @foreach ($Query[0]->job_titles as $it) 136 @foreach ($Query[0]->job_titles as $it)
137 @if ($it->is_remove == 0) 137 @if ($it->is_remove == 0)
138 {{ $it->name }} / 138 {{ $it->name }} /
139 @endif 139 @endif
140 @endforeach 140 @endforeach
141 @else 141 @else
142 - 142 -
143 @endif 143 @endif
144 </td> 144 </td>
145 </tr> 145 </tr>
146 <tr> 146 <tr>
147 <td><b>Пожелания по З/П:</b></td> 147 <td><b>Пожелания по З/П:</b></td>
148 <td>{{ $worker->salary_expectations ?? '-' }}</td> 148 <td>{{ $worker->salary_expectations ?? '-' }}</td>
149 </tr> 149 </tr>
150 <tr> 150 <tr>
151 <td><b>Опыт работы:</b></td> 151 <td><b>Опыт работы:</b></td>
152 <td>{{ $worker->experience ?? '-' }}</td> 152 <td>{{ $worker->experience ?? '-' }}</td>
153 </tr> 153 </tr>
154 <tr> 154 <tr>
155 <td><b>Уровень английского:</b></td> 155 <td><b>Уровень английского:</b></td>
156 <td>{{ $worker->english_level ?? '-' }}</td> 156 <td>{{ $worker->english_level ?? '-' }}</td>
157 </tr> 157 </tr>
158 <tr> 158 <tr>
159 <td><b>Дата готовности к посадке:</b></td> 159 <td><b>Дата готовности к посадке:</b></td>
160 <td>{{ $worker->ready_boart_date ?? '-' }}</td> 160 <td>{{ $worker->ready_boart_date ?? '-' }}</td>
161 </tr> 161 </tr>
162 <tr> 162 <tr>
163 <td><b>Предпочтение по типу судна:</b></td> 163 <td><b>Предпочтение по типу судна:</b></td>
164 <td>{{ $worker->boart_type_preference ?? '-' }}</td> 164 <td>{{ $worker->boart_type_preference ?? '-' }}</td>
165 </tr> 165 </tr>
166 <tr> 166 <tr>
167 <td><b>Наличие визы:</b></td> 167 <td><b>Наличие визы:</b></td>
168 <td>{{ $worker->visa_available ?? '-' }}</td> 168 <td>{{ $worker->visa_available ?? '-' }}</td>
169 </tr> 169 </tr>
170 <tr> 170 <tr>
171 <td><b>Наличие танкерных документов:</b></td> 171 <td><b>Наличие танкерных документов:</b></td>
172 <td>{{ $worker->tanker_documents_available ?? '-' }}</td> 172 <td>{{ $worker->tanker_documents_available ?? '-' }}</td>
173 </tr> 173 </tr>
174 <tr> 174 <tr>
175 <td><b>Наличие подтверждения для работы на ВВП:</b></td> 175 <td><b>Наличие подтверждения для работы на ВВП:</b></td>
176 <td>{{ $worker->confirmation_work_for_vvp ?? '-' }}</td> 176 <td>{{ $worker->confirmation_work_for_vvp ?? '-' }}</td>
177 </tr> 177 </tr>
178 <tr> 178 <tr>
179 <td><b>Наличие военного билета / приписного свидетельства:</b></td> 179 <td><b>Наличие военного билета / приписного свидетельства:</b></td>
180 <td>{{ $worker->military_id_available ?? '-' }}</td> 180 <td>{{ $worker->military_id_available ?? '-' }}</td>
181 </tr> 181 </tr>
182 <tr> 182 <tr>
183 <td><b>Город проживания:</b></td> 183 <td><b>Город проживания:</b></td>
184 <td>{{ $worker->city ?? '-' }}</td> 184 <td>{{ $worker->city ?? '-' }}</td>
185 </tr> 185 </tr>
186 <tr> 186 <tr>
187 <td><b>Телефон:</b></td> 187 <td><b>Телефон:</b></td>
188 <td>{{ $worker->telephone ?? '-' }}</td> 188 <td>{{ $worker->telephone ?? '-' }}</td>
189 </tr> 189 </tr>
190 <tr> 190 <tr>
191 <td><b>E-mail:</b></td> 191 <td><b>E-mail:</b></td>
192 <td>{{ $worker->email ?? '-' }}</td> 192 <td>{{ $worker->email ?? '-' }}</td>
193 </tr> 193 </tr>
194 <tr> 194 <tr>
195 <td><b>Контакты родственников:</b></td> 195 <td><b>Контакты родственников:</b></td>
196 <td>{{ $worker->telephone2 ?? '-' }}</td> 196 <td>{{ $worker->telephone2 ?? '-' }}</td>
197 </tr> 197 </tr>
198 </tbody> 198 </tbody>
199 </table> 199 </table>
200 </div> 200 </div>
201 </div> 201 </div>
202 202
203 <div class="main__spoiler"> 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 <div class="main__spoiler-body"> 205 <div class="main__spoiler-body">
206 206
207 @if (isset($Query[0]->sertificate)) 207 @if (isset($Query[0]->sertificate))
208 @if ($Query[0]->sertificate->count()) 208 @if ($Query[0]->sertificate->count())
209 <table class="main__table"> 209 <table class="main__table">
210 <tbody> 210 <tbody>
211 <tr> 211 <tr>
212 <td><b>Название сертификата:</b></td> 212 <td><b>Название сертификата:</b></td>
213 <td><b>Действителен до:</b></td> 213 <td><b>Действителен до:</b></td>
214 </tr> 214 </tr>
215 @foreach($Query[0]->sertificate as $it) 215 @foreach($Query[0]->sertificate as $it)
216 <tr> 216 <tr>
217 <td>{{ $it->name }}</td> 217 <td>{{ $it->name }}</td>
218 <td>{{ date('d.m.Y', strtotime($it->end_begin)) }}</td> 218 <td>{{ date('d.m.Y', strtotime($it->end_begin)) }}</td>
219 </tr> 219 </tr>
220 @endforeach 220 @endforeach
221 </tbody> 221 </tbody>
222 </table> 222 </table>
223 @endif 223 @endif
224 @endif 224 @endif
225 </div> 225 </div>
226 </div> 226 </div>
227 227
228 <div class="main__spoiler"> 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 <div class="main__spoiler-body"> 230 <div class="main__spoiler-body">
231 @if ($infoblocks->count()) 231 @if ($infoblocks->count())
232 <table class="main__table"> 232 <table class="main__table">
233 <tbody> 233 <tbody>
234 @foreach ($infoblocks as $info) 234 @foreach ($infoblocks as $info)
235 @php $finder = false; @endphp 235 @php $finder = false; @endphp
236 @if (isset($Query[0]->infobloks)) 236 @if (isset($Query[0]->infobloks))
237 @if ($Query[0]->infobloks->count()) 237 @if ($Query[0]->infobloks->count())
238 238
239 @foreach($Query[0]->infobloks as $it) 239 @foreach($Query[0]->infobloks as $it)
240 @if ($info->id == $it->id) 240 @if ($info->id == $it->id)
241 <tr> 241 <tr>
242 <td><b>{{ $it->name }}</b></td> 242 <td><b>{{ $it->name }}</b></td>
243 <td> 243 <td>
244 @if ($it->model_dop_info[0]->status == 0) Не указано 244 @if ($it->model_dop_info[0]->status == 0) Не указано
245 @elseif($it->model_dop_info[0]->status==1) В наличии 245 @elseif($it->model_dop_info[0]->status==1) В наличии
246 @else Отсутствует 246 @else Отсутствует
247 @endif 247 @endif
248 </td> 248 </td>
249 </tr> 249 </tr>
250 @php $finder = true; @endphp 250 @php $finder = true; @endphp
251 @endif 251 @endif
252 @endforeach 252 @endforeach
253 @endif 253 @endif
254 @endif 254 @endif
255 @if (!$finder) 255 @if (!$finder)
256 <tr> 256 <tr>
257 <td><b>{{ $info->name }}</b></td> 257 <td><b>{{ $info->name }}</b></td>
258 <td> 258 <td>
259 Не указано 259 Не указано
260 </td> 260 </td>
261 </tr> 261 </tr>
262 @endif 262 @endif
263 @endforeach 263 @endforeach
264 </tbody> 264 </tbody>
265 </table> 265 </table>
266 @endif 266 @endif
267 </div> 267 </div>
268 </div> 268 </div>
269 269
270 <div class="main__spoiler"> 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 <div class="main__spoiler-body"> 272 <div class="main__spoiler-body">
273 273
274 @if (isset($Query[0]->place_worker)) 274 @if (isset($Query[0]->place_worker))
275 @if ($Query[0]->place_worker->count()) 275 @if ($Query[0]->place_worker->count())
276 <table class="main__table"> 276 <table class="main__table">
277 <tbody> 277 <tbody>
278 <tr> 278 <tr>
279 <td><b>Должность:</b></td> 279 <td><b>Должность:</b></td>
280 <td><b>Название т/х:</b></td> 280 <td><b>Название т/х:</b></td>
281 <td><b>Тип судна:</b></td> 281 <td><b>Тип судна:</b></td>
282 <td><b>Марка ГД:</b></td> 282 <td><b>Марка ГД:</b></td>
283 <td><b>Мощность ГД (кВТ):</b></td> 283 <td><b>Мощность ГД (кВТ):</b></td>
284 <td><b>Водоизмещение (DWT):</b></td> 284 <td><b>Водоизмещение (DWT):</b></td>
285 <td><b>Название компании:</b></td> 285 <td><b>Название компании:</b></td>
286 <td><b>Начало контракта:</b></td> 286 <td><b>Начало контракта:</b></td>
287 <td><b>Окончание контракта:</b></td> 287 <td><b>Окончание контракта:</b></td>
288 </tr> 288 </tr>
289 @foreach($Query[0]->place_worker as $it) 289 @foreach($Query[0]->place_worker as $it)
290 <tr> 290 <tr>
291 <td>{{ $it->job_title }}</td> 291 <td>{{ $it->job_title }}</td>
292 <td>{{ $it->teplohod }}</td> 292 <td>{{ $it->teplohod }}</td>
293 <td>{{ $it->GWT }}</td> 293 <td>{{ $it->GWT }}</td>
294 <td>{{ $it->Marka_GD }}</td> 294 <td>{{ $it->Marka_GD }}</td>
295 <td>{{ $it->KBT }}</td> 295 <td>{{ $it->KBT }}</td>
296 <td>{{ $it->GRT }}</td> 296 <td>{{ $it->GRT }}</td>
297 <td>{{ $it->name_company }}</td> 297 <td>{{ $it->name_company }}</td>
298 <td>{{ date('d.m.Y', strtotime($it->begin_work)) }}</td> 298 <td>{{ date('d.m.Y', strtotime($it->begin_work)) }}</td>
299 <td>{{ date('d.m.Y', strtotime($it->end_work)) }}</td> 299 <td>{{ date('d.m.Y', strtotime($it->end_work)) }}</td>
300 </tr> 300 </tr>
301 @endforeach 301 @endforeach
302 </tbody> 302 </tbody>
303 </table> 303 </table>
304 @endif 304 @endif
305 @endif 305 @endif
306 </div> 306 </div>
307 </div> 307 </div>
308 308
309 <div class="main__spoiler"> 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 <div class="main__spoiler-body"> 311 <div class="main__spoiler-body">
312 @if ((isset($worker->prev_company)) && ($worker->prev_company->count())) 312 @if ((isset($worker->prev_company)) && ($worker->prev_company->count()))
313 <table class="main__table"> 313 <table class="main__table">
314 <tbody> 314 <tbody>
315 <tr> 315 <tr>
316 <td><b>Название компании:</b></td> 316 <td><b>Название компании:</b></td>
317 <td><b>ФИО сотрудника:</b></td> 317 <td><b>ФИО сотрудника:</b></td>
318 <td><b>Должность сотрудника:</b></td> 318 <td><b>Должность сотрудника:</b></td>
319 <td><b>Телефон сотрудника:</b></td> 319 <td><b>Телефон сотрудника:</b></td>
320 </tr> 320 </tr>
321 @foreach ($worker->prev_company as $prev_company) 321 @foreach ($worker->prev_company as $prev_company)
322 <tr> 322 <tr>
323 <td>{{ $prev_company->name_company }}</td> 323 <td>{{ $prev_company->name_company }}</td>
324 <td>{{ $prev_company->direct }}</td> 324 <td>{{ $prev_company->direct }}</td>
325 <td>{{ $prev_company->telephone }}</td> 325 <td>{{ $prev_company->telephone }}</td>
326 <td>{{ $prev_company->telephone2 }}</td> 326 <td>{{ $prev_company->telephone2 }}</td>
327 </tr> 327 </tr>
328 @endforeach 328 @endforeach
329 </tbody> 329 </tbody>
330 </table> 330 </table>
331 @endif 331 @endif
332 </div> 332 </div>
333 </div> 333 </div>
334 </div> 334 </div>
335 335
336 <div class="main__resume-profile-about"> 336 <div class="main__resume-profile-about">
337 <h2 class="main__resume-profile-about-title">О себе</h2> 337 <h2 class="main__resume-profile-about-title">О себе</h2>
338 <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p> 338 <p class="main__resume-profile-about-text">{{ $Query[0]->text }}</p>
339 @if (App\Classes\StatusUser::Status()==0) 339 @if (App\Classes\StatusUser::Status()==0)
340 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message)) 340 @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
341 <div class="main__resume-profile-about-buttons flex width100"> 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 name="footer-like-button" 343 name="footer-like-button"
344 > 344 >
345 <svg class="mr-10"> 345 <svg class="mr-10">
346 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use> 346 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
347 </svg> 347 </svg>
348 <span class="to-favorites">В избранное</span> 348 <span class="to-favorites">В избранное</span>
349 <span class="in-favorites">В избранном</span> 349 <span class="in-favorites">В избранном</span>
350 </button> 350 </button>
351 <div class="button button_light mr-10 main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot }}" data-tuid="{{ $Query[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'> 351 <div class="button button_light mr-10 main__resume-profile-about-button js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot }}" data-tuid="{{ $Query[0]->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
352 <svg> 352 <svg>
353 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use> 353 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
354 </svg> 354 </svg>
355 Написать 355 Написать
356 </div> 356 </div>
357 <a class="button mr-10" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}"> 357 <a class="button mr-10" href="{{ route('resume_download', ['worker' => $Query[0]->id]) }}">
358 <svg> 358 <svg>
359 <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use> 359 <use xlink:href="{{ asset('images/sprite.svg#download') }}"></use>
360 </svg> 360 </svg>
361 Скачать резюме 361 Скачать резюме
362 </a> 362 </a>
363 </div> 363 </div>
364 @endif 364 @endif
365 @endif 365 @endif
366 </div> 366 </div>
367 367
368 <div class="main__resume-profile-info"> 368 <div class="main__resume-profile-info">
369 <h2 class="main__resume-profile-info-title">Количество просмотров страницы: ({{ $stat[0]->lookin }})</h2> 369 <h2 class="main__resume-profile-info-title">Количество просмотров страницы: ({{ $stat[0]->lookin }})</h2>
370 </div> 370 </div>
371 371
372 <div class="main__resume-profile-info"> 372 <div class="main__resume-profile-info">
373 <h2 class="main__resume-profile-info-title">Отзывы о работнике ({{ $Query[0]->response->count() }})</h2> 373 <h2 class="main__resume-profile-info-title">Отзывы о работнике ({{ $Query[0]->response->count() }})</h2>
374 <div class="main__resume-profile-info-body"> 374 <div class="main__resume-profile-info-body">
375 @if ((isset($Query[0]->response)) && ($Query[0]->response->count())) 375 @if ((isset($Query[0]->response)) && ($Query[0]->response->count()))
376 <div class="main__resume-profile-info-body-item"> 376 <div class="main__resume-profile-info-body-item">
377 <ul class="main__resume-profile-info-body-inner"> 377 <ul class="main__resume-profile-info-body-inner">
378 @php $i = 1; @endphp 378 @php $i = 1; @endphp
379 @foreach($Query[0]->response as $it) 379 @foreach($Query[0]->response as $it)
380 <li> 380 <li>
381 <span><h3>Комментарий №{{$i}}</h3></span> 381 <span><h3>Комментарий №{{$i}}</h3></span>
382 <span><b>Оценка человека: {{ $it->stars }}</b></span> 382 <span><b>Оценка человека: {{ $it->stars }}</b></span>
383 <span><b>Сообщение: </b>{{ $it->message }}</span> 383 <span><b>Сообщение: </b>{{ $it->message }}</span>
384 </li> 384 </li>
385 @php $i++; @endphp 385 @php $i++; @endphp
386 @endforeach 386 @endforeach
387 </ul> 387 </ul>
388 </div> 388 </div>
389 @else 389 @else
390 <div class="main__resume-profile-info-body-item"> 390 <div class="main__resume-profile-info-body-item">
391 <h3 class="main__resume-profile-info-body-subtitle">Нету комментариев</h3> 391 <h3 class="main__resume-profile-info-body-subtitle">Нету комментариев</h3>
392 </div> 392 </div>
393 @endif 393 @endif
394 </div> 394 </div>
395 </div> 395 </div>
396 396
397 <div class="main__resume-profile-review"> 397 <div class="main__resume-profile-review">
398 <form action="{{ route('stars_answer') }}" method="POST"> 398 <form action="{{ route('stars_answer') }}" method="POST">
399 @csrf 399 @csrf
400 <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2> 400 <h2 class="main__resume-profile-review-title">Оставить отзыв о работнике</h2>
401 <div class="rate"> 401 <div class="rate">
402 <div class="rate__label">Ваша оценка:</div> 402 <div class="rate__label">Ваша оценка:</div>
403 <div class="rate__stars"> 403 <div class="rate__stars">
404 <select name="stars" id="stars" class="star-rating js-stars"> 404 <select name="stars" id="stars" class="star-rating js-stars">
405 <option value="5">5</option> 405 <option value="5">5</option>
406 <option value="4">4</option> 406 <option value="4">4</option>
407 <option value="3">3</option> 407 <option value="3">3</option>
408 <option value="2">2</option> 408 <option value="2">2</option>
409 <option value="1" selected>1</option> 409 <option value="1" selected>1</option>
410 </select> 410 </select>
411 </div> 411 </div>
412 </div> 412 </div>
413 <input type="hidden" name="worker_id" id="worker_id" value="{{ $Query[0]->id }}"/> 413 <input type="hidden" name="worker_id" id="worker_id" value="{{ $Query[0]->id }}"/>
414 <div class="main__resume-profile-review-body"> 414 <div class="main__resume-profile-review-body">
415 <h3>Ваш отзыв</h3> 415 <h3>Ваш отзыв</h3>
416 <textarea class="textarea" name="message" id="message" placeholder="Текст отзыва&hellip;" required></textarea> 416 <textarea class="textarea" name="message" id="message" placeholder="Текст отзыва&hellip;" required></textarea>
417 <button type="submit" class="button">Оставить отзыв</button> 417 <button type="submit" class="button">Оставить отзыв</button>
418 </div> 418 </div>
419 </form> 419 </form>
420 </div> 420 </div>
421 </div> 421 </div>
422 </div> 422 </div>
423 </main> 423 </main>
424 </div> 424 </div>
425 @endsection 425 @endsection
426 426