Commit d176257df1cb28e23e37cbd30fa1938f9152f25c
1 parent
567d6161f9
Exists in
master
and in
1 other branch
Мелкий шрифт образования, работодатели, юзеры, работники
Showing 8 changed files with 252 additions and 53 deletions Inline Diff
- resources/views/admin/ad_employers/index.blade.php
- resources/views/admin/ad_employers/index_ajax.blade.php
- resources/views/admin/education/index.blade.php
- resources/views/admin/education/modal.blade.php
- resources/views/admin/employer/index.blade.php
- resources/views/admin/users/index_bd.blade.php
- resources/views/admin/users/modal.blade.php
- resources/views/admin/worker/index.blade.php
resources/views/admin/ad_employers/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Вакансии']) | 1 | @extends('layout.admin', ['title' => 'Админка - Вакансии']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '#refresh_btn', function () { | 6 | $(document).on('click', '#refresh_btn', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var ajax_block = $('#ajax_block'); | 8 | var ajax_block = $('#ajax_block'); |
9 | var mas = []; | 9 | var mas = []; |
10 | var str_get = ''; | 10 | var str_get = ''; |
11 | 11 | ||
12 | $('input:checkbox:checked').each(function(){ | 12 | $('input:checkbox:checked').each(function(){ |
13 | mas.push($(this).val()); | 13 | mas.push($(this).val()); |
14 | console.log($(this).val()); | 14 | console.log($(this).val()); |
15 | }); | 15 | }); |
16 | 16 | ||
17 | $.ajax({ | 17 | $.ajax({ |
18 | type: "GET", | 18 | type: "GET", |
19 | dataType: 'html', | 19 | dataType: 'html', |
20 | url: "{{ url()->full()}}", | 20 | url: "{{ url()->full()}}", |
21 | data: ({data:mas}), | 21 | data: ({data:mas}), |
22 | success: function (data) { | 22 | success: function (data) { |
23 | console.log('Обновление таблицы пользователей '); | 23 | console.log('Обновление таблицы пользователей '); |
24 | //data = JSON.parse(data); | 24 | //data = JSON.parse(data); |
25 | //console.log(data); | 25 | //console.log(data); |
26 | ajax_block.html(data); | 26 | ajax_block.html(data); |
27 | }, | 27 | }, |
28 | headers: { | 28 | headers: { |
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
30 | }, | 30 | }, |
31 | error: function (data) { | 31 | error: function (data) { |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | }); | 35 | }); |
36 | }); | 36 | }); |
37 | </script> | 37 | </script> |
38 | @endsection | 38 | @endsection |
39 | 39 | ||
40 | @section('search') | 40 | @section('search') |
41 | @include('admin.find_ad_employer', ['select_job' => $select_job]) | 41 | @include('admin.find_ad_employer', ['select_job' => $select_job]) |
42 | @endsection | 42 | @endsection |
43 | 43 | ||
44 | @section('content') | 44 | @section('content') |
45 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> | 45 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> |
46 | 46 | ||
47 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | 47 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
48 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | 48 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> |
49 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 49 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
50 | <path | 50 | <path |
51 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | 51 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> |
52 | </svg> | 52 | </svg> |
53 | </div> | 53 | </div> |
54 | <div> | 54 | <div> |
55 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | 55 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> |
56 | Всего вакансий | 56 | Всего вакансий |
57 | </p> | 57 | </p> |
58 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | 58 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> |
59 | {{ $all_ad }} | 59 | {{ $all_ad }} |
60 | </p> | 60 | </p> |
61 | </div> | 61 | </div> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | 64 | ||
65 | <div> | 65 | <div> |
66 | <button style="margin-bottom: 10px; width:165px; display: inline-block;" id="refresh_btn" name="refresh_btn" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 66 | <button style="margin-bottom: 10px; width:165px; display: inline-block;" id="refresh_btn" name="refresh_btn" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
67 | Обновить вакансии | 67 | Обновить вакансии |
68 | </button> | 68 | </button> |
69 | <a href="{{ route('admin.add-ad-employers') }}" style="margin-bottom: 10px; width:310px; display: inline-block;" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 69 | <a href="{{ route('admin.add-ad-employers') }}" style="margin-bottom: 10px; width:310px; display: inline-block;" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
70 | Добавить вакансии от администратора | 70 | Добавить вакансии от администратора |
71 | </a> | 71 | </a> |
72 | </div> | 72 | </div> |
73 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 73 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
74 | <div class="w-full overflow-x-auto"> | 74 | <div class="w-full overflow-x-auto"> |
75 | <table class="w-full whitespace-no-wrap"> | 75 | <table class="w-full whitespace-no-wrap"> |
76 | <thead> | 76 | <thead> |
77 | <tr | 77 | <tr |
78 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 78 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
79 | > | 79 | > |
80 | <th class="px-4 py-3"></th> | 80 | <th class="px-4 py-3"></th> |
81 | <th class="px-4 py-3 class1">№</th> | 81 | <th class="px-4 py-3 class1">№</th> |
82 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> | 82 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> |
83 | <th class="px-4 py-3 class4">Должности</th> | 83 | <th class="px-4 py-3 class4">Должности</th> |
84 | <th class="px-4 py-3 class5">Избр.</th> | 84 | <th class="px-4 py-3 class5">Избр.</th> |
85 | <th class="px-4 py-3 class6">Сроч.</th> | 85 | <th class="px-4 py-3 class6">Сроч.</th> |
86 | <th class="px-4 py-3 class7">Статус</th> | 86 | <th class="px-4 py-3 class7">Статус</th> |
87 | <th class="px-4 py-3 class8">Дата создан/изменен.</th> | 87 | <th class="px-4 py-3 class8">Дата создан/изменен.</th> |
88 | <th class="px-4 py-3 class10">Изменить</th> | 88 | <th class="px-4 py-3 class10">Изменить</th> |
89 | </tr> | 89 | </tr> |
90 | </thead> | 90 | </thead> |
91 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 91 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
92 | @foreach($ad_employers as $ad) | 92 | @foreach($ad_employers as $ad) |
93 | <tr class="text-gray-700 dark:text-gray-400"> | 93 | <tr class="text-gray-700 dark:text-gray-400"> |
94 | <td class="px-4 py-3 class1"> | 94 | <td class="px-4 py-3 class1 text-xs"> |
95 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> | 95 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> |
96 | </td> | 96 | </td> |
97 | <td class="px-4 py-3 class1"> | 97 | <td class="px-4 py-3 class1 text-xs"> |
98 | {{$ad->id}} | 98 | {{$ad->id}} |
99 | </td> | 99 | </td> |
100 | <td class="px-4 py-3 class2"> | 100 | <td class="px-4 py-3 class2 text-xs"> |
101 | <div class="flex items-center text-sm"> | 101 | <div class="flex items-center text-sm"> |
102 | <div | 102 | <div |
103 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 103 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
104 | > | 104 | > |
105 | @if (isset($ad->employer->logo)) | 105 | @if (isset($ad->employer->logo)) |
106 | <img | 106 | <img |
107 | class="object-cover w-full h-full rounded-full" | 107 | class="object-cover w-full h-full rounded-full" |
108 | src="{{ asset(Storage::url($ad->employer->logo)) }}" | 108 | src="{{ asset(Storage::url($ad->employer->logo)) }}" |
109 | alt="" | 109 | alt="" |
110 | loading="lazy" | 110 | loading="lazy" |
111 | /> | 111 | /> |
112 | @endif | 112 | @endif |
113 | <div | 113 | <div |
114 | class="absolute inset-0 rounded-full shadow-inner" | 114 | class="absolute inset-0 rounded-full shadow-inner" |
115 | aria-hidden="true" | 115 | aria-hidden="true" |
116 | ></div> | 116 | ></div> |
117 | </div> | 117 | </div> |
118 | <div> | 118 | <div> |
119 | <p class="font-semibold">{{$ad->name}}</p> | 119 | <p class="font-semibold">{{$ad->name}}</p> |
120 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 120 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
121 | {{$ad->employer->name_company}} | 121 | {{$ad->employer->name_company}} |
122 | </p> | 122 | </p> |
123 | </div> | 123 | </div> |
124 | </div> | 124 | </div> |
125 | </td> | 125 | </td> |
126 | 126 | ||
127 | <td class="px-4 py-3 class4"> | 127 | <td class="px-4 py-3 class4 text-xs"> |
128 | <div class="flex items-center text-sm"> | 128 | <div class="flex items-center text-sm"> |
129 | @if ($ad->jobs->count()) | 129 | @if ($ad->jobs->count()) |
130 | <div> | 130 | <div> |
131 | <?php $i = 0;?> | 131 | <?php $i = 0;?> |
132 | @foreach ($ad->jobs as $title) | 132 | @foreach ($ad->jobs as $title) |
133 | <?php if ($i==0) {?> | 133 | <?php if ($i==0) {?> |
134 | <p class="font-semibold">{{$title->name}}</p> | 134 | <p class="font-semibold">{{$title->name}}</p> |
135 | <?php } else {?> | 135 | <?php } else {?> |
136 | <p class="font-semibold">/ {{$title->name}}</p> | 136 | <p class="font-semibold">/ {{$title->name}}</p> |
137 | <?php } | 137 | <?php } |
138 | $i++; | 138 | $i++; |
139 | ?> | 139 | ?> |
140 | @endforeach | 140 | @endforeach |
141 | </div> | 141 | </div> |
142 | @endif | 142 | @endif |
143 | </div> | 143 | </div> |
144 | 144 | ||
145 | </td> | 145 | </td> |
146 | 146 | ||
147 | <td class="px-4 py-3 text-sm class5"> | 147 | <td class="px-4 py-3 text-sm class5 text-xs"> |
148 | @if ($ad->favorite_vacancy==1) | 148 | @if ($ad->favorite_vacancy==1) |
149 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 149 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
150 | Да | 150 | Да |
151 | </span> | 151 | </span> |
152 | @else | 152 | @else |
153 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 153 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
154 | Нет | 154 | Нет |
155 | </span> | 155 | </span> |
156 | @endif | 156 | @endif |
157 | </td> | 157 | </td> |
158 | 158 | ||
159 | <td class="px-4 py-3 text-sm class6"> | 159 | <td class="px-4 py-3 text-sm class6 text-xs"> |
160 | @if ($ad->sroch_vacancy==1) | 160 | @if ($ad->sroch_vacancy==1) |
161 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 161 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
162 | Да | 162 | Да |
163 | </span> | 163 | </span> |
164 | @else | 164 | @else |
165 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 165 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
166 | Нет | 166 | Нет |
167 | </span> | 167 | </span> |
168 | @endif | 168 | @endif |
169 | </td> | 169 | </td> |
170 | 170 | ||
171 | <td class="px-4 py-3 text-sm class7"> | 171 | <td class="px-4 py-3 text-sm class7 text-xs"> |
172 | {{ $ad->status }} | 172 | {{ $ad->status }} |
173 | </td> | 173 | </td> |
174 | 174 | ||
175 | <td class="px-4 py-3 text-sm class8"> | 175 | <td class="px-4 py-3 text-sm class8 text-xs"> |
176 | <div class="flex items-center text-sm"> | 176 | <div class="flex items-center text-xs"> |
177 | <div> | 177 | <div> |
178 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> | 178 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> |
179 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 179 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
180 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} | 180 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} |
181 | </p> | 181 | </p> |
182 | </div> | 182 | </div> |
183 | </div> | 183 | </div> |
184 | 184 | ||
185 | </td> | 185 | </td> |
186 | 186 | ||
187 | <td class="px-4 py-3 text-sm class10"> | 187 | <td class="px-4 py-3 text-sm class10 text-xs"> |
188 | <form action="{{ route('admin.delete-ad-employer', ['ad_employer' => $ad->id]) }}" method="POST"> | 188 | <form action="{{ route('admin.delete-ad-employer', ['ad_employer' => $ad->id]) }}" method="POST"> |
189 | <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}">Изменить</a> | | 189 | <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}">Изменить</a> | |
190 | @csrf | 190 | @csrf |
191 | @method('DELETE') | 191 | @method('DELETE') |
192 | <input class="btn btn-danger" type="submit" value="Удалить"/> | 192 | <input class="btn btn-danger" type="submit" value="Удалить"/> |
193 | </form> | 193 | </form> |
194 | </td> | 194 | </td> |
195 | </tr> | 195 | </tr> |
196 | @endforeach | 196 | @endforeach |
197 | </tbody> | 197 | </tbody> |
198 | </table> | 198 | </table> |
199 | </div> | 199 | </div> |
200 | 200 | ||
201 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 201 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
202 | {{ $ad_employers->appends($_GET)->links('admin.pagginate') }} | 202 | {{ $ad_employers->appends($_GET)->links('admin.pagginate') }} |
203 | </div> | 203 | </div> |
204 | </div> | 204 | </div> |
205 | @endsection | 205 | @endsection |
206 | 206 |
resources/views/admin/ad_employers/index_ajax.blade.php
1 | <div class="w-full overflow-x-auto"> | 1 | <div class="w-full overflow-x-auto"> |
2 | <table class="w-full whitespace-no-wrap"> | 2 | <table class="w-full whitespace-no-wrap"> |
3 | <thead> | 3 | <thead> |
4 | <tr | 4 | <tr |
5 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 5 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
6 | > | 6 | > |
7 | <th class="px-4 py-3"></th> | 7 | <th class="px-4 py-3"></th> |
8 | <th class="px-4 py-3 class1">№</th> | 8 | <th class="px-4 py-3 class1">№</th> |
9 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> | 9 | <th class="px-4 py-3 class2">Лого/Заголовок/Компания</th> |
10 | <th class="px-4 py-3 class4">Должности</th> | 10 | <th class="px-4 py-3 class4">Должности</th> |
11 | <th class="px-4 py-3 class5">Избр.</th> | 11 | <th class="px-4 py-3 class5">Избр.</th> |
12 | <th class="px-4 py-3 class6">Сроч.</th> | 12 | <th class="px-4 py-3 class6">Сроч.</th> |
13 | <th class="px-4 py-3 class7">Статус</th> | 13 | <th class="px-4 py-3 class7">Статус</th> |
14 | <th class="px-4 py-3 class8">Дата создан/изменен.</th> | 14 | <th class="px-4 py-3 class8">Дата создан/изменен.</th> |
15 | <th class="px-4 py-3 class10">Изменить</th> | 15 | <th class="px-4 py-3 class10">Изменить</th> |
16 | </tr> | 16 | </tr> |
17 | </thead> | 17 | </thead> |
18 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 18 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
19 | @foreach($ad_employers as $ad) | 19 | @foreach($ad_employers as $ad) |
20 | <tr class="text-gray-700 dark:text-gray-400"> | 20 | <tr class="text-gray-700 dark:text-gray-400"> |
21 | <td class="px-4 py-3 class1"> | 21 | <td class="px-4 py-3 class1 text-xs"> |
22 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> | 22 | <input type="checkbox" class="box" name="vacan_{{$ad->id}}" id="vacan_{{$ad->id}}" value="{{$ad->id}}"/> |
23 | </td> | 23 | </td> |
24 | <td class="px-4 py-3 class1"> | 24 | <td class="px-4 py-3 class1 text-xs"> |
25 | {{$ad->id}} | 25 | {{$ad->id}} |
26 | </td> | 26 | </td> |
27 | <td class="px-4 py-3 class2"> | 27 | <td class="px-4 py-3 class2 text-xs"> |
28 | <div class="flex items-center text-sm"> | 28 | <div class="flex items-center text-sm"> |
29 | <div | 29 | <div |
30 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 30 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
31 | > | 31 | > |
32 | @if (isset($ad->employer->logo)) | 32 | @if (isset($ad->employer->logo)) |
33 | <img | 33 | <img |
34 | class="object-cover w-full h-full rounded-full" | 34 | class="object-cover w-full h-full rounded-full" |
35 | src="{{ asset(Storage::url($ad->employer->logo)) }}" | 35 | src="{{ asset(Storage::url($ad->employer->logo)) }}" |
36 | alt="" | 36 | alt="" |
37 | loading="lazy" | 37 | loading="lazy" |
38 | /> | 38 | /> |
39 | @endif | 39 | @endif |
40 | <div | 40 | <div |
41 | class="absolute inset-0 rounded-full shadow-inner" | 41 | class="absolute inset-0 rounded-full shadow-inner" |
42 | aria-hidden="true" | 42 | aria-hidden="true" |
43 | ></div> | 43 | ></div> |
44 | </div> | 44 | </div> |
45 | <div> | 45 | <div> |
46 | <p class="font-semibold">{{$ad->name}}</p> | 46 | <p class="font-semibold">{{$ad->name}}</p> |
47 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 47 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
48 | {{$ad->employer->name_company}} | 48 | {{$ad->employer->name_company}} |
49 | </p> | 49 | </p> |
50 | </div> | 50 | </div> |
51 | </div> | 51 | </div> |
52 | </td> | 52 | </td> |
53 | 53 | ||
54 | <td class="px-4 py-3 class4"> | 54 | <td class="px-4 py-3 class4 text-xs"> |
55 | <div class="flex items-center text-sm"> | 55 | <div class="flex items-center text-xs"> |
56 | @if ($ad->jobs->count()) | 56 | @if ($ad->jobs->count()) |
57 | <div> | 57 | <div> |
58 | <?php $i = 0;?> | 58 | <?php $i = 0;?> |
59 | @foreach ($ad->jobs as $title) | 59 | @foreach ($ad->jobs as $title) |
60 | <?php if ($i==0) {?> | 60 | <?php if ($i==0) {?> |
61 | <p class="font-semibold">{{$title->name}}</p> | 61 | <p class="font-semibold">{{$title->name}}</p> |
62 | <?php } else {?> | 62 | <?php } else {?> |
63 | <p class="font-semibold">/ {{$title->name}}</p> | 63 | <p class="font-semibold">/ {{$title->name}}</p> |
64 | <?php } | 64 | <?php } |
65 | $i++; | 65 | $i++; |
66 | ?> | 66 | ?> |
67 | @endforeach | 67 | @endforeach |
68 | </div> | 68 | </div> |
69 | @endif | 69 | @endif |
70 | </div> | 70 | </div> |
71 | 71 | ||
72 | </td> | 72 | </td> |
73 | 73 | ||
74 | <td class="px-4 py-3 text-sm class5"> | 74 | <td class="px-4 py-3 text-sm class5 text-xs"> |
75 | @if ($ad->favorite_vacancy==1) | 75 | @if ($ad->favorite_vacancy==1) |
76 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 76 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
77 | Да | 77 | Да |
78 | </span> | 78 | </span> |
79 | @else | 79 | @else |
80 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 80 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
81 | Нет | 81 | Нет |
82 | </span> | 82 | </span> |
83 | @endif | 83 | @endif |
84 | </td> | 84 | </td> |
85 | 85 | ||
86 | <td class="px-4 py-3 text-sm class6"> | 86 | <td class="px-4 py-3 text-sm class6 text-xs"> |
87 | @if ($ad->sroch_vacancy==1) | 87 | @if ($ad->sroch_vacancy==1) |
88 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 88 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
89 | Да | 89 | Да |
90 | </span> | 90 | </span> |
91 | @else | 91 | @else |
92 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 92 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
93 | Нет | 93 | Нет |
94 | </span> | 94 | </span> |
95 | @endif | 95 | @endif |
96 | </td> | 96 | </td> |
97 | 97 | ||
98 | <td class="px-4 py-3 text-sm class7"> | 98 | <td class="px-4 py-3 text-sm class7 text-xs"> |
99 | {{ $ad->status }} | 99 | {{ $ad->status }} |
100 | </td> | 100 | </td> |
101 | 101 | ||
102 | <td class="px-4 py-3 text-sm class8"> | 102 | <td class="px-4 py-3 text-sm class8 text-xs"> |
103 | <div class="flex items-center text-sm"> | 103 | <div class="flex items-center text-sm"> |
104 | <div> | 104 | <div> |
105 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> | 105 | <p class="font-semibold">{{ date('d.m.Y', strtotime($ad->created_at)) }}</p> |
106 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 106 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
107 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} | 107 | {{ date('d.m.Y', strtotime($ad->updated_at)) }} |
108 | </p> | 108 | </p> |
109 | </div> | 109 | </div> |
110 | </div> | 110 | </div> |
111 | 111 | ||
112 | </td> | 112 | </td> |
113 | 113 | ||
114 | <td class="px-4 py-3 text-sm class10"> | 114 | <td class="px-4 py-3 text-sm class10 text-xs"> |
115 | <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}"> | 115 | <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}"> |
116 | Изменить | 116 | Изменить |
117 | </a> | 117 | </a> |
118 | </td> | 118 | </td> |
119 | </tr> | 119 | </tr> |
120 | @endforeach | 120 | @endforeach |
121 | </tbody> | 121 | </tbody> |
122 | </table> | 122 | </table> |
123 | </div> | 123 | </div> |
124 | 124 | ||
125 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 125 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
126 | <?=$ad_employers->appends($_GET)->links('admin.pagginate'); ?> | 126 | <?=$ad_employers->appends($_GET)->links('admin.pagginate'); ?> |
127 | </div> | 127 | </div> |
128 | 128 | ||
129 | 129 |
resources/views/admin/education/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Справочник образование']) | 1 | @extends('layout.admin', ['title' => 'Админка - Справочник образование']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | ||
5 | const btns = document.querySelectorAll('.btn_del'); | ||
6 | btns.forEach(btn => { | ||
7 | btn.addEventListener('click', (e) => { | ||
8 | console.log('click button'); | ||
9 | let id = e.target.id; | ||
10 | let form = document.getElementById("form_modal_del"); | ||
11 | form.action = "<?=$_SERVER['APP_URL']?>public/admin/education/"+e.target.getAttribute('data-education'); | ||
12 | //document.getElementById("title_modal").innerHTML = id; | ||
13 | console.log(e.target.getAttribute('data-education')); | ||
14 | }); | ||
15 | }); | ||
16 | </script> | ||
17 | @endsection | ||
4 | 18 | ||
19 | @section('modal') | ||
20 | @include('admin.education.modal') | ||
5 | @endsection | 21 | @endsection |
6 | 22 | ||
7 | @section('search') | 23 | @section('search') |
8 | 24 | ||
9 | @endsection | 25 | @endsection |
10 | 26 | ||
11 | @section('content') | 27 | @section('content') |
12 | 28 | ||
13 | <a href="{{ route('admin.education.create') }}" style="width: 195px" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> | 29 | <a href="{{ route('admin.education.create') }}" style="width: 195px" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
14 | Добавить образование | 30 | Добавить образование |
15 | </a> | 31 | </a> |
16 | <br> | 32 | <br> |
17 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 33 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
18 | 34 | ||
19 | <div class="w-full overflow-x-auto"> | 35 | <div class="w-full overflow-x-auto"> |
20 | <table class="w-full whitespace-no-wrap"> | 36 | <table class="w-full whitespace-no-wrap"> |
21 | <thead> | 37 | <thead> |
22 | <tr | 38 | <tr |
23 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 39 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
24 | > | 40 | > |
25 | <th class="px-4 py-3">№</th> | 41 | <th class="px-4 py-3">№</th> |
26 | <th class="px-4 py-3">Название образования</th> | 42 | <th class="px-4 py-3">Название образования</th> |
27 | <th class="px-4 py-3">Редактировать</th> | 43 | <th class="px-4 py-3">Редактировать</th> |
28 | <th class="px-4 py-3">Дата создан/изменен</th> | 44 | <th class="px-4 py-3">Дата создан/изменен</th> |
29 | </tr> | 45 | </tr> |
30 | </thead> | 46 | </thead> |
31 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 47 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
32 | @foreach($education as $cat) | 48 | @foreach($education as $cat) |
33 | <tr class="text-gray-700 dark:text-gray-400"> | 49 | <tr class="text-gray-700 dark:text-gray-400"> |
34 | <td class="px-4 py-3"> | 50 | <td class="px-4 py-3"> |
35 | {{$cat->id}} | 51 | {{$cat->id}} |
36 | </td> | 52 | </td> |
37 | <td class="px-4 py-3"> | 53 | <td class="px-4 py-3"> |
38 | {{ mb_strimwidth($cat->name, 0, 50, "...") }} | 54 | {{ mb_strimwidth($cat->name, 0, 50, "...") }} |
39 | </td> | 55 | </td> |
40 | 56 | ||
41 | <td class="px-4 py-3 text-sm_"> | 57 | <td class="px-4 py-3 text-sm_"> |
42 | <form action="{{ route('admin.education.destroy', ['education' => $cat->id]) }}" method="POST"> | 58 | @if ($cat->id) |
43 | <a href="{{ route('admin.education.edit', ['education' => $cat->id]) }}">Изменить</a> | | 59 | <a href="{{ route('admin.education.edit', ['education' => $cat->id]) }}">Изменить</a> |
44 | @csrf | 60 | | <a @click="openModal" style="cursor: pointer;" data-education="{{$cat->id}}" class="btn_del btn btn-danger">Удалить</a> |
45 | @method('DELETE') | 61 | @endif |
46 | <input class="btn btn-danger" type="submit" value="Удалить"/> | ||
47 | </form> | ||
48 | </td> | 62 | </td> |
49 | <td class="px-4 py-3"> | 63 | <td class="px-4 py-3"> |
50 | <div class="flex items-center text-sm"> | 64 | <div class="flex items-center text-sm"> |
51 | <div> | 65 | <div> |
52 | <p class="font-semibold">{{ date('d.m.Y', strtotime($cat->created_at)) }}</p> | 66 | <p class="font-semibold">{{ date('d.m.Y', strtotime($cat->created_at)) }}</p> |
53 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 67 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
54 | {{ date('d.m.Y', strtotime($cat->updated_at)) }} | 68 | {{ date('d.m.Y', strtotime($cat->updated_at)) }} |
55 | </p> | 69 | </p> |
56 | </div> | 70 | </div> |
57 | </div> | 71 | </div> |
58 | </td> | 72 | </td> |
59 | </tr> | 73 | </tr> |
60 | @endforeach | 74 | @endforeach |
61 | </tbody> | 75 | </tbody> |
62 | </table> | 76 | </table> |
63 | </div> | 77 | </div> |
64 | 78 | ||
65 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 79 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
66 | <?=$education->appends($_GET)->links('admin.pagginate'); ?> | 80 | <?=$education->appends($_GET)->links('admin.pagginate'); ?> |
67 | </div> | 81 | </div> |
68 | </div> | 82 | </div> |
resources/views/admin/education/modal.blade.php
File was created | 1 | <!-- Modal backdrop. This what you want to place close to the closing body tag --> | |
2 | <div | ||
3 | x-show="isModalOpen" | ||
4 | x-transition:enter="transition ease-out duration-150" | ||
5 | x-transition:enter-start="opacity-0" | ||
6 | x-transition:enter-end="opacity-100" | ||
7 | x-transition:leave="transition ease-in duration-150" | ||
8 | x-transition:leave-start="opacity-100" | ||
9 | x-transition:leave-end="opacity-0" | ||
10 | class="fixed inset-0 z-30 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center" | ||
11 | > | ||
12 | <!-- Modal --> | ||
13 | <div | ||
14 | x-show="isModalOpen" | ||
15 | x-transition:enter="transition ease-out duration-150" | ||
16 | x-transition:enter-start="opacity-0 transform translate-y-1/2" | ||
17 | x-transition:enter-end="opacity-100" | ||
18 | x-transition:leave="transition ease-in duration-150" | ||
19 | x-transition:leave-start="opacity-100" | ||
20 | x-transition:leave-end="opacity-0 transform translate-y-1/2" | ||
21 | @click.away="closeModal" | ||
22 | @keydown.escape="closeModal" | ||
23 | class="w-full px-6 py-4 overflow-hidden bg-white rounded-t-lg dark:bg-gray-800 sm:rounded-lg sm:m-4 sm:max-w-xl" | ||
24 | role="dialog" | ||
25 | id="modal" | ||
26 | > | ||
27 | <!-- Remove header if you don't want a close icon. Use modal body to place modal tile. --> | ||
28 | <header class="flex justify-end"> | ||
29 | <button | ||
30 | class="inline-flex items-center justify-center w-6 h-6 text-gray-400 transition-colors duration-150 rounded dark:hover:text-gray-200 hover: hover:text-gray-700" | ||
31 | aria-label="close" | ||
32 | @click="closeModal" | ||
33 | > | ||
34 | <svg | ||
35 | class="w-4 h-4" | ||
36 | fill="currentColor" | ||
37 | viewBox="0 0 20 20" | ||
38 | role="img" | ||
39 | aria-hidden="true" | ||
40 | > | ||
41 | <path | ||
42 | d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" | ||
43 | clip-rule="evenodd" | ||
44 | fill-rule="evenodd" | ||
45 | ></path> | ||
46 | </svg> | ||
47 | </button> | ||
48 | </header> | ||
49 | <!-- Modal body --> | ||
50 | <div class="mt-4 mb-6"> | ||
51 | <!-- Modal title --> | ||
52 | <p | ||
53 | class="mb-2 text-lg font-semibold text-gray-700 dark:text-gray-300" | ||
54 | > | ||
55 | Вы действительно хотите удалить это учебное заведение? | ||
56 | </p> | ||
57 | <!-- Modal description --> | ||
58 | <p class="text-sm text-gray-700 dark:text-gray-400"> | ||
59 | Это приведет к удалению всей информации об учебном учреждении | ||
60 | </p> | ||
61 | </div> | ||
62 | <footer | ||
63 | class="flex flex-col items-center justify-end px-6 py-3 -mx-6 -mb-4 space-y-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-50 dark:bg-gray-800" | ||
64 | > | ||
65 | <button | ||
66 | @click="closeModal" | ||
67 | class="w-full px-5 py-3 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 sm:px-4 sm:py-2 sm:w-auto active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray" | ||
68 | > | ||
69 | Отмена | ||
70 | </button> | ||
71 | <form id="form_modal_del" name="form_modal_del" action="admin/education/{education}" method="POST"> | ||
72 | @csrf | ||
73 | @method('DELETE') | ||
74 | <button | ||
75 | type="submit" | ||
76 | class="w-full px-5 py-3 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg sm:w-auto sm:px-4 sm:py-2 active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" | ||
77 | > | ||
78 | Удалить | ||
79 | </button> | ||
80 | </form> | ||
81 | </footer> | ||
82 | </div> | ||
83 | </div> | ||
84 |
resources/views/admin/employer/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Работодатели']) | 1 | @extends('layout.admin', ['title' => 'Админка - Работодатели']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.checkban', function () { | 6 | $(document).on('click', '.checkban', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var ajax_block = $('#ajax_block'); | 9 | var ajax_block = $('#ajax_block'); |
10 | var bool = 0; | 10 | var bool = 0; |
11 | 11 | ||
12 | if(this.checked){ | 12 | if(this.checked){ |
13 | bool = 1; | 13 | bool = 1; |
14 | } else { | 14 | } else { |
15 | bool = 0; | 15 | bool = 0; |
16 | } | 16 | } |
17 | 17 | ||
18 | $.ajax({ | 18 | $.ajax({ |
19 | type: "GET", | 19 | type: "GET", |
20 | url: "{{ url()->full()}}", | 20 | url: "{{ url()->full()}}", |
21 | data: "id=" + value + "&is_ban=" + bool, | 21 | data: "id=" + value + "&is_ban=" + bool, |
22 | success: function (data) { | 22 | success: function (data) { |
23 | console.log('Обновление таблицы пользователей '); | 23 | console.log('Обновление таблицы пользователей '); |
24 | //data = JSON.parse(data); | 24 | //data = JSON.parse(data); |
25 | //console.log(data); | 25 | //console.log(data); |
26 | ajax_block.html(data); | 26 | ajax_block.html(data); |
27 | }, | 27 | }, |
28 | headers: { | 28 | headers: { |
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
30 | }, | 30 | }, |
31 | error: function (data) { | 31 | error: function (data) { |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | }); | 35 | }); |
36 | 36 | ||
37 | }); | 37 | }); |
38 | </script> | 38 | </script> |
39 | <script> | 39 | <script> |
40 | const btns = document.querySelectorAll('.btn_del'); | 40 | const btns = document.querySelectorAll('.btn_del'); |
41 | btns.forEach(btn => { | 41 | btns.forEach(btn => { |
42 | btn.addEventListener('click', (e) => { | 42 | btn.addEventListener('click', (e) => { |
43 | console.log('click button'); | 43 | console.log('click button'); |
44 | let id = e.target.id; | 44 | let id = e.target.id; |
45 | let form = document.getElementById("form_modal_del"); | 45 | let form = document.getElementById("form_modal_del"); |
46 | form.action = "<?=$_SERVER['APP_URL']?>public/admin/employers/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); | 46 | form.action = "<?=$_SERVER['APP_URL']?>public/admin/employers/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); |
47 | //document.getElementById("title_modal").innerHTML = id; | 47 | //document.getElementById("title_modal").innerHTML = id; |
48 | console.log(e.target.getAttribute('data-employer')); | 48 | console.log(e.target.getAttribute('data-employer')); |
49 | console.log(e.target.getAttribute('data-user')); | 49 | console.log(e.target.getAttribute('data-user')); |
50 | 50 | ||
51 | }); | 51 | }); |
52 | }); | 52 | }); |
53 | </script> | 53 | </script> |
54 | @endsection | 54 | @endsection |
55 | 55 | ||
56 | @section('search') | 56 | @section('search') |
57 | @include('admin.find_employer', ['select_category' => $select_category]) | 57 | @include('admin.find_employer', ['select_category' => $select_category]) |
58 | @endsection | 58 | @endsection |
59 | 59 | ||
60 | @section('modal') | 60 | @section('modal') |
61 | @include('admin.employer.modal') | 61 | @include('admin.employer.modal') |
62 | @endsection | 62 | @endsection |
63 | 63 | ||
64 | @section('content') | 64 | @section('content') |
65 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> | 65 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> |
66 | 66 | ||
67 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | 67 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
68 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | 68 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> |
69 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 69 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
70 | <path | 70 | <path |
71 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | 71 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> |
72 | </svg> | 72 | </svg> |
73 | </div> | 73 | </div> |
74 | <div> | 74 | <div> |
75 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | 75 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> |
76 | Всего работодателей | 76 | Всего работодателей |
77 | </p> | 77 | </p> |
78 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | 78 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> |
79 | {{ $all_employer }} | 79 | {{ $all_employer }} |
80 | </p> | 80 | </p> |
81 | </div> | 81 | </div> |
82 | </div> | 82 | </div> |
83 | 83 | ||
84 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | 84 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
85 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | 85 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> |
86 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 86 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
87 | <path | 87 | <path |
88 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | 88 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> |
89 | </svg> | 89 | </svg> |
90 | </div> | 90 | </div> |
91 | <div> | 91 | <div> |
92 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | 92 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> |
93 | Опубликованых | 93 | Опубликованых |
94 | </p> | 94 | </p> |
95 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | 95 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> |
96 | {{ $all_public }} | 96 | {{ $all_public }} |
97 | </p> | 97 | </p> |
98 | </div> | 98 | </div> |
99 | </div> | 99 | </div> |
100 | 100 | ||
101 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | 101 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
102 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | 102 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> |
103 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 103 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
104 | <path | 104 | <path |
105 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | 105 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> |
106 | </svg> | 106 | </svg> |
107 | </div> | 107 | </div> |
108 | <div> | 108 | <div> |
109 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | 109 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> |
110 | На рассмотрении | 110 | На рассмотрении |
111 | </p> | 111 | </p> |
112 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | 112 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> |
113 | {{ $all_status }} | 113 | {{ $all_status }} |
114 | </p> | 114 | </p> |
115 | </div> | 115 | </div> |
116 | </div> | 116 | </div> |
117 | </div> | 117 | </div> |
118 | 118 | ||
119 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 119 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
120 | <div class="w-full overflow-x-auto"> | 120 | <div class="w-full overflow-x-auto"> |
121 | <table class="w-full whitespace-no-wrap"> | 121 | <table class="w-full whitespace-no-wrap"> |
122 | <thead> | 122 | <thead> |
123 | <tr | 123 | <tr |
124 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 124 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
125 | > | 125 | > |
126 | <th class="px-4 py-3">№</th> | 126 | <th class="px-4 py-3">№</th> |
127 | <th class="px-4 py-3">ID</th> | 127 | <th class="px-4 py-3">ID</th> |
128 | <th class="px-4 py-3">Лого</th> | 128 | <th class="px-4 py-3">Лого</th> |
129 | <th class="px-4 py-3">Компания/Email/Тел/Пароль</th> | 129 | <th class="px-4 py-3">Компания/Email/Тел/Пароль</th> |
130 | <th class="px-4 py-3">Категория</th> | 130 | <th class="px-4 py-3">Категория</th> |
131 | <th class="px-4 py-3">Коммент.</th> | 131 | <th class="px-4 py-3">Коммент.</th> |
132 | <th class="px-4 py-3">Дата регист.</th> | 132 | <th class="px-4 py-3">Дата регист.</th> |
133 | <th class="px-4 py-3">Редакт.</th> | 133 | <th class="px-4 py-3">Редакт.</th> |
134 | </tr> | 134 | </tr> |
135 | </thead> | 135 | </thead> |
136 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 136 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
137 | @foreach($users as $user) | 137 | @foreach($users as $user) |
138 | <tr class="text-gray-700 dark:text-gray-400"> | 138 | <tr class="text-gray-700 dark:text-gray-400"> |
139 | <td class="px-4 py-3"> | 139 | <td class="px-4 py-3 text-xs"> |
140 | {{$user->id}} | 140 | {{$user->id}} |
141 | </td> | 141 | </td> |
142 | <td class="px-4 py-3"> | 142 | <td class="px-4 py-3 text-xs"> |
143 | @if (isset($user->code_id)) | 143 | @if (isset($user->code_id)) |
144 | {{$user->code_id}} | 144 | {{$user->code_id}} |
145 | @endif | 145 | @endif |
146 | </td> | 146 | </td> |
147 | <td class="px-4 py-3"> | 147 | <td class="px-4 py-3 text-xs"> |
148 | @if (isset($user->emp_logo) && ($user->emp_logo)) | 148 | @if (isset($user->emp_logo) && ($user->emp_logo)) |
149 | <div class="flex items-center text-sm"> | 149 | <div class="flex items-center text-sm"> |
150 | <div | 150 | <div |
151 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 151 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
152 | > | 152 | > |
153 | <img | 153 | <img |
154 | class="object-cover w-full h-full rounded-full" | 154 | class="object-cover w-full h-full rounded-full" |
155 | src="{{ asset(Storage::url($user->emp_logo)) }}" | 155 | src="{{ asset(Storage::url($user->emp_logo)) }}" |
156 | alt="" | 156 | alt="" |
157 | loading="lazy" | 157 | loading="lazy" |
158 | /> | 158 | /> |
159 | <div | 159 | <div |
160 | class="absolute inset-0 rounded-full shadow-inner" | 160 | class="absolute inset-0 rounded-full shadow-inner" |
161 | aria-hidden="true" | 161 | aria-hidden="true" |
162 | ></div> | 162 | ></div> |
163 | </div> | 163 | </div> |
164 | </div> | 164 | </div> |
165 | @else | 165 | @else |
166 | - | 166 | - |
167 | @endif | 167 | @endif |
168 | </td> | 168 | </td> |
169 | 169 | ||
170 | <td class="px-4 py-3"> | 170 | <td class="px-4 py-3 text-xs"> |
171 | <div class="flex items-center text-sm"> | 171 | <div class="flex items-center text-sm"> |
172 | <div> | 172 | <div> |
173 | <p class="font-semibold">{{$user->name}}</p> | 173 | <p class="font-semibold">{{$user->name}}</p> |
174 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> | 174 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> |
175 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 175 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
176 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} | 176 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} |
177 | </p> | 177 | </p> |
178 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 178 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
179 | @if (!empty($user->pubpassword)) | 179 | @if (!empty($user->pubpassword)) |
180 | {{ base64_decode($user->pubpassword) }} | 180 | {{ base64_decode($user->pubpassword) }} |
181 | @endif | 181 | @endif |
182 | </p> | 182 | </p> |
183 | </div> | 183 | </div> |
184 | </div> | 184 | </div> |
185 | 185 | ||
186 | </td> | 186 | </td> |
187 | <td class="px-4 py-3 text-sm"> | 187 | <td class="px-4 py-3 text-xs"> |
188 | {{ $user->category }} | 188 | {{ $user->category }} |
189 | </td> | 189 | </td> |
190 | <td class="px-4 py-3 text-sm"> | 190 | <td class="px-4 py-3 text-xs"> |
191 | @if (!empty($user->comment_admin)) | 191 | @if (!empty($user->comment_admin)) |
192 | 192 | ||
193 | <a style="text-decoration: underline;" href="{{ route('admin.comment-employer', ['employer' => $user->emp_id]) }}">Есть</a> | 193 | <a style="text-decoration: underline;" href="{{ route('admin.comment-employer', ['employer' => $user->emp_id]) }}">Есть</a> |
194 | @else | 194 | @else |
195 | Нет | 195 | Нет |
196 | @endif | 196 | @endif |
197 | </td> | 197 | </td> |
198 | <td class="px-4 py-3 text-sm"> | 198 | <td class="px-4 py-3 text-xs"> |
199 | {{ date('d.m.Y', strtotime($user->created_at)) }} | 199 | {{ date('d.m.Y', strtotime($user->created_at)) }} |
200 | </td> | 200 | </td> |
201 | <td class="px-4 py-3 text-sm"> | 201 | <td class="px-4 py-3 text-xs"> |
202 | @if (!empty($user->emp_id)) | 202 | @if (!empty($user->emp_id)) |
203 | <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> | 203 | <a href="{{ route('admin.employer-profile', ['employer' => $user->emp_id]) }}">Изменить</a> |
204 | @if ($user->emp_id > 2) | <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a> | 204 | @if ($user->emp_id > 2) | <a @click="openModal" style="cursor: pointer;" data-employer="{{$user->emp_id}}" data-user="{{$user->user_id}}" class="btn_del btn btn-danger">Удалить</a> |
205 | @endif | 205 | @endif |
206 | @endif | 206 | @endif |
207 | </td> | 207 | </td> |
208 | <!--<td class="px-4 py-3 text-sm"> | 208 | <!--<td class="px-4 py-3 text-sm"> |
209 | @if ($user->usr_id > 1) | 209 | @if ($user->usr_id > 1) |
210 | <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | 210 | <input type="checkbox" class="checkban" value="{{$user->usr_id}}" name="ban_{{$user->usr_id}}" {{ ($user->is_ban) ? "checked" : "" }}/> |
211 | @endif | 211 | @endif |
212 | </td>--> | 212 | </td>--> |
213 | </tr> | 213 | </tr> |
214 | @endforeach | 214 | @endforeach |
215 | </tbody> | 215 | </tbody> |
216 | </table> | 216 | </table> |
217 | </div> | 217 | </div> |
218 | 218 | ||
219 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 219 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
220 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> | 220 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> |
221 | </div> | 221 | </div> |
222 | </div> | 222 | </div> |
223 | @endsection | 223 | @endsection |
224 | 224 |
resources/views/admin/users/index_bd.blade.php
1 | @extends('layout.admin', ['title' => $title]) | 1 | @extends('layout.admin', ['title' => $title]) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.check_click', function () { | 6 | $(document).on('click', '.check_click', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var field = this_.attr('data-field'); | 9 | var field = this_.attr('data-field'); |
10 | var ajax_block = $('#ajax_block'); | 10 | var ajax_block = $('#ajax_block'); |
11 | var bool = 0; | 11 | var bool = 0; |
12 | var str_get = ''; | 12 | var str_get = ''; |
13 | 13 | ||
14 | if(this.checked){ | 14 | if(this.checked){ |
15 | bool = 1; | 15 | bool = 1; |
16 | } else { | 16 | } else { |
17 | bool = 0; | 17 | bool = 0; |
18 | } | 18 | } |
19 | console.log(field); | 19 | console.log(field); |
20 | str_get = "id=" + value + "&" + field + "=" + bool; | 20 | str_get = "id=" + value + "&" + field + "=" + bool; |
21 | console.log(str_get); | 21 | console.log(str_get); |
22 | 22 | ||
23 | $.ajax({ | 23 | $.ajax({ |
24 | type: "GET", | 24 | type: "GET", |
25 | url: "{{ url()->full()}}", | 25 | url: "{{ url()->full()}}", |
26 | data: str_get, | 26 | data: str_get, |
27 | success: function (data) { | 27 | success: function (data) { |
28 | console.log('Обновление таблицы пользователей '); | 28 | console.log('Обновление таблицы пользователей '); |
29 | //data = JSON.parse(data); | 29 | //data = JSON.parse(data); |
30 | //console.log(data); | 30 | //console.log(data); |
31 | ajax_block.html(data); | 31 | ajax_block.html(data); |
32 | }, | 32 | }, |
33 | headers: { | 33 | headers: { |
34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 34 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
35 | }, | 35 | }, |
36 | error: function (data) { | 36 | error: function (data) { |
37 | console.log('Error: ' + data); | 37 | console.log('Error: ' + data); |
38 | } | 38 | } |
39 | }); | 39 | }); |
40 | }); | 40 | }); |
41 | }); | 41 | }); |
42 | </script> | 42 | </script> |
43 | |||
44 | <script> | ||
45 | const btns = document.querySelectorAll('.btn_del'); | ||
46 | btns.forEach(btn => { | ||
47 | btn.addEventListener('click', (e) => { | ||
48 | console.log('click button'); | ||
49 | let id = e.target.id; | ||
50 | let form = document.getElementById("form_modal_del"); | ||
51 | form.action = "<?=$_SERVER['APP_URL']?>public/admin/basedata/delete/"+e.target.getAttribute('data-user'); | ||
52 | //document.getElementById("title_modal").innerHTML = id; | ||
53 | console.log(e.target.getAttribute('data-employer')); | ||
54 | console.log(e.target.getAttribute('data-user')); | ||
55 | |||
56 | }); | ||
57 | }); | ||
58 | </script> | ||
59 | @endsection | ||
60 | |||
61 | @section('modal') | ||
62 | @include('admin.users.modal') | ||
43 | @endsection | 63 | @endsection |
44 | 64 | ||
45 | @section('search') | 65 | @section('search') |
46 | @include('admin.find') | 66 | @include('admin.find') |
47 | @endsection | 67 | @endsection |
48 | 68 | ||
49 | @section('content') | 69 | @section('content') |
50 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 70 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
51 | <div class="w-full overflow-x-auto"> | 71 | <div class="w-full overflow-x-auto"> |
52 | <a class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" href="{{ route('admin.add-basedata') }}">Добавить пользователя</a><br><br> | 72 | <a class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" href="{{ route('admin.add-basedata') }}">Добавить пользователя</a><br><br> |
53 | <table class="w-full whitespace-no-wrap"> | 73 | <table class="w-full whitespace-no-wrap"> |
54 | <thead> | 74 | <thead> |
55 | <tr | 75 | <tr |
56 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 76 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
57 | > | 77 | > |
58 | <th class="px-4 py-3">№</th> | 78 | <th class="px-4 py-3">№</th> |
59 | <th class="px-4 py-3">Имя</th> | 79 | <th class="px-4 py-3">Имя</th> |
60 | <th class="px-4 py-3">Email/телефон</th> | 80 | <th class="px-4 py-3">Email/телефон</th> |
61 | <th class="px-4 py-3">Должность</th> | 81 | <th class="px-4 py-3">Должность</th> |
62 | <th class="px-4 py-3">Анкета</th> | 82 | <th class="px-4 py-3">Анкета</th> |
63 | <th class="px-4 py-3">Дата регистрации</th> | 83 | <th class="px-4 py-3">Дата регистрации</th> |
64 | <th class="px-4 py-3">Изменить</th> | 84 | <th class="px-4 py-3">Изменить</th> |
65 | </tr> | 85 | </tr> |
66 | </thead> | 86 | </thead> |
67 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 87 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
68 | @foreach($users as $user) | 88 | @foreach($users as $user) |
69 | <tr class="text-gray-700 dark:text-gray-400"> | 89 | <tr class="text-gray-700 dark:text-gray-400"> |
70 | <td class="px-4 py-3"> | 90 | <td class="px-4 py-3 text-xs"> |
71 | {{$user->id}} | 91 | {{$user->id}} |
72 | </td> | 92 | </td> |
73 | <td class="px-4 py-3"> | 93 | <td class="px-4 py-3 text-xs"> |
74 | <!--<div class="flex items-center text-sm"> | 94 | <!--<div class="flex items-center text-sm"> |
75 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 95 | <div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
76 | <div | 96 | <div |
77 | class="absolute inset-0 rounded-full shadow-inner" | 97 | class="absolute inset-0 rounded-full shadow-inner" |
78 | aria-hidden="true" | 98 | aria-hidden="true" |
79 | ></div> | 99 | ></div> |
80 | </div> | 100 | </div> |
81 | <div> | 101 | <div> |
82 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> | 102 | <p class="font-semibold"><a href="{{ route('admin.users') }}">Пользователи</a></p> |
83 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 103 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
84 | Все пользователи сайта | 104 | Все пользователи сайта |
85 | </p> | 105 | </p> |
86 | </div> | 106 | </div> |
87 | </div> | 107 | </div> |
88 | --> | 108 | --> |
89 | <!--<a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}"></a>--> | 109 | <!--<a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}"></a>--> |
90 | 110 | ||
91 | {{ $user->name }} | 111 | {{ $user->name }} |
92 | </td> | 112 | </td> |
93 | 113 | ||
94 | <td class="px-4 py-3"> | 114 | <td class="px-4 py-3 text-xs"> |
95 | <div class="flex items-center text-sm"> | 115 | <div class="flex items-center text-sm"> |
96 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> | 116 | <!--<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block"> |
97 | <div | 117 | <div |
98 | class="absolute inset-0 rounded-full shadow-inner" | 118 | class="absolute inset-0 rounded-full shadow-inner" |
99 | aria-hidden="true" | 119 | aria-hidden="true" |
100 | ></div> | 120 | ></div> |
101 | </div>--> | 121 | </div>--> |
102 | <div> | 122 | <div> |
103 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> | 123 | <p class="font-semibold">{{ empty($user->employers->email) ? $user->email : $user->employers->email }}</p> |
104 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 124 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
105 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} | 125 | {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} |
106 | </p> | 126 | </p> |
107 | </div> | 127 | </div> |
108 | </div> | 128 | </div> |
109 | </td> | 129 | </td> |
110 | 130 | ||
111 | <!--<td class="px-4 py-3 text-xs"> | 131 | <!--<td class="px-4 py-3 text-xs"> |
112 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 132 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
113 | @if ($user->is_worker) | 133 | @if ($user->is_worker) |
114 | Работник | 134 | Работник |
115 | @else | 135 | @else |
116 | Работодатель | 136 | Работодатель |
117 | @endif | 137 | @endif |
118 | </span> | 138 | </span> |
119 | @if ($user->admin) | 139 | @if ($user->admin) |
120 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 140 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
121 | Администратор | 141 | Администратор |
122 | </span> | 142 | </span> |
123 | @endif | 143 | @endif |
124 | @if ($user->is_bd) | 144 | @if ($user->is_bd) |
125 | <span class="px-2 py-1 font-semibold leading-tight text-red-700 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-700"> | 145 | <span class="px-2 py-1 font-semibold leading-tight text-red-700 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-700"> |
126 | База данных | 146 | База данных |
127 | </span> | 147 | </span> |
128 | @endif | 148 | @endif |
129 | </td>--> | 149 | </td>--> |
130 | 150 | ||
131 | <td class="px-4 py-3 text-xs"> | 151 | <td class="px-4 py-3 text-xs"> |
132 | @if (isset($user->jobtitles[0]->name)) | 152 | @if (isset($user->jobtitles[0]->name)) |
133 | {{ $user->jobtitles[0]->name }} | 153 | {{ $user->jobtitles[0]->name }} |
134 | @else | 154 | @else |
135 | - | 155 | - |
136 | @endif | 156 | @endif |
137 | </td> | 157 | </td> |
138 | 158 | ||
139 | <td class="px-4 py-3 text-sm"> | 159 | <td class="px-4 py-3 text-xs"> |
140 | @if (isset($user->workers[0]->id)) | 160 | @if (isset($user->workers[0]->id)) |
141 | <!--<a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Править</a> |--> | 161 | <!--<a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Править</a> |--> |
142 | <!--<a href="{{ route('admin.doc-basedata', ['user' => $user->id]) }}">Скачать</a>--> | 162 | <!--<a href="{{ route('admin.doc-basedata', ['user' => $user->id]) }}">Скачать</a>--> |
143 | @endif | 163 | @endif |
144 | @isset($user->file) | 164 | @isset($user->file) |
145 | <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">Скачать</a> | 165 | <a class="text-gray-700 dark:text-gray-400" target="blank" href="{{ asset(Storage::url($user->file)) }}">Скачать</a> |
146 | @else | 166 | @else |
147 | <p class="text-gray-700 dark:text-gray-400">-</p> | 167 | <p class="text-gray-700 dark:text-gray-400">-</p> |
148 | @endisset | 168 | @endisset |
149 | </td> | 169 | </td> |
150 | 170 | ||
151 | <td class="px-4 py-3 text-sm"> | 171 | <td class="px-4 py-3 text-xs"> |
152 | {{ date('d.m.Y', strtotime($user->created_at)) }} | 172 | {{ date('d.m.Y', strtotime($user->created_at)) }} |
153 | </td> | 173 | </td> |
154 | 174 | ||
155 | <td class="px-4 py-3 text-sm_"> | 175 | <td class="px-4 py-3 text-xs text-sm_"> |
156 | <form action="{{ route('admin.delete-basedata', ['user' => $user->id]) }}" method="POST"> | 176 | @if (!empty($user->id)) |
157 | <a href="{{ route('admin.edit-basedata', ['user' => $user->id]) }}">Изменить</a> | | 177 | <a href="{{ route('admin.edit-basedata', ['user' => $user->id]) }}">Изменить</a> |
158 | @csrf | 178 | | <a @click="openModal" style="cursor: pointer;" data-user="{{$user->id}}" class="btn_del btn btn-danger">Удалить</a> |
159 | @method('DELETE') | 179 | @endif |
160 | <input class="btn btn-danger" type="submit" value="Удалить"/> | ||
161 | </form> | ||
162 | </td> | 180 | </td> |
163 | </tr> | 181 | </tr> |
164 | @endforeach | 182 | @endforeach |
165 | </tbody> | 183 | </tbody> |
166 | </table> | 184 | </table> |
167 | </div> | 185 | </div> |
168 | 186 | ||
169 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 187 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
170 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> | 188 | <?//=$users->appends($_GET)->links('admin.pagginate'); ?> |
171 | <?=$users->links('admin.pagginate'); ?> | 189 | <?=$users->links('admin.pagginate'); ?> |
172 | </div> | 190 | </div> |
173 | 191 | ||
174 | 192 | ||
175 | <!--<div | 193 | <!--<div |
176 | class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" | 194 | class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" |
177 | > | 195 | > |
178 | <span class="flex items-center col-span-3"> | 196 | <span class="flex items-center col-span-3"> |
179 | Showing 21-30 of 100 | 197 | Showing 21-30 of 100 |
180 | </span> | 198 | </span> |
181 | <span class="col-span-2"></span> | 199 | <span class="col-span-2"></span> |
182 | 200 | ||
183 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | 201 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
184 | <nav aria-label="Table navigation"> | 202 | <nav aria-label="Table navigation"> |
185 | <ul class="inline-flex items-center"> | 203 | <ul class="inline-flex items-center"> |
186 | <li> | 204 | <li> |
187 | <button | 205 | <button |
188 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | 206 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
189 | aria-label="Previous" | 207 | aria-label="Previous" |
190 | > | 208 | > |
191 | <svg | 209 | <svg |
192 | aria-hidden="true" | 210 | aria-hidden="true" |
193 | class="w-4 h-4 fill-current" | 211 | class="w-4 h-4 fill-current" |
194 | viewBox="0 0 20 20" | 212 | viewBox="0 0 20 20" |
195 | > | 213 | > |
196 | <path | 214 | <path |
197 | d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" | 215 | d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" |
198 | clip-rule="evenodd" | 216 | clip-rule="evenodd" |
199 | fill-rule="evenodd" | 217 | fill-rule="evenodd" |
200 | ></path> | 218 | ></path> |
201 | </svg> | 219 | </svg> |
202 | </button> | 220 | </button> |
203 | </li> | 221 | </li> |
204 | <li> | 222 | <li> |
205 | <button | 223 | <button |
206 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 224 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
207 | > | 225 | > |
208 | 1 | 226 | 1 |
209 | </button> | 227 | </button> |
210 | </li> | 228 | </li> |
211 | <li> | 229 | <li> |
212 | <button | 230 | <button |
213 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 231 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
214 | > | 232 | > |
215 | 2 | 233 | 2 |
216 | </button> | 234 | </button> |
217 | </li> | 235 | </li> |
218 | <li> | 236 | <li> |
219 | <button | 237 | <button |
220 | class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" | 238 | class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" |
221 | > | 239 | > |
222 | 3 | 240 | 3 |
223 | </button> | 241 | </button> |
224 | </li> | 242 | </li> |
225 | <li> | 243 | <li> |
226 | <button | 244 | <button |
227 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 245 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
228 | > | 246 | > |
229 | 4 | 247 | 4 |
230 | </button> | 248 | </button> |
231 | </li> | 249 | </li> |
232 | <li> | 250 | <li> |
233 | <span class="px-3 py-1">...</span> | 251 | <span class="px-3 py-1">...</span> |
234 | </li> | 252 | </li> |
235 | <li> | 253 | <li> |
236 | <button | 254 | <button |
237 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 255 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
238 | > | 256 | > |
239 | 8 | 257 | 8 |
240 | </button> | 258 | </button> |
241 | </li> | 259 | </li> |
242 | <li> | 260 | <li> |
243 | <button | 261 | <button |
244 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 262 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
245 | > | 263 | > |
246 | 9 | 264 | 9 |
247 | </button> | 265 | </button> |
248 | </li> | 266 | </li> |
249 | <li> | 267 | <li> |
250 | <button | 268 | <button |
251 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | 269 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
252 | aria-label="Next" | 270 | aria-label="Next" |
253 | > | 271 | > |
254 | <svg | 272 | <svg |
255 | class="w-4 h-4 fill-current" | 273 | class="w-4 h-4 fill-current" |
256 | aria-hidden="true" | 274 | aria-hidden="true" |
257 | viewBox="0 0 20 20" | 275 | viewBox="0 0 20 20" |
258 | > | 276 | > |
259 | <path | 277 | <path |
260 | d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" | 278 | d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" |
261 | clip-rule="evenodd" | 279 | clip-rule="evenodd" |
262 | fill-rule="evenodd" | 280 | fill-rule="evenodd" |
263 | ></path> | 281 | ></path> |
264 | </svg> | 282 | </svg> |
265 | </button> | 283 | </button> |
266 | </li> | 284 | </li> |
267 | </ul> | 285 | </ul> |
268 | </nav> | 286 | </nav> |
269 | </span> | 287 | </span> |
270 | </div>--> | 288 | </div>--> |
271 | </div> | 289 | </div> |
272 | 290 | ||
273 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> | 291 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> |
274 | 292 | ||
275 | 293 |
resources/views/admin/users/modal.blade.php
File was created | 1 | <!-- Modal backdrop. This what you want to place close to the closing body tag --> | |
2 | <div | ||
3 | x-show="isModalOpen" | ||
4 | x-transition:enter="transition ease-out duration-150" | ||
5 | x-transition:enter-start="opacity-0" | ||
6 | x-transition:enter-end="opacity-100" | ||
7 | x-transition:leave="transition ease-in duration-150" | ||
8 | x-transition:leave-start="opacity-100" | ||
9 | x-transition:leave-end="opacity-0" | ||
10 | class="fixed inset-0 z-30 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center" | ||
11 | > | ||
12 | <!-- Modal --> | ||
13 | <div | ||
14 | x-show="isModalOpen" | ||
15 | x-transition:enter="transition ease-out duration-150" | ||
16 | x-transition:enter-start="opacity-0 transform translate-y-1/2" | ||
17 | x-transition:enter-end="opacity-100" | ||
18 | x-transition:leave="transition ease-in duration-150" | ||
19 | x-transition:leave-start="opacity-100" | ||
20 | x-transition:leave-end="opacity-0 transform translate-y-1/2" | ||
21 | @click.away="closeModal" | ||
22 | @keydown.escape="closeModal" | ||
23 | class="w-full px-6 py-4 overflow-hidden bg-white rounded-t-lg dark:bg-gray-800 sm:rounded-lg sm:m-4 sm:max-w-xl" | ||
24 | role="dialog" | ||
25 | id="modal" | ||
26 | > | ||
27 | <!-- Remove header if you don't want a close icon. Use modal body to place modal tile. --> | ||
28 | <header class="flex justify-end"> | ||
29 | <button | ||
30 | class="inline-flex items-center justify-center w-6 h-6 text-gray-400 transition-colors duration-150 rounded dark:hover:text-gray-200 hover: hover:text-gray-700" | ||
31 | aria-label="close" | ||
32 | @click="closeModal" | ||
33 | > | ||
34 | <svg | ||
35 | class="w-4 h-4" | ||
36 | fill="currentColor" | ||
37 | viewBox="0 0 20 20" | ||
38 | role="img" | ||
39 | aria-hidden="true" | ||
40 | > | ||
41 | <path | ||
42 | d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" | ||
43 | clip-rule="evenodd" | ||
44 | fill-rule="evenodd" | ||
45 | ></path> | ||
46 | </svg> | ||
47 | </button> | ||
48 | </header> | ||
49 | <!-- Modal body --> | ||
50 | <div class="mt-4 mb-6"> | ||
51 | <!-- Modal title --> | ||
52 | <p | ||
53 | class="mb-2 text-lg font-semibold text-gray-700 dark:text-gray-300" | ||
54 | > | ||
55 | Вы действительно хотите удалить пользователя? | ||
56 | </p> | ||
57 | <!-- Modal description --> | ||
58 | <p class="text-sm text-gray-700 dark:text-gray-400"> | ||
59 | Это приведет к удалению всей информации о пользователе<br> | ||
60 | на данном проекте. | ||
61 | </p> | ||
62 | </div> | ||
63 | <footer | ||
64 | class="flex flex-col items-center justify-end px-6 py-3 -mx-6 -mb-4 space-y-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-50 dark:bg-gray-800" | ||
65 | > | ||
66 | <button | ||
67 | @click="closeModal" | ||
68 | class="w-full px-5 py-3 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 sm:px-4 sm:py-2 sm:w-auto active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray" | ||
69 | > | ||
70 | Отмена | ||
71 | </button> | ||
72 | <form id="form_modal_del" name="form_modal_del" action="/basedata/delete/{user}" method="POST"> | ||
73 | @csrf | ||
74 | @method('DELETE') | ||
75 | <button | ||
76 | type="submit" | ||
77 | class="w-full px-5 py-3 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg sm:w-auto sm:px-4 sm:py-2 active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" | ||
78 | > | ||
79 | Удалить | ||
80 | </button> | ||
81 | </form> | ||
82 | </footer> | ||
83 | </div> | ||
84 | </div> | ||
85 |
resources/views/admin/worker/index.blade.php
1 | @extends('layout.admin', ['title' => 'Админка - Работники']) | 1 | @extends('layout.admin', ['title' => 'Админка - Работники']) |
2 | 2 | ||
3 | @section('script') | 3 | @section('script') |
4 | <script> | 4 | <script> |
5 | $(document).ready(function() { | 5 | $(document).ready(function() { |
6 | $(document).on('click', '.checkban', function () { | 6 | $(document).on('click', '.checkban', function () { |
7 | var this_ = $(this); | 7 | var this_ = $(this); |
8 | var value = this_.val(); | 8 | var value = this_.val(); |
9 | var ajax_block = $('#ajax_block'); | 9 | var ajax_block = $('#ajax_block'); |
10 | var bool = 0; | 10 | var bool = 0; |
11 | 11 | ||
12 | if(this.checked){ | 12 | if(this.checked){ |
13 | bool = 1; | 13 | bool = 1; |
14 | } else { | 14 | } else { |
15 | bool = 0; | 15 | bool = 0; |
16 | } | 16 | } |
17 | 17 | ||
18 | $.ajax({ | 18 | $.ajax({ |
19 | type: "GET", | 19 | type: "GET", |
20 | url: "{{ url()->full()}}", | 20 | url: "{{ url()->full()}}", |
21 | data: "id=" + value + "&is_ban=" + bool, | 21 | data: "id=" + value + "&is_ban=" + bool, |
22 | success: function (data) { | 22 | success: function (data) { |
23 | console.log('Обновление таблицы работников '); | 23 | console.log('Обновление таблицы работников '); |
24 | //data = JSON.parse(data); | 24 | //data = JSON.parse(data); |
25 | console.log(data); | 25 | console.log(data); |
26 | ajax_block.html(data); | 26 | ajax_block.html(data); |
27 | }, | 27 | }, |
28 | headers: { | 28 | headers: { |
29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 29 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
30 | }, | 30 | }, |
31 | error: function (data) { | 31 | error: function (data) { |
32 | console.log('Error: ' + data); | 32 | console.log('Error: ' + data); |
33 | } | 33 | } |
34 | }); | 34 | }); |
35 | }); | 35 | }); |
36 | 36 | ||
37 | }); | 37 | }); |
38 | </script> | 38 | </script> |
39 | @endsection | 39 | @endsection |
40 | 40 | ||
41 | @section('search') | 41 | @section('search') |
42 | @include('admin.find_worker', ['find_status_work' => $find_status_work]) | 42 | @include('admin.find_worker', ['find_status_work' => $find_status_work]) |
43 | @endsection | 43 | @endsection |
44 | 44 | ||
45 | @section('content') | 45 | @section('content') |
46 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> | 46 | <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4"> |
47 | 47 | ||
48 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | 48 | <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> |
49 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | 49 | <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> |
50 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | 50 | <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> |
51 | <path | 51 | <path |
52 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | 52 | d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> |
53 | </svg> | 53 | </svg> |
54 | </div> | 54 | </div> |
55 | <div> | 55 | <div> |
56 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | 56 | <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> |
57 | Всего соискателей | 57 | Всего соискателей |
58 | </p> | 58 | </p> |
59 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | 59 | <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> |
60 | {{ $all_worker }} | 60 | {{ $all_worker }} |
61 | </p> | 61 | </p> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | </div> | 64 | </div> |
65 | 65 | ||
66 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> | 66 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
67 | <div class="w-full overflow-x-auto"> | 67 | <div class="w-full overflow-x-auto"> |
68 | <table class="w-full whitespace-no-wrap"> | 68 | <table class="w-full whitespace-no-wrap"> |
69 | <thead> | 69 | <thead> |
70 | <tr | 70 | <tr |
71 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" | 71 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
72 | > | 72 | > |
73 | <th class="px-4 py-3">№</th> | 73 | <th class="px-4 py-3">№</th> |
74 | <th class="px-4 py-3">Лого</th> | 74 | <th class="px-4 py-3">Лого</th> |
75 | <th class="px-4 py-3">ФИО/Email/Телефон</th> | 75 | <th class="px-4 py-3">ФИО/Email/Телефон</th> |
76 | <th class="px-4 py-3">Статус</th> | 76 | <th class="px-4 py-3">Статус</th> |
77 | <th class="px-4 py-3">% анкеты</th> | 77 | <th class="px-4 py-3">% анкеты</th> |
78 | <th class="px-4 py-3">Должность</th> | 78 | <th class="px-4 py-3">Должность</th> |
79 | <th class="px-4 py-3">Дата регистрации</th> | 79 | <th class="px-4 py-3">Дата регистрации</th> |
80 | <th class="px-4 py-3">Изменить</th> | 80 | <th class="px-4 py-3">Изменить</th> |
81 | </tr> | 81 | </tr> |
82 | </thead> | 82 | </thead> |
83 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> | 83 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
84 | @foreach($users as $user) | 84 | @foreach($users as $user) |
85 | <tr class="text-gray-700 dark:text-gray-400"> | 85 | <tr class="text-gray-700 dark:text-gray-400"> |
86 | <td class="px-4 py-3"> | 86 | <td class="px-4 py-3 text-xs"> |
87 | {{$user->id}} | 87 | {{$user->id}} |
88 | </td> | 88 | </td> |
89 | <td class="px-4 py-3"> | 89 | <td class="px-4 py-3 text-xs"> |
90 | @if (isset($user->workers[0]->photo)) | 90 | @if (isset($user->workers[0]->photo)) |
91 | <div class="flex items-center text-sm"> | 91 | <div class="flex items-center text-sm"> |
92 | <div | 92 | <div |
93 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" | 93 | class="relative hidden w-8 h-8 mr-3 rounded-full md:block" |
94 | > | 94 | > |
95 | <img | 95 | <img |
96 | class="object-cover w-full h-full rounded-full" | 96 | class="object-cover w-full h-full rounded-full" |
97 | src="{{ asset(Storage::url($user->workers[0]->photo)) }}" | 97 | src="{{ asset(Storage::url($user->workers[0]->photo)) }}" |
98 | alt="" | 98 | alt="" |
99 | loading="lazy" | 99 | loading="lazy" |
100 | /> | 100 | /> |
101 | <div | 101 | <div |
102 | class="absolute inset-0 rounded-full shadow-inner" | 102 | class="absolute inset-0 rounded-full shadow-inner" |
103 | aria-hidden="true" | 103 | aria-hidden="true" |
104 | ></div> | 104 | ></div> |
105 | </div> | 105 | </div> |
106 | </div> | 106 | </div> |
107 | @else | 107 | @else |
108 | - | 108 | - |
109 | @endif | 109 | @endif |
110 | </td> | 110 | </td> |
111 | 111 | ||
112 | <td class="px-4 py-3"> | 112 | <td class="px-4 py-3 text-xs"> |
113 | <div class="flex items-center text-sm"> | 113 | <div class="flex items-center text-sm"> |
114 | <div> | 114 | <div> |
115 | <p class="font-semibold"> | 115 | <p class="font-semibold"> |
116 | @if (isset($user->id)) | 116 | @if (isset($user->id)) |
117 | <a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}}">{{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }}</a> | 117 | <a style="text-decoration: underline;" href="{{ route('admin.user-profile', ['user' => $user->id]) }}}">{{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }}</a> |
118 | @else | 118 | @else |
119 | {{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }} | 119 | {{ $user->surname }} {{ !empty($user->name_man) ? $user->name_man : $user->name }} {{ $user->surname2 }} |
120 | @endif | 120 | @endif |
121 | </p> | 121 | </p> |
122 | <p class="font-semibold">{{ empty($user->workers->email) ? $user->email : $user->workers->email }}</p> | 122 | <p class="font-semibold">{{ empty($user->workers->email) ? $user->email : $user->workers->email }}</p> |
123 | <p class="text-xs text-gray-600 dark:text-gray-400"> | 123 | <p class="text-xs text-gray-600 dark:text-gray-400"> |
124 | {{ empty($user->workers->telephone) ? $user->telephone : $user->workers->telephone }} | 124 | {{ empty($user->workers->telephone) ? $user->telephone : $user->workers->telephone }} |
125 | </p> | 125 | </p> |
126 | </div> | 126 | </div> |
127 | </div> | 127 | </div> |
128 | </td> | 128 | </td> |
129 | 129 | ||
130 | <td class="px-4 py-3"> | 130 | <td class="px-4 py-3 text-xs"> |
131 | @if (isset($user->workers[0]->status_work)) | 131 | @if (isset($user->workers[0]->status_work)) |
132 | {{ $status_wor[$user->workers[0]->status_work] }} | 132 | {{ $status_wor[$user->workers[0]->status_work] }} |
133 | @else | 133 | @else |
134 | - | 134 | - |
135 | @endif | 135 | @endif |
136 | </td> | 136 | </td> |
137 | 137 | ||
138 | <td class="px-4 py-3 text-xs"> | 138 | <td class="px-4 py-3 text-xs"> |
139 | @if (isset($user->workers[0]->persent_anketa)) | 139 | @if (isset($user->workers[0]->persent_anketa)) |
140 | @if ($user->workers[0]->persent_anketa > 40) | 140 | @if ($user->workers[0]->persent_anketa > 40) |
141 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> | 141 | <span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"> |
142 | {{$user->workers[0]->persent_anketa}}% | 142 | {{$user->workers[0]->persent_anketa}}% |
143 | </span> | 143 | </span> |
144 | @else | 144 | @else |
145 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 145 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
146 | {{$user->workers[0]->persent_anketa}}% | 146 | {{$user->workers[0]->persent_anketa}}% |
147 | </span> | 147 | </span> |
148 | @endif | 148 | @endif |
149 | @else | 149 | @else |
150 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> | 150 | <span class="px-2 py-1 font-semibold leading-tight text-orange-700 bg-orange-100 rounded-full dark:text-white dark:bg-orange-600"> |
151 | 0% | 151 | 0% |
152 | </span> | 152 | </span> |
153 | @endif | 153 | @endif |
154 | </td> | 154 | </td> |
155 | <td class="px-4 py-3 text-sm"> | 155 | <td class="px-4 py-3 text-xs"> |
156 | @if (isset($user->jobtitles[0]->name)) | 156 | @if (isset($user->jobtitles[0]->name)) |
157 | {{ $user->jobtitles[0]->name }} | 157 | {{ $user->jobtitles[0]->name }} |
158 | @else | 158 | @else |
159 | Не задана | 159 | Не задана |
160 | @endif | 160 | @endif |
161 | </td> | 161 | </td> |
162 | <td class="px-4 py-3 text-sm"> | 162 | <td class="px-4 py-3 text-xs"> |
163 | {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }} | 163 | {{ date('d.m.Y h:i:s', strtotime($user->created_at)) }} |
164 | </td> | 164 | </td> |
165 | <td class="px-4 py-3 text-sm"> | 165 | <td class="px-4 py-3 text-xs"> |
166 | <!--if ($user->id > 1)--> | 166 | <!--if ($user->id > 1)--> |
167 | @if (isset($user->workers[0]->id)) | 167 | @if (isset($user->workers[0]->id)) |
168 | <a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Изменить</a> | 168 | <a href="{{ route('admin.worker-profile-edit', ['worker' => $user->workers[0]->id]) }}">Изменить</a> |
169 | 169 | ||
170 | @endif | 170 | @endif |
171 | <!--endif--> | 171 | <!--endif--> |
172 | </td> | 172 | </td> |
173 | <!--<td class="px-4 py-3 text-sm"> | 173 | <!--<td class="px-4 py-3 text-sm"> |
174 | @if ($user->id > 1) | 174 | @if ($user->id > 1) |
175 | <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> | 175 | <input type="checkbox" class="checkban" value="{{$user->id}}" name="ban_{{$user->id}}" {{ ($user->is_ban) ? "checked" : "" }}/> |
176 | @endif | 176 | @endif |
177 | </td>--> | 177 | </td>--> |
178 | </tr> | 178 | </tr> |
179 | @endforeach | 179 | @endforeach |
180 | </tbody> | 180 | </tbody> |
181 | </table> | 181 | </table> |
182 | </div> | 182 | </div> |
183 | 183 | ||
184 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> | 184 | <div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"> |
185 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> | 185 | <?=$users->appends($_GET)->links('admin.pagginate'); ?> |
186 | </div> | 186 | </div> |
187 | 187 | ||
188 | 188 | ||
189 | <!--<div | 189 | <!--<div |
190 | class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" | 190 | class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" |
191 | > | 191 | > |
192 | <span class="flex items-center col-span-3"> | 192 | <span class="flex items-center col-span-3"> |
193 | Showing 21-30 of 100 | 193 | Showing 21-30 of 100 |
194 | </span> | 194 | </span> |
195 | <span class="col-span-2"></span> | 195 | <span class="col-span-2"></span> |
196 | 196 | ||
197 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> | 197 | <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
198 | <nav aria-label="Table navigation"> | 198 | <nav aria-label="Table navigation"> |
199 | <ul class="inline-flex items-center"> | 199 | <ul class="inline-flex items-center"> |
200 | <li> | 200 | <li> |
201 | <button | 201 | <button |
202 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" | 202 | class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
203 | aria-label="Previous" | 203 | aria-label="Previous" |
204 | > | 204 | > |
205 | <svg | 205 | <svg |
206 | aria-hidden="true" | 206 | aria-hidden="true" |
207 | class="w-4 h-4 fill-current" | 207 | class="w-4 h-4 fill-current" |
208 | viewBox="0 0 20 20" | 208 | viewBox="0 0 20 20" |
209 | > | 209 | > |
210 | <path | 210 | <path |
211 | d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" | 211 | d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" |
212 | clip-rule="evenodd" | 212 | clip-rule="evenodd" |
213 | fill-rule="evenodd" | 213 | fill-rule="evenodd" |
214 | ></path> | 214 | ></path> |
215 | </svg> | 215 | </svg> |
216 | </button> | 216 | </button> |
217 | </li> | 217 | </li> |
218 | <li> | 218 | <li> |
219 | <button | 219 | <button |
220 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 220 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
221 | > | 221 | > |
222 | 1 | 222 | 1 |
223 | </button> | 223 | </button> |
224 | </li> | 224 | </li> |
225 | <li> | 225 | <li> |
226 | <button | 226 | <button |
227 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 227 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
228 | > | 228 | > |
229 | 2 | 229 | 2 |
230 | </button> | 230 | </button> |
231 | </li> | 231 | </li> |
232 | <li> | 232 | <li> |
233 | <button | 233 | <button |
234 | class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" | 234 | class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" |
235 | > | 235 | > |
236 | 3 | 236 | 3 |
237 | </button> | 237 | </button> |
238 | </li> | 238 | </li> |
239 | <li> | 239 | <li> |
240 | <button | 240 | <button |
241 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 241 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
242 | > | 242 | > |
243 | 4 | 243 | 4 |
244 | </button> | 244 | </button> |
245 | </li> | 245 | </li> |
246 | <li> | 246 | <li> |
247 | <span class="px-3 py-1">...</span> | 247 | <span class="px-3 py-1">...</span> |
248 | </li> | 248 | </li> |
249 | <li> | 249 | <li> |
250 | <button | 250 | <button |
251 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 251 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
252 | > | 252 | > |
253 | 8 | 253 | 8 |
254 | </button> | 254 | </button> |
255 | </li> | 255 | </li> |
256 | <li> | 256 | <li> |
257 | <button | 257 | <button |
258 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" | 258 | class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
259 | > | 259 | > |
260 | 9 | 260 | 9 |
261 | </button> | 261 | </button> |
262 | </li> | 262 | </li> |
263 | <li> | 263 | <li> |
264 | <button | 264 | <button |
265 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" | 265 | class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
266 | aria-label="Next" | 266 | aria-label="Next" |
267 | > | 267 | > |
268 | <svg | 268 | <svg |
269 | class="w-4 h-4 fill-current" | 269 | class="w-4 h-4 fill-current" |
270 | aria-hidden="true" | 270 | aria-hidden="true" |
271 | viewBox="0 0 20 20" | 271 | viewBox="0 0 20 20" |
272 | > | 272 | > |
273 | <path | 273 | <path |
274 | d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" | 274 | d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" |
275 | clip-rule="evenodd" | 275 | clip-rule="evenodd" |
276 | fill-rule="evenodd" | 276 | fill-rule="evenodd" |
277 | ></path> | 277 | ></path> |
278 | </svg> | 278 | </svg> |
279 | </button> | 279 | </button> |
280 | </li> | 280 | </li> |
281 | </ul> | 281 | </ul> |
282 | </nav> | 282 | </nav> |
283 | </span> | 283 | </span> |
284 | </div>--> | 284 | </div>--> |
285 | </div> | 285 | </div> |
286 | 286 | ||
287 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> | 287 | <?//=$users->appends($_GET)->links('catalogs.paginate'); ?> |
288 | 288 | ||
289 | 289 | ||
290 | @endsection | 290 | @endsection |
291 | 291 |