cabinet.blade.php
42.6 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
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
@extends('layout.frontend', ['title' => 'Моя анкета - РекаМоре'])
@section('scripts')
<script>
$(function() {
$('.cabinet__avatar-form [type="file"][name="photo"]').change(function (event) {
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);
};
reader.readAsDataURL(file);
}
});
});
$(document).on('click', '#button_new_doc123', function() {
var this_ = $(this);
var val_ = this_.attr('data-val');
var new_diplom = $('#new_diplom');
var new_diplom_val = new_diplom.val();
var new_data_begin = $('#new_data_begin');
var new_data_begin_val = new_data_begin.val();
var new_data_end = $('#new_data_end');
var new_data_end_val = new_data_end.val();
var education = $('#education');
var education_val = education.val();
var worker_id = $('#new_id');
var worker_val = worker_id.val();
console.log('sort items ' + val_);
if (new_diplom_val == '') {
new_diplom.addClass('err_red');
console.log('Border Up');
} else {
$.ajax({
type: "GET",
url: "{{ route('worker.add_serificate') }}",
data: "worker_id="+worker_val+"&date_begin="+new_data_begin_val + "&end_begin=" + new_data_end_val + "&name=" + new_diplom_val + "&education="+education_val,
success: function (data) {
console.log('Блокировка...');
console.log(data);
$('#sertificate').html(data);
if (new_diplom.hasClass('err_red')) new_diplom.removeClass('err_red');
},
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
error: function (data) {
data = JSON.stringify(data);
console.log('Error: ' + data);
}
});
}
});
$(document).on('click', '#btn_new_diplom123', function() {
var this_ = $(this);
var val_ = this_.attr('data-val');
var documents = $('#documents');
var doc_val = documents.val();
var block = $('#ajax_dop_diplomi');
console.log('worker_id='+val_+'it_infoblock='+ doc_val);
$.ajax({
type: "GET",
url: "",
data: "worker_id="+val_+"&infoblok_id="+doc_val,
success: function (data) {
location.url = data;
console.log('Добавление документа-диплома');
console.log(data);
block.html(data);
},
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
error: function (data) {
data = JSON.stringify(data);
console.log('Error: ' + data);
}
});
});
$(document).on('click', '#new_work', function() {
var this_ = $(this);
var val_ = this_.attr('data-val');
var new_diplom = $('#new_diplom').val();
var new_data_begin = $('#new_data_begin').val();
var new_data_end = $('#new_data_end').val();
var new_job_title = $('#new_job_title').val();
var new_teplohod = $('#new_teplohod').val();
var new_GWT = $('#new_GWT').val();
var new_KBT = $('#new_KBT').val();
var new_Begin_work = $('#new_Begin_work').val();
var new_End_work = $('#new_End_work').val();
var new_name_company = $('#new_name_company').val();
console.log('worker_id='+val_+'it_infoblock='+ doc_val);
$.ajax({
type: "GET",
url: "",
data: "worker_id="+val_+"&infoblok_id="+doc_val,
success: function (data) {
location.url = data;
console.log('Добавление документа-диплома');
console.log(data);
block.html(data);
},
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
error: function (data) {
data = JSON.stringify(data);
console.log('Error: ' + data);
}
});
});
$(document).on('click', '#old_year', function() {
var this_ = $(this);
var val = this_.val();
if (val < 0)
$('#old_year').val(0);
console.log('Возраст не может выполнить такую операцию');
});
$(document).on('change', '.sertificates_js', function() {
var this_ = $(this);
var infoblock_id = this_.attr('data-info');
var val = this_.val();
var block = $('#block_sertificate');
console.log('infoblok='+infoblock_id);
console.log('val='+val);
$.ajax({
type: "GET",
url: "{{ route('worker.delete_add_diplom', ['worker' => $Worker[0]->id]) }}",
data: "&infoblok_id=" + infoblock_id+"&val="+val,
success: function (data) {
location.url = data;
console.log('Удаление левых документов + добавление реальных документов');
console.log('Info 100% +'+ data);
//window.location.href = data;
//block.html(data);
},
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
error: function (data) {
data = JSON.stringify(data);
console.log('Error: ' + data);
}
});
});
</script>
@endsection
@section('content')
<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>
<form class="cabinet__body" action="{{ route('worker.cabinet_save', ['worker' => $Worker[0]->id]) }}" enctype="multipart/form-data" method="POST">
@csrf
@include('messages_error')
<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[0]->id]) }}" class="button">Поднять резюме</a>
<a href="{{ route('resume_download', ['worker' => $Worker[0]->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[0]->response)) {{ $Worker[0]->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>
<div class="cabinet__body-item">
<h3 class="cabinet__subtitle">Профиль</h3>
<div class="cabinet__avatar">
<div class="cabinet__avatar-pic">
@if (!empty($Worker[0]->photo))
<img src="{{ asset(Storage::url($Worker[0]->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">
<input type="file" name="photo" id="photo">
<span class="button">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
</svg>
Загрузить
</span>
</span>
</label>
<p class="cabinet__text">Загрузите фотографию в формате svg., jpg., jpeg., png.</p>
</div>
</div>
</div>
<div class="cabinet__body-item">
<div class="cabinet__inputs">
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Электронная почта *</label>
<div class="form-group__item">
<input type="email" name="email" id="email" value="{{ $Worker[0]->email }}" class="input" placeholder="info@rekamore.su" required>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Статус</label>
<div class="form-group__item">
<div class="select">
<select class="js-select2" name="status_work" id="status_work">
<option value="1" @if ($Worker[0]->status_work == 1) selected @endif>Не указано</option>
<option value="2" @if ($Worker[0]->status_work == 2) selected @endif>Не ищу работу</option>
<option value="0" @if ($Worker[0]->status_work == 0) selected @endif>Ищу работу</option>
</select>
</div>
</div>
</div>
<!--<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Статус *</label>
<div class="form-group__item">
<input type="text" class="input" required>
</div>
</div>-->
@if (isset($Worker[0]->users))
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Фамилия *</label>
<div class="form-group__item">
<input type="text" name="surname" id="surmane" class="input" value="{{ $Worker[0]->users->surname }}" placeholder="Филиппов" required>
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Имя *</label>
<div class="form-group__item">
<input type="text" name="name_man" id="name_man" class="input" value="{{ $Worker[0]->users->name_man }}" placeholder="Егор" required>
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Отчество *</label>
<div class="form-group__item">
<input type="text" class="input" name="surname2" id="surmane2" value="{{ $Worker[0]->users->surname2 }}" placeholder="Алексеевич">
</div>
</div>
@endif
</div>
</div>
<div class="cabinet__body-item">
<h3 class="cabinet__subtitle">Основная информация</h3>
<div class="cabinet__inputs">
<div class="cabinet__inputs-item cabinet__inputs-item_min form-group">
<label class="form-group__label">Возраст</label>
<div class="form-group__item">
<input type="number" name="old_year" id="old_year" value="{{ $Worker[0]->old_year }}" class="input" placeholder="0" required>
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_max form-group">
<label class="form-group__label">Желаемые вакансии</label>
<div class="form-group__item">
<div class="select">
<select class="js-select2" name="job_title_id[]" id="job_title_id[]" multiple="multiple">
@if ($Job_titles->count())
@foreach($Job_titles as $it)
@php $selected = false; @endphp
@if (isset($Worker[0]->job_titles))
@if ($Worker[0]->job_titles->count())
@foreach($Worker[0]->job_titles as $select)
@if ($it->id == $select->id)
@php $selected = true; @endphp
@endif
@endforeach
@endif
@endif
<option value="{{ $it->id }}" @if ($selected) selected @endif>{{ $it->name }}</option>
@endforeach
@endif
</select>
</div>
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Город</label>
<div class="form-group__item">
<input type="text" name="city" id="city" value="{{ $Worker[0]->city }}" class="input" placeholder="Челябинск" required>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Опыт работы</label>
<div class="form-group__item">
<div class="select">
<select class="js-select2" id="experience" name="experience">
<option value="Не указано" @if (empty($Worker[0]->experience)) selected @endif>Не указано</option>
<option value="меньше 1 года" @if ($Worker[0]->experience == 'меньше 1 года') selected @endif>меньше 1 года</option>
<option value="от 1 года до 3 лет" @if ($Worker[0]->experience == 'от 1 года до 3 лет') selected @endif>от 1 года до 3 лет</option>
<option value="от 3 до 5 лет" @if ($Worker[0]->experience == 'от 3 до 5 лет') selected @endif>от 3 до 5 лет</option>
<option value="от 5 до 10 лет" @if ($Worker[0]->experience == 'от 5 до 10 лет') selected @endif>от 5 до 10 лет</option>
<option value="Больше 10 лет" @if ($Worker[0]->experience == 'Больше 10 лет') selected @endif>Больше 10 лет</option>
</select>
</div>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Номер телефона 1</label>
<div class="form-group__item">
<input type="tel" name="telephone" id="telephone" value="{{ old('telephone') ?? $Worker[0]->telephone ?? '' }}" class="input" placeholder="+7 (___) ___-__-__" required>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Номер телефона 2</label>
<div class="form-group__item">
<input type="tel" name="telephone2" id="telephon2" value="{{ old('telephone2') ?? $Worker[0]->telephone2 ?? '' }}" class="input" placeholder="+7 (___) ___-__-__">
</div>
</div>
</div>
</div>
<div class="cabinet__body-item">
<h4 class="cabinet__h4">О себе</h4>
<textarea class="textarea" name="text" id="text" placeholder="Не указано">{{ $Worker[0]->text }}</textarea>
<div class="cabinet__buttons">
<button type="submit" class="button">Сохранить</button>
<label class="file">
<span class="file__input">
<input type="file" name="file" id="file">
<span class="button button_light">@if (empty($Worker[0]->file)) Прикрепить резюме @else Обновить резюме @endif</span>
</span>
</label>
</div>
</div>
<div id="sertificate" name="sertificate">
@if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0))
@php $i = 0; @endphp
@foreach($Worker[0]->sertificate as $it)
<div style="margin-bottom: 20px" class="cabinet__body-item">
@if ($i == 0)
<h3 class="cabinet__subtitle">Сертификаты / документы</h3>
@endif
<h4 class="cabinet__h4">Сертификат {{ $i+1 }}</h4>
<div class="cabinet__inputs">
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Название сертификата:</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $it->name }}" disabled>
</div>
</div>
<!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Учебное заведение</label>
<div class="form-group__item">
<input type="text" class="input" value=" $it->education }}" disabled>
</div>
</div>-->
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Действителен до:</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $it->end_begin }}" disabled>
</div>
</div>
<a href="{{ route('worker.delete_sertificate', ['doc' => $it->id]) }}" class="button button_light">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
</svg>
Удалить
</a>
<a href="{{ route('worker.edit_sertificate', ['worker' => $Worker[0]->id, 'doc' => $it->id ]) }}" class="button">Редактирование</a>
</div>
</div>
@php $i++ @endphp
@endforeach
@else
<div style="margin-bottom: 20px" class="cabinet__body-item">
<h3 class="cabinet__subtitle">Сертификаты / документы</h3>
Нет сертификатов
</div>
@endif
</div>
<div class="cabinet__body-item">
<a class="button button_light" href="{{ route('worker.new_sertificate',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc">
Добавить сертификат
</a>
</div>
<div class="cabinet__body-item" name="ajax_dop_diplomi" id="ajax_dop_diplomi">
<h4 class="cabinet__h4">Дополнительная информация</h4>
<div class="cabinet__inputs" id="block_sertificate">
@if ($Infobloks->count())
@foreach ($Infobloks as $doc)
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">{{ $doc->name }}</label>
<div class="form-group__item">
<div class="select">
@php $Selected = 0; @endphp
@if ($Worker[0]->infobloks->count())
@foreach ($Worker[0]->dop_info as $info)
@if ($info->infoblok_id == $doc->id)
@php $Selected = $info->status; @endphp
@endif
@endforeach
@endif
<select data-info="{{ $doc->id }}" class="js-select2 sertificates_js">
<option value="0" @if ($Selected == 0) selected @endif>Не указано</option>
<option value="1" @if ($Selected == 1) selected @endif>В наличии</option>
<option value="2" @if ($Selected == 2) selected @endif>Отсутствует</option>
</select>
</div>
</div>
</div>
@endforeach
@endif
<!--_if (isset($Worker[0]->infobloks))
_php dd($Worker[0]->infobloks) _endphp
_if ($Worker[0]->infobloks->count())
_php $i = 1; _endphp
_foreach ($Worker[0]->infobloks as $info)
<div class="cabinet__inputs-item form-group">
<label class="form-group__label"> $info->name }}</label>
<div class="form-group__item">
<div class="select">
<select data-info=" $info->id }}" class="js-select2 sertificates_js">
<option value="0">Нет</option>
<option value="1" selected>Да</option>
</select>
</div>
</div>
</div>
_php $i++; _endphp
_endforeach
_endif
_endif
-->
<!--<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Образцы дипломов и документов</label>
<div class="form-group__item">
<div class="select">
<select class="js-select2" id="documents" name="documents">
_if ($Infoblocks->count())
_foreach ($Infoblocks as $it)
<option value="_$it->id }}">_$it->name }}</option>
_endforeach
_endif
</select>
</div>
</div>
</div>-->
</div>
<!--<a href=" route('worker.add_diplom', ['worker' => $Worker[0]->id]) }}" name="btn_new_diplom" data-val="{{ $Worker[0]->id }}" id="btn_new_diplom" class="button button_light">
Добавить документ
</a>-->
</div>
<div class="cabinet__body-item">
<div class="cabinet__works">
@if (isset($Worker[0]->place_worker))
@php $i = 1; @endphp
@foreach($Worker[0]->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-buttons">
<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>
<a href="{{ route('worker.edit_document', ['doc' => $company->id, 'worker' => $Worker[0]->id]) }}" type="button" class="button button_light js-works-edit">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#pencil') }}"></use>
</svg>
</a>
</div>
<div class="cabinet__works-spoiler-text">Место работы {{ $i }}</div>
</div>
<button type="button" class="cabinet__works-spoiler-right js-parent-toggle">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#arrow-bold') }}"></use>
</svg>
</button>
</div>
<div class="cabinet__works-body">
<div class="cabinet__inputs">
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Должность</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->job_title }}" disabled>
</div>
</div>
<!--<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Опыт работы в танкерном флоте</label>
<div class="form-group__item">
<input type="text" class="input" value="@if ($company->tanker) Есть @else Нет @endif">
</div>
</div>-->
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Название т/х</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->teplohod }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Тип суда (GWT)</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->GWT }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Марка ГД</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->Marka_GD }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Мощность ГД (кВТ)</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->KBT }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Водоизмещение (GRT)</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->GRT }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Название компании</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->name_company }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Начало контракта</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->begin_work }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Окончание контракта</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $company->end_work }}" disabled>
</div>
</div>
</div>
</div>
</div>
@php $i++ @endphp
@endforeach
@endif
</div>
</div>
<a href="{{ route('worker.add_document', ['worker' => $Worker[0]->id]) }}" id="new_work" name="new_work" class="button button_light cabinet__works-add" style="width:100%; max-width:none;">Новое место работы</a>
<div id="prev_worker" name="prev_worker">
@if ((isset($Worker[0]->prev_company)) && ($Worker[0]->prev_company->count() > 0))
@php $i = 0; @endphp
@foreach($Worker[0]->prev_company as $it)
<div style="margin-bottom: 20px" class="cabinet__body-item">
@if ($i == 0)
<h3 class="cabinet__subtitle">Контакты предыдущих компаний</h3>
@endif
<h4 class="cabinet__h4">Компания {{ $i+1 }}</h4>
<div class="cabinet__inputs">
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Название компании</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $it->name_company }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">ФИО сотрудника</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $it->direct }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Должность сотрудника</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $it->telephone }}" disabled>
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Телефон сотрудника</label>
<div class="form-group__item">
<input type="text" class="input" value="{{ $it->telephone2 }}" disabled>
</div>
</div>
<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>
<a href="{{ route('worker.edit_prev_company', ['worker' => $Worker[0]->id, 'doc' => $it->id ]) }}" class="button">Редактирование</a>
</div>
</div>
@php $i++ @endphp
@endforeach
@else
<div style="margin-bottom: 20px" class="cabinet__body-item">
<h3 class="cabinet__subtitle">Предыдущие компании</h3>
Нет предыдущих компаний
</div>
@endif
</div>
<div class="cabinet__body-item">
<a class="button button_light" href="{{ route('worker.new_prev_company',['worker' => $Worker[0]->id]) }}" id="button_new_doc" name="button_new_doc">
Добавить официльную контактную информацию
</a>
</div>
</form>
</div>
</div>
</section>
</div>
<div>
@endsection