Commit 60451bb51228e698a549c7e04f2e1a0b84daecf7

Authored by Андрей Ларионов
1 parent 4784310732

Баг базы данных

Showing 1 changed file with 2 additions and 0 deletions Inline Diff

resources/views/employers/bd.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 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('click', '.die_black', function() { 6 $(document).on('click', '.die_black', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var ajax_ = $('#ajax_flot_div'); 8 var ajax_ = $('#ajax_flot_div');
9 var id_ = this_.attr('data-test'); 9 var id_ = this_.attr('data-test');
10 var url_ = this_.attr('data-link'); 10 var url_ = this_.attr('data-link');
11 11
12 console.log(url_); 12 console.log(url_);
13 $.ajax({ 13 $.ajax({
14 type: "GET", 14 type: "GET",
15 url: url_, 15 url: url_,
16 success: function (data) { 16 success: function (data) {
17 console.log('Ответка'); 17 console.log('Ответка');
18 ajax_.html(data); 18 ajax_.html(data);
19 }, 19 },
20 headers: { 20 headers: {
21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
22 }, 22 },
23 error: function (data) { 23 error: function (data) {
24 console.log('Error: ' + data); 24 console.log('Error: ' + data);
25 } 25 }
26 }); 26 });
27 27
28 }); 28 });
29 </script> 29 </script>
30 @endsection 30 @endsection
31 31
32 @section('content') 32 @section('content')
33 <section class="cabinet"> 33 <section class="cabinet">
34 <div class="container"> 34 <div class="container">
35 <ul class="breadcrumbs cabinet__breadcrumbs"> 35 <ul class="breadcrumbs cabinet__breadcrumbs">
36 <li><a href="{{ route('index') }}">Главная</a></li> 36 <li><a href="{{ route('index') }}">Главная</a></li>
37 <li><b>Личный кабинет</b></li> 37 <li><b>Личный кабинет</b></li>
38 </ul> 38 </ul>
39 <div class="cabinet__wrapper"> 39 <div class="cabinet__wrapper">
40 <div class="cabinet__side"> 40 <div class="cabinet__side">
41 <div class="cabinet__side-toper"> 41 <div class="cabinet__side-toper">
42 @include('employers.emblema') 42 @include('employers.emblema')
43 </div> 43 </div>
44 @include('employers.menu', ['item' => 7]) 44 @include('employers.menu', ['item' => 7])
45 </div> 45 </div>
46 46
47 <div class="cabinet__body"> 47 <div class="cabinet__body">
48 <div class="cabinet__body-item"> 48 <div class="cabinet__body-item">
49 <h2 class="title cabinet__title">База данных</h2> 49 <h2 class="title cabinet__title">База данных</h2>
50 </div> 50 </div>
51 <div class="cabinet__body-item"> 51 <div class="cabinet__body-item">
52 <div class="cabinet__filters"> 52 <div class="cabinet__filters">
53 <div class="cabinet__filters-item"> 53 <div class="cabinet__filters-item">
54 <form class="search" action="{{ route('employer.bd') }}"> 54 <form class="search" action="{{ route('employer.bd') }}">
55 <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" required> 55 <input type="search" name="search" id="search" class="input" placeholder="Поиск&hellip;" required>
56 <button type="submit" class="button">Найти</button> 56 <button type="submit" class="button">Найти</button>
57 <span> 57 <span>
58 <svg> 58 <svg>
59 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 59 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
60 </svg> 60 </svg>
61 </span> 61 </span>
62 </form> 62 </form>
63 </div> 63 </div>
64 64
65 <div class="cabinet__filters-item"> 65 <div class="cabinet__filters-item">
66 <a href="" class="button"> 66 <a href="" class="button">
67 <svg> 67 <svg>
68 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 68 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
69 </svg> 69 </svg>
70 Экспорт 70 Экспорт
71 </a> 71 </a>
72 </div> 72 </div>
73 </div> 73 </div>
74 </div> 74 </div>
75 @php 75 @php
76 $categories = 0; 76 $categories = 0;
77 77
78 @endphp 78 @endphp
79 @if ($users->count()) 79 @if ($users->count())
80 @foreach ($users as $key => $it) 80 @foreach ($users as $key => $it)
81 @if (isset($it->workers[0]->position_work))
81 @if ($categories !== $it->workers[0]->position_work) 82 @if ($categories !== $it->workers[0]->position_work)
82 @php 83 @php
83 $categories = $it->workers[0]->position_work; 84 $categories = $it->workers[0]->position_work;
84 $i = 0; 85 $i = 0;
85 @endphp 86 @endphp
86 @endif 87 @endif
87 88
88 @if ($i == 0) 89 @if ($i == 0)
89 <div class="cabinet__body-item"> 90 <div class="cabinet__body-item">
90 <div class="cabinet__table-header"> 91 <div class="cabinet__table-header">
91 <div>@if (isset($it->workers[0]->job_titles[0]->name)) {{ $it->workers[0]->job_titles[0]->name }}@else Не указано @endif </div> 92 <div>@if (isset($it->workers[0]->job_titles[0]->name)) {{ $it->workers[0]->job_titles[0]->name }}@else Не указано @endif </div>
92 <span> 93 <span>
93 Всего вакансий найдено: 94 Всего вакансий найдено:
94 <b>{{ $it->workers[0]->count() }}</b> 95 <b>{{ $it->workers[0]->count() }}</b>
95 </span> 96 </span>
96 </div> 97 </div>
97 <div class="table table_spoiler"> 98 <div class="table table_spoiler">
98 <button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more"> 99 <button type="button" class="table__button js-toggle js-parent-toggle button button_light button_more">
99 <span>Показать ещё</span> 100 <span>Показать ещё</span>
100 <span>Свернуть</span> 101 <span>Свернуть</span>
101 </button> 102 </button>
102 103
103 <div class="table__scroll"> 104 <div class="table__scroll">
104 <div class="table__body table__body_min-width"> 105 <div class="table__body table__body_min-width">
105 <table> 106 <table>
106 <thead> 107 <thead>
107 <tr> 108 <tr>
108 <th>ФИО соискателя</th> 109 <th>ФИО соискателя</th>
109 <th>Номер телефона</th> 110 <th>Номер телефона</th>
110 <th>Электронная<br>почта</th> 111 <th>Электронная<br>почта</th>
111 <th>Наличие<br>анкеты</th> 112 <th>Наличие<br>анкеты</th>
112 <th>Комментарии</th> 113 <th>Комментарии</th>
113 </tr> 114 </tr>
114 </thead> 115 </thead>
115 <tbody> 116 <tbody>
116 @endif 117 @endif
117 <tr> 118 <tr>
118 <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td> 119 <td>{{ $it->surname." ".$it->name_man }}<br>{{ $it->surname2 }}</td>
119 120
120 <td> 121 <td>
121 122
122 @if (!empty($it->workers[0]->telephone)) 123 @if (!empty($it->workers[0]->telephone))
123 <a href="tel:{{ $it->workers[0]->telephone }}"> 124 <a href="tel:{{ $it->workers[0]->telephone }}">
124 {{ $it->workers[0]->telephone }} 125 {{ $it->workers[0]->telephone }}
125 </a> 126 </a>
126 @else 127 @else
127 - 128 -
128 @endif 129 @endif
129 130
130 @if (!empty($it->workers[0]->telephone2)) 131 @if (!empty($it->workers[0]->telephone2))
131 <br><a href="tel:{{ $it->workers[0]->telephone2 }}"> 132 <br><a href="tel:{{ $it->workers[0]->telephone2 }}">
132 {{ $it->workers[0]->telephone2 }} 133 {{ $it->workers[0]->telephone2 }}
133 </a> 134 </a>
134 @endif 135 @endif
135 </td> 136 </td>
136 137
137 <td> 138 <td>
138 @if (!empty($it->workers[0]->email)) 139 @if (!empty($it->workers[0]->email))
139 <a href="emailto:{{ $it->workers[0]->email }}">{{ $it->workers[0]->email }}</a> 140 <a href="emailto:{{ $it->workers[0]->email }}">{{ $it->workers[0]->email }}</a>
140 @else 141 @else
141 - 142 -
142 @endif 143 @endif
143 </td> 144 </td>
144 145
145 <td> 146 <td>
146 <a href="" class="table__link"> 147 <a href="" class="table__link">
147 <svg> 148 <svg>
148 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 149 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
149 </svg> 150 </svg>
150 Скачать 151 Скачать
151 </a> 152 </a>
152 </td> 153 </td>
153 <td>0</td> 154 <td>0</td>
154 </tr> 155 </tr>
155 @php $i++ @endphp 156 @php $i++ @endphp
156 157
157 </tbody> 158 </tbody>
158 </table> 159 </table>
159 </div> 160 </div>
160 </div> 161 </div>
161 </div> 162 </div>
162 </div> 163 </div>
164 @endif
163 @endforeach 165 @endforeach
164 @endif 166 @endif
165 </div> 167 </div>
166 </div> 168 </div>
167 </div> 169 </div>
168 </section> 170 </section>
169 </div> 171 </div>
170 @endsection 172 @endsection
171 173