cabinet.blade.php
28.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
@extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре'])
@section('scripts')
<script>
$(function() {
$('.cabinet__avatar-form [type="file"][name="photo"]').change(function (event) {
var form = $(this).closest('form');
const file = event.target.files[0];
if (file) {
var img_wrap = $('.cabinet__avatar-pic');
var img = $('<img src="#"/>');
const reader = new FileReader();
reader.onload = function(e) {
img.attr('src', e.target.result);
img_wrap.find('svg, img').remove();
img_wrap.append(img);
setTimeout(function () {
form.submit();
}, 1000);
};
reader.readAsDataURL(file);
}
});
});
$(document).on('click', '#old_year', function() {
var this_ = $(this);
var val = this_.val();
if (val < 0)
$('#old_year').val(0);
});
</script>
@endsection
@section('content')
@php
$user = $worker->users
@endphp
<section class="cabinet">
<div class="container">
<ul class="breadcrumbs cabinet__breadcrumbs">
<li><a href="{{ route('index') }}">Главная</a></li>
<li><b>Личный кабинет</b></li>
</ul>
<div class="cabinet__wrapper">
<div class="cabinet__side">
<div class="cabinet__side-toper">
@include('workers.emblema')
</div>
@include('workers.menu', ['item' => 1])
</div>
<div class="cabinet__body">
<div class="cabinet__body-item">
<div class="cabinet__anketa">
<h2 class="title cabinet__title">Моя анкета</h2>
<div class="cabinet__anketa-buttons">
<a href="{{ route('worker.up', ['worker' => $worker->id]) }}" class="button">Поднять резюме</a>
<a href="{{ route('resume_download', ['worker' => $worker->id]) }}" target="_blank" class="button">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
</svg>
Скачать резюме
</a>
</div>
</div>
</div>
<div class="cabinet__body-item">
<div class="cabinet__stats">
<h3 class="cabinet__subtitle cabinet__stats-title">Статистика</h3>
<div class="cabinet__stats-body">
<div class="cabinet__stats-item">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#eye-3') }}"></use>
</svg>
<span>Просмотров:</span>
<b>@if (isset($stat[0]->lookin)) {{ $stat[0]->lookin }} @else 0 @endif</b>
</div>
<div class="cabinet__stats-item">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#warning') }}"></use>
</svg>
<span>Отзывов:</span>
<b>@if(isset($worker->response)) {{ $worker->response->count() }} @else 0 @endif</b>
</div>
</div>
<div class="cabinet__stats-subtitle">Анкета заполнена на {{ $persent }}%</div>
<div class="cabinet__stats-line">
<span style="width:{{ $persent }}%"></span>
</div>
<div class="cabinet__stats-bottom">Заполните профиль, чтобы повысить процент анкеты на 80%</div>
</div>
</div>
<form class="" action="{{ route('worker.cabinet_save_foto', ['worker' => $worker->id]) }}" enctype="multipart/form-data" method="POST">
@csrf
@include('messages_error')
<div class="cabinet__body-item">
<h3 class="cabinet__subtitle">Профиль</h3>
<div class="cabinet__avatar">
<div class="cabinet__avatar-pic">
@if (!empty($worker->photo))
<img src="{{ asset(Storage::url($worker->photo)) }}"/>
@else
<svg>
<use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
</svg>
@endif
</div>
<div class="cabinet__avatar-form">
<label class="file">
<span class="file__input flex">
<input type="file" name="photo" id="photo">
<span class="button mr-20">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
</svg>
Загрузить
</span>
@if (!empty($worker->photo))
<button type="submit" class="button">Удалить фото</button>
@endif
</span>
</label>
<p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p>
</div>
</div>
</div>
</form>
<div class="cabinet__body-item mb-40">
<h3 class="cabinet__subtitle font30">Основная информация</h3>
<div class="cabinet__inputs">
<div class="cabinet__inputs_to_columns_wrap">
<div class="cabinet__inputs_to_column cabinet__inputs_to_columns_left">
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Фамилия:</label>
<div class="form-group__item">
{{ $user->surname }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Имя:</label>
<div class="form-group__item">
{{ $user->name_man }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Отчество:</label>
<div class="form-group__item">
{{ $user->surname2 }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Возраст:</label>
<div class="form-group__item">
{{ $worker->old_year ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Статус:</label>
<div class="form-group__item">
{{ $status_work[$worker->status_work] ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Желаемые вакансии:</label>
<div class="form-group__item">
@if ($worker->job_titles->count())
@foreach($worker->job_titles as $job_title)
{{ $job_title->name }}
@if (!$loop->last) / @endif
@endforeach
@endif
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Пожелания к З/П:</label>
<div class="form-group__item">
{{ $worker->salary_expectations ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Уровень английского:</label>
<div class="form-group__item">
{{ $worker->english_level ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Дата готовности к посадке:</label>
<div class="form-group__item">
{{ $worker->ready_boart_date ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Предпочтение по типу судна:</label>
<div class="form-group__item">
{{ $worker->boart_type_preference ?? '-' }}
</div>
</div>
</div>
<div class="cabinet__inputs_to_column cabinet__inputs_to_columns_right">
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Наличие визы:</label>
<div class="form-group__item">
{{ $worker->visa_available }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Наличие танкерных документов:</label>
<div class="form-group__item">
{{ $worker->tanker_documents_available ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Наличие подтверждения для работы на ВВП:</label>
<div class="form-group__item">
{{ $worker->confirmation_work_for_vvp ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Наличие военного билета / приписного свидетельства:</label>
<div class="form-group__item">
{{ $worker->military_id_available ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Город проживания:</label>
<div class="form-group__item">
{{ $worker->city ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Телефон:</label>
<div class="form-group__item">
{{ $worker->telephone ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">E-mail:</label>
<div class="form-group__item">
{{ $worker->email ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Контакты родственников:</label>
<div class="form-group__item">
{{ $worker->telephone2 ?? '-' }}
</div>
</div>
</div>
</div>
<<<<<<< HEAD
<div class="width100">
<h4 class="cabinet__h4 mb-10">О себе</h4>
<div>{{ $worker->text }}</div>
</div>
=======
<div class="width100">
<h4 class="cabinet__h4 mb-10">О себе</h4>
<div style="white-space:break-spaces; word-break: break-word;">{{ $worker->text }}</div>
</div>
>>>>>>> c40f2b065cea930f5629b64a4516523032e7b56f
<div class="">
<a href="{{ route('worker.basic_information') }}" class="button active">Редактировать основную информацию</a>
</div>
</div>
</div>
<div class="mb-40" id="sertificate" name="sertificate">
<h3 class="cabinet__subtitle font30 mb-20">Сертификаты / документы</h3>
@if($worker->sertificate->count())
@foreach($worker->sertificate as $sertificate)
<div class="one-sertificate">
<div class="sertificate-field sertificate-name">
<label class="bold">Название сертификата:</label>
<div>{{ $sertificate->name }}</div>
</div>
<div class="sertificate-field">
<label class="bold">Действителен до:</label>
<div>{{ date('d.m.Y', strtotime($sertificate->end_begin)) }}</div>
</div>
<div class="sertificate-field sertificate-buttons">
<a href="{{ route('worker.edit_sertificate', ['worker' => $worker->id, 'doc' => $sertificate->id ]) }}" class="button button_light mr-10">
<svg><use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use></svg>
</a>
<a href="{{ route('worker.delete_sertificate', ['doc' => $sertificate->id]) }}" class="button button_light">
<svg><use xlink:href="{{ asset('images/sprite.svg#del') }}"></use></svg>
</a>
</div>
</div>
@endforeach
@endif
<a class="button fit-content" href="{{ route('worker.new_sertificate',['worker' => $worker->id]) }}" id="button_new_doc" name="button_new_doc">
Добавить сертификат / документ
</a>
</div>
<div class="cabinet__body-item mb-40" name="ajax_dop_diplomi" id="ajax_dop_diplomi">
<h3 class="cabinet__subtitle font30">Дополнительные документы</h3>
<div class="cabinet__inputs" id="block_sertificate">
@if ($info_blocks->count())
@foreach ($info_blocks as $info_block)
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">{{ $info_block->name }}:</label>
<div class="form-group__item">
@php $status = 0; @endphp
@if (!empty($worker->dop_info[$info_block->id]) && $worker->dop_info[$info_block->id]['status'])
@php $status = $worker->dop_info[$info_block->id]['status']; @endphp
@endif
{{ $additional_document_statuses[$status] }}
</div>
</div>
@endforeach
@endif
</div>
<a class="button fit-content" href="{{ route('worker.additional_documents') }}">
Редактировать дополнительные документы
</a>
</div>
<div class="cabinet__body-item mb-20">
<div>
<h3 class="cabinet__subtitle font30">Опыт работы</h3>
<div class="">Начните заполнение анкеты с указания последнего места работы</div>
</div>
<div class="cabinet__works">
@if (isset($worker->place_worker))
@foreach($worker->place_worker as $company)
<div class="cabinet__works-item">
<div class="cabinet__works-spoiler active">
<div class="cabinet__works-spoiler-left">
<div class="cabinet__works-spoiler-text">Место работы {{ $loop->iteration }}</div>
</div>
<div class="cabinet__works-spoiler-buttons">
<a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $worker->id]) }}" type="button" class="button button_light mr-10 js-works-edit">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use>
</svg>
</a>
<a href="{{ route('worker.delete_document', ['doc' => $company->id]) }}" class="button button_light js-works-remove">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
</svg>
</a>
</div>
</div>
<div class="cabinet__works-body">
<div class="cabinet__inputs">
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Должность:</label>
<div class="form-group__item">
{{ $company->job_title ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Название т/х:</label>
<div class="form-group__item">
{{ $company->teplohod ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Тип суда:</label>
<div class="form-group__item">
{{ $company->GWT ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Марка ГД:</label>
<div class="form-group__item">
{{ $company->Marka_GD ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Мощность ГД (кВТ):</label>
<div class="form-group__item">
{{ $company->KBT ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Водоизмещение (DWT):</label>
<div class="form-group__item">
{{ $company->GRT ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Название компании:</label>
<div class="form-group__item">
{{ $company->name_company ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Начало контракта:</label>
<div class="form-group__item">
{{ $company->begin_work ?? '-' }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Окончание контракта:</label>
<div class="form-group__item">
{{ $company->end_work ?? '-' }}
</div>
</div>
</div>
</div>
</div>
@endforeach
@endif
</div>
<a href="{{ route('worker.add_document', ['worker' => $worker->id]) }}" id="new_work" name="new_work" class="button fit-content">
Добавить место работы
</a>
</div>
<div id="prev_worker" name="prev_worker">
<div>
<h3 class="cabinet__subtitle font30">Рекомендации</h3>
<div class="">Укажите контакты компаний, которые могут дать рекомендации</div>
</div>
@if ((isset($worker->prev_company)) && ($worker->prev_company->count() > 0))
@foreach($worker->prev_company as $it)
<div class="cabinet__body-item">
<div class="cabinet__inputs mt-30">
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Название компании:</label>
<div class="form-group__item">
{{ $it->name_company }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">ФИО сотрудника:</label>
<div class="form-group__item">
{{ $it->direct }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group cabinet__inputs-item-buttons">
<div class="flex">
<a href="{{ route('worker.edit_prev_company', ['worker' => $worker->id, 'doc' => $it->id ]) }}" class="button button_light mr-10">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use>
</svg>
</a>
<a href="{{ route('worker.delete_prev_company', ['doc' => $it->id]) }}" class="button button_light">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
</svg>
</a>
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Должность сотрудника:</label>
<div class="form-group__item">
{{ $it->telephone }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group">
<label class="form-group__label">Телефон сотрудника:</label>
<div class="form-group__item">
{{ $it->telephone2 }}
</div>
</div>
<div class="cabinet__inputs-item column-count-3 form-group cabinet__inputs-item-buttons"></div>
</div>
</div>
@endforeach
@endif
</div>
<div class="cabinet__body-item">
<a class="button fit-content" href="{{ route('worker.new_prev_company',['worker' => $worker->id]) }}">
Добавить контакт для рекомендации
</a>
</div>
</div>
</div>
</div>
</section>
@endsection