Commit 185d7799ae1231b5c6077250eee54744e488e606

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

ajax-таблица после обновления в разделе вакансии

Showing 1 changed file with 22 additions and 18 deletions Inline Diff

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">Дата создан/<br>изменен.</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 text-xs"> 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 text-xs"> 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 text-xs"> 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 text-xs">
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 class="text-xs">
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 text-xs"> 54 <td class="px-4 py-3 class4 text-xs">
55 <div class="flex items-center text-xs"> 55 <div class="flex items-center text-sm 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 text-xs">{{ mb_strimwidth($title->name, 0, 35, "...") }}</p>
62 <?php } else {?> 62 <?php } else {?>
63 <p class="font-semibold">/ {{$title->name}}</p> 63 <p class="font-semibold text-xs">/ {{ mb_strimwidth($title->name, 0, 35, "...") }}</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 text-xs"> 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 text-xs"> 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 text-xs"> 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 text-xs"> 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-xs">
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 </td> 112 </td>
112 113
113 <td class="px-4 py-3 text-sm class10 text-xs"> 114 <td class="px-4 py-3 text-sm class10 text-xs">
114 <a href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}"> 115 <form action="{{ route('admin.delete-ad-employer', ['ad_employer' => $ad->id]) }}" method="POST">
115 Изменить 116 <a class="text-xs" href="{{ route('admin.edit-ad-employers', ['ad_employer' => $ad->id]) }}">Изменить</a> |
116 </a> 117 @csrf
118 @method('DELETE')
119 <input class="btn btn-danger text-xs" type="submit" value="Удалить"/>
120 </form>
117 </td> 121 </td>
118 </tr> 122 </tr>
119 @endforeach 123 @endforeach
120 </tbody> 124 </tbody>
121 </table> 125 </table>
122 </div> 126 </div>
123 127
124 <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"> 128 <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 <?=$ad_employers->appends($_GET)->links('admin.pagginate'); ?> 129 <?=$ad_employers->appends($_GET)->links('admin.pagginate'); ?>
126 </div> 130 </div>
127 131
128 132