Commit d24c4fc7fb7103c32294090296c32a156072cdff

Authored by Fedor K
Exists in master

Merge branch 'task-132985' into 'master'

Task 132985

Showing 8 changed files Inline Diff

resources/views/admin/message/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 $('.rejecte-button').click(function(){ 6 $('.rejecte-button').click(function(){
7 var this_btn = $(this); 7 var this_btn = $(this);
8 var wrap = this_btn.closest('tr'); 8 var wrap = this_btn.closest('tr');
9 var message_id = wrap.data('message-id'); 9 var message_id = wrap.data('message-id');
10 var target = wrap.find('.user-name').text(); 10 var target = wrap.find('.user-name').text();
11 11
12 $('#rejecte_message').data('message-id', message_id); 12 $('#rejecte_message').data('message-id', message_id);
13 $('#rejecte_message').find('.user-name').text(target.trim()); 13 $('#rejecte_message').find('.user-name').text(target.trim());
14 $('#rejecte_message').find('.message-id').text(message_id); 14 $('#rejecte_message').find('.message-id').text(message_id);
15 }); 15 });
16 16
17 $('.send-button').click(function(){cl(1000); 17 $('.send-button').click(function(){cl(1000);
18 var this_btn = $(this); 18 var this_btn = $(this);
19 var wrap = this_btn.closest('tr'); 19 var wrap = this_btn.closest('tr');
20 var message_id = wrap.data('message-id'); 20 var message_id = wrap.data('message-id');
21 var target = wrap.find('.user-name').text(); 21 var target = wrap.find('.user-name').text();
22 22
23 $('#send_message').data('message-id', message_id); 23 $('#send_message').data('message-id', message_id);
24 $('#send_message').find('.user-name').text(target.trim()); 24 $('#send_message').find('.user-name').text(target.trim());
25 $('#send_message').find('.message-id').text(message_id); 25 $('#send_message').find('.message-id').text(message_id);
26 }); 26 });
27 27
28 $(document).on('change', '.checkread', function () { 28 $(document).on('change', '.checkread', function () {
29 var this_ = $(this); 29 var this_ = $(this);
30 var value = this_.val(); 30 var value = this_.val();
31 var ajax_block = $('#ajax_block'); 31 var ajax_block = $('#ajax_block');
32 var bool = 0; 32 var bool = 0;
33 33
34 if(this.checked){ 34 if(this.checked){
35 bool = 1; 35 bool = 1;
36 } else { 36 } else {
37 bool = 0; 37 bool = 0;
38 } 38 }
39 39
40 $.ajax({ 40 $.ajax({
41 type: "GET", 41 type: "GET",
42 url: "{{ url()->full()}}", 42 url: "{{ url()->full()}}",
43 data: "id=" + value + "&flag_new=" + bool, 43 data: "id=" + value + "&flag_new=" + bool,
44 success: function (data) { 44 success: function (data) {
45 console.log('Обновление таблицы сообщений администратора '); 45 console.log('Обновление таблицы сообщений администратора ');
46 //data = JSON.parse(data); 46 //data = JSON.parse(data);
47 //console.log(data); 47 //console.log(data);
48 ajax_block.html(data); 48 ajax_block.html(data);
49 }, 49 },
50 headers: { 50 headers: {
51 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 51 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
52 }, 52 },
53 error: function (data) { 53 error: function (data) {
54 console.log('Error: ' + data); 54 console.log('Error: ' + data);
55 } 55 }
56 }); 56 });
57 }); 57 });
58 58
59 }); 59 });
60 </script> 60 </script>
61 @endsection 61 @endsection
62 62
63 @section('content') 63 @section('content')
64 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 64 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
65 <div class="w-full overflow-x-auto"> 65 <div class="w-full overflow-x-auto">
66 <table class="w-full"> 66 <table class="w-full">
67 <thead> 67 <thead>
68 <tr 68 <tr
69 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" 69 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"
70 > 70 >
71 <th class="px-4 py-3">№</th> 71 <th class="px-4 py-3">№</th>
72 <th class="px-4 py-3">От юзера</th> 72 <th class="px-4 py-3">От юзера</th>
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">Дата</th> 75 <th class="px-4 py-3">Дата</th>
76 <th class="px-4 py-3"></th> 76 <th class="px-4 py-3"></th>
77 </tr> 77 </tr>
78 </thead> 78 </thead>
79 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 79 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
80 @foreach($Msgs as $msg) 80 @foreach($Msgs as $msg)
81 <tr class="text-gray-700 dark:text-gray-400" data-message-id="{{ $msg->id }}"> 81 <tr class="text-gray-700 dark:text-gray-400" data-message-id="{{ $msg->id }}">
82 <td class="px-4 py-3"> 82 <td class="px-4 py-3">
83 {{ $msg->id }} 83 {{ $msg->id }}
84 </td> 84 </td>
85 <td class="px-4 py-3"> 85 <td class="px-4 py-3">
86 <div class="user-name"> 86 <div class="user-name">
87 @if (isset($msg->user->name)) 87 @if (isset($msg->user->name))
88 {{$msg->user->name}} ({{$msg->user->id}}) 88 {{$msg->user->name}} ({{$msg->user->id}})
89 @else 89 @else
90 Пользователь удален 90 Пользователь удален
91 @endif 91 @endif
92 </div> 92 </div>
93 </td> 93 </td>
94 <td class="px-4 py-3"> 94 <td class="px-4 py-3">
95 @if($msg->job_titles) 95 @if($msg->job_titles)
96 @foreach($msg->jobs as $job) 96 @foreach($msg->jobs as $job)
97 {{ $job->name }} 97 {{ $job->name }}
98 @if(!$loop->last) 98 @if(!$loop->last)
99 <br> 99 <br>
100 @endif 100 @endif
101 @endforeach 101 @endforeach
102 @endif 102 @endif
103 </td> 103 </td>
104 <td class="px-4 py-3"> 104 <td class="px-4 py-3">
105 <div> 105 <div>
106 {{ $msg->text }} 106 {{ $msg->text }}
107 </div> 107 </div>
108 </td> 108 </td>
109 <td class="px-4 py-3 text-sm"> 109 <td class="px-4 py-3 text-sm">
110 {{ date('d.m.Y h:i:s', strtotime($msg->created_at)) }} 110 {{ date('d.m.Y h:i:s', strtotime($msg->created_at)) }}
111 </td> 111 </td>
112 <td class="px-4 py-3"> 112 <td class="px-4 py-3">
113 @if($msg->is_rejected) 113 @if($msg->is_rejected)
114 Отклонено 114 Отклонено
115 @elseif($msg->is_sent) 115 @elseif($msg->is_sent)
116 Отправлено 116 Отправлено
117 @else 117 @else
118 <div class=""> 118 <div class="">
119 <button class="rejecte-button mb-10 px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-red-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" 119 <button class="rejecte-button mb-10 px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-red-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
120 data-fancybox data-src="#rejecte_message" 120 data-fancybox data-src="#rejecte_message"
121 > 121 >
122 Отклонить 122 Отклонить
123 </button> 123 </button>
124 <button class="send-button px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-green-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple" 124 <button class="send-button px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-green-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
125 data-fancybox data-src="#send_message" 125 data-fancybox data-src="#send_message"
126 > 126 >
127 Отправить 127 Отправить
128 </button> 128 </button>
129 </div> 129 </div>
130 @endif 130 @endif
131 </td> 131 </td>
132 </tr> 132 </tr>
133 @endforeach 133 @endforeach
134 </tbody> 134 </tbody>
135 </table> 135 </table>
136 </div> 136 </div>
137 137
138 <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"> 138 <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">
139 <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?> 139 <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?>
140 </div> 140 </div>
141 </div><br> 141 </div><br>
142 142
143 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block2"> 143 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block2">
144 144
145 <form method="POST" action="{{ route('admin.admin-messages-post') }}" enctype="multipart/form-data"> 145 <form method="POST" action="{{ route('admin.admin-messages-post') }}" enctype="multipart/form-data">
146 @csrf 146 @csrf
147 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> 147 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
148 <h3 class="text-gray-700 dark:text-gray-400">Отправка сообщения</h3> 148 <h3 class="text-gray-700 dark:text-gray-400">Отправка сообщения</h3>
149 <hr> 149 <hr>
150 <label for="ad_employer_id" class="block text-sm"> 150 <label for="ad_employer_id" class="block text-sm">
151 <input type="hidden" name="user_id" id="user_id" value="{{ $id_admin }}"/> 151 <input type="hidden" name="user_id" id="user_id" value="{{ $id_admin }}"/>
152 152
153 <span class="text-gray-700 dark:text-gray-400">Кому:</span> 153 <span class="text-gray-700 dark:text-gray-400">Кому:</span>
154 154
155 <select name="to_user_id" id="to_user_id" class="block change_js mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"> 155 <select name="to_user_id" id="to_user_id" class="block change_js mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray">
156 @foreach($users as $user) 156 @foreach($users as $user)
157 <option value="{{ $user->id }}">{{ $user->name }} ({{ $user->id }})</option> 157 <option value="{{ $user->id }}">{{ $user->name }} ({{ $user->id }})</option>
158 @endforeach 158 @endforeach
159 </select> 159 </select>
160 </label><br> 160 </label><br>
161 161
162 <label class="block text-sm"> 162 <label class="block text-sm">
163 <span class="text-gray-700 dark:text-gray-400">Заголовок</span> 163 <span class="text-gray-700 dark:text-gray-400">Заголовок</span>
164 <input name="title" id="title" 164 <input name="title" id="title"
165 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 165 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
166 placeholder="Заголовок" value="{{ old('title') ?? '' }}" 166 placeholder="Заголовок" value="{{ old('title') ?? '' }}"
167 /> 167 />
168 @error('title') 168 @error('title')
169 <span class="text-xs text-red-600 dark:text-red-400"> 169 <span class="text-xs text-red-600 dark:text-red-400">
170 {{ $message }} 170 {{ $message }}
171 </span> 171 </span>
172 @enderror 172 @enderror
173 </label><br> 173 </label><br>
174 174
175 <label class="block text-sm"> 175 <label class="block text-sm">
176 <span class="text-gray-700 dark:text-gray-400">Текст</span> 176 <span class="text-gray-700 dark:text-gray-400">Текст</span>
177 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" name="text" placeholder="Текст" required 177 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" name="text" placeholder="Текст" required
178 rows="4">{{ old('text') ?? '' }}</textarea> 178 rows="4">{{ old('text') ?? '' }}</textarea>
179 @error('text') 179 @error('text')
180 <span class="text-xs text-red-600 dark:text-red-400"> 180 <span class="text-xs text-red-600 dark:text-red-400">
181 {{ $message }} 181 {{ $message }}
182 </span> 182 </span>
183 @enderror 183 @enderror
184 </label><br> 184 </label><br>
185 185
186 186
187 <label class="block text-sm"> 187 <label class="block text-sm">
188 <span class="text-gray-700 dark:text-gray-400">Файл</span> 188 <span class="text-gray-700 dark:text-gray-400">Файл</span>
189 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 189 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700
190 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple 190 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple
191 dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 191 dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
192 id="file" name="file" accept=".pdf, .xls, .xlsx"> 192 id="file" name="file" accept=".pdf, .doc, .docx">
193 @error('file') 193 @error('file')
194 <span class="text-xs text-red-600 dark:text-red-400"> 194 <span class="text-xs text-red-600 dark:text-red-400">
195 {{ $message }} 195 {{ $message }}
196 </span> 196 </span>
197 @enderror 197 @enderror
198 </label><br> 198 </label><br>
199 199
200 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> 200 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
201 <div> 201 <div>
202 <button type="submit" 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"> 202 <button type="submit" 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">
203 Отправить 203 Отправить
204 </button> 204 </button>
205 </div> 205 </div>
206 </div> 206 </div>
207 </div> 207 </div>
208 </form> 208 </form>
209 </div> 209 </div>
210 210
211 @include('modals.admin.messages.rejecte_message') 211 @include('modals.admin.messages.rejecte_message')
212 @include('modals.admin.messages.send_message') 212 @include('modals.admin.messages.send_message')
213 @endsection 213 @endsection
214 214
resources/views/admin/message/index2.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('change', '.checkread', function () { 6 $(document).on('change', '.checkread', 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 + "&flag_new=" + bool, 21 data: "id=" + value + "&flag_new=" + 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 42
43 @endsection 43 @endsection
44 44
45 @section('content') 45 @section('content')
46 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> 46 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block">
47 <div class="w-full overflow-x-auto"> 47 <div class="w-full overflow-x-auto">
48 <table class="w-full whitespace-no-wrap"> 48 <table class="w-full whitespace-no-wrap">
49 <thead> 49 <thead>
50 <tr 50 <tr
51 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" 51 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"
52 > 52 >
53 <th class="px-4 py-3">№</th> 53 <th class="px-4 py-3">№</th>
54 <th class="px-4 py-3">От юзера</th> 54 <th class="px-4 py-3">От юзера</th>
55 <th class="px-4 py-3">К юзеру</th> 55 <th class="px-4 py-3">К юзеру</th>
56 <th class="px-4 py-3">Текст</th> 56 <th class="px-4 py-3">Текст</th>
57 <th class="px-4 py-3">Дата</th> 57 <th class="px-4 py-3">Дата</th>
58 <th class="px-4 py-3">Прочтено</th> 58 <th class="px-4 py-3">Прочтено</th>
59 </tr> 59 </tr>
60 </thead> 60 </thead>
61 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> 61 <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
62 @foreach($Msgs as $msg) 62 @foreach($Msgs as $msg)
63 <tr class="text-gray-700 dark:text-gray-400" 63 <tr class="text-gray-700 dark:text-gray-400"
64 @if (($msg->user_to->id == $id_admin) && ($msg->flag_new == 1)) style="background-color: #403998;" @endif> 64 @if (($msg->user_to->id == $id_admin) && ($msg->flag_new == 1)) style="background-color: #403998;" @endif>
65 <td class="px-4 py-3"> 65 <td class="px-4 py-3">
66 {{$msg->id}} 66 {{$msg->id}}
67 </td> 67 </td>
68 <td class="px-4 py-3"> 68 <td class="px-4 py-3">
69 <!--if (isset($msg->user_from->name)) 69 <!--if (isset($msg->user_from->name))
70 $msg->user_from->name ($msg->user_from->id) 70 $msg->user_from->name ($msg->user_from->id)
71 else 71 else
72 Пользователь удален 72 Пользователь удален
73 endif--> 73 endif-->
74 </td> 74 </td>
75 <td class="px-4 py-3"> 75 <td class="px-4 py-3">
76 <!--if (isset($msg->user_to->name)) 76 <!--if (isset($msg->user_to->name))
77 $msg->user_to->name ($msg->user_to->id) 77 $msg->user_to->name ($msg->user_to->id)
78 else 78 else
79 Пользователь удален 79 Пользователь удален
80 @endif--> 80 @endif-->
81 </td> 81 </td>
82 <td class="px-4 py-3"> 82 <td class="px-4 py-3">
83 {{$msg->title}} 83 {{$msg->title}}
84 <div class="flex items-center text-sm"> 84 <div class="flex items-center text-sm">
85 <textarea cols="7" style="width:250px;">{{ $msg->text }}</textarea> 85 <textarea cols="7" style="width:250px;">{{ $msg->text }}</textarea>
86 </div> 86 </div>
87 </td> 87 </td>
88 <td class="px-4 py-3 text-sm"> 88 <td class="px-4 py-3 text-sm">
89 {{ $msg->created_at }} 89 {{ $msg->created_at }}
90 </td> 90 </td>
91 <td class="px-4 py-3 text-sm"> 91 <td class="px-4 py-3 text-sm">
92 @if (($msg->user_to->id == $id_admin) && ($msg->flag_new == 1)) 92 @if (($msg->user_to->id == $id_admin) && ($msg->flag_new == 1))
93 <input type="checkbox" class="checkread" value="{{$msg->id}}" name="read_{{$msg->id}}"/> 93 <input type="checkbox" class="checkread" value="{{$msg->id}}" name="read_{{$msg->id}}"/>
94 @endif 94 @endif
95 </td> 95 </td>
96 </tr> 96 </tr>
97 @endforeach 97 @endforeach
98 </tbody> 98 </tbody>
99 </table> 99 </table>
100 </div> 100 </div>
101 101
102 <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"> 102 <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">
103 <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?> 103 <?=$Msgs->appends($_GET)->links('admin.pagginate'); ?>
104 </div> 104 </div>
105 </div><br> 105 </div><br>
106 106
107 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block2"> 107 <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block2">
108 108
109 <form method="POST" action="{{ route('admin.admin-messages-post') }}" enctype="multipart/form-data"> 109 <form method="POST" action="{{ route('admin.admin-messages-post') }}" enctype="multipart/form-data">
110 @csrf 110 @csrf
111 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"> 111 <div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
112 <h3 class="text-gray-700 dark:text-gray-400">Отправка сообщения</h3> 112 <h3 class="text-gray-700 dark:text-gray-400">Отправка сообщения</h3>
113 <hr> 113 <hr>
114 <label for="ad_employer_id" class="block text-sm"> 114 <label for="ad_employer_id" class="block text-sm">
115 <input type="hidden" name="user_id" id="user_id" value="{{ $id_admin }}"/> 115 <input type="hidden" name="user_id" id="user_id" value="{{ $id_admin }}"/>
116 116
117 <span class="text-gray-700 dark:text-gray-400">Кому:</span> 117 <span class="text-gray-700 dark:text-gray-400">Кому:</span>
118 118
119 <select name="to_user_id" id="to_user_id" class="block change_js mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"> 119 <select name="to_user_id" id="to_user_id" class="block change_js mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray">
120 @foreach($users as $user) 120 @foreach($users as $user)
121 <option value="{{ $user->id }}">{{ $user->name }} ({{ $user->id }})</option> 121 <option value="{{ $user->id }}">{{ $user->name }} ({{ $user->id }})</option>
122 @endforeach 122 @endforeach
123 </select> 123 </select>
124 </label><br> 124 </label><br>
125 125
126 <label class="block text-sm"> 126 <label class="block text-sm">
127 <span class="text-gray-700 dark:text-gray-400">Заголовок</span> 127 <span class="text-gray-700 dark:text-gray-400">Заголовок</span>
128 <input name="title" id="title" 128 <input name="title" id="title"
129 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 129 class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
130 placeholder="Заголовок" value="{{ old('title') ?? '' }}" 130 placeholder="Заголовок" value="{{ old('title') ?? '' }}"
131 /> 131 />
132 @error('title') 132 @error('title')
133 <span class="text-xs text-red-600 dark:text-red-400"> 133 <span class="text-xs text-red-600 dark:text-red-400">
134 {{ $message }} 134 {{ $message }}
135 </span> 135 </span>
136 @enderror 136 @enderror
137 </label><br> 137 </label><br>
138 138
139 <label class="block text-sm"> 139 <label class="block text-sm">
140 <span class="text-gray-700 dark:text-gray-400">Текст</span> 140 <span class="text-gray-700 dark:text-gray-400">Текст</span>
141 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" name="text" placeholder="Текст" required 141 <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray" name="text" placeholder="Текст" required
142 rows="4">{{ old('text') ?? '' }}</textarea> 142 rows="4">{{ old('text') ?? '' }}</textarea>
143 @error('text') 143 @error('text')
144 <span class="text-xs text-red-600 dark:text-red-400"> 144 <span class="text-xs text-red-600 dark:text-red-400">
145 {{ $message }} 145 {{ $message }}
146 </span> 146 </span>
147 @enderror 147 @enderror
148 </label><br> 148 </label><br>
149 149
150 150
151 <label class="block text-sm"> 151 <label class="block text-sm">
152 <span class="text-gray-700 dark:text-gray-400">Файл</span> 152 <span class="text-gray-700 dark:text-gray-400">Файл</span>
153 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 153 <input type="file" class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700
154 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple 154 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple
155 dark:text-gray-300 dark:focus:shadow-outline-gray form-input" 155 dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
156 id="file" name="file" accept=".pdf, .xls, .xlsx"> 156 id="file" name="file" accept=".pdf, .doc, .docx">
157 @error('file') 157 @error('file')
158 <span class="text-xs text-red-600 dark:text-red-400"> 158 <span class="text-xs text-red-600 dark:text-red-400">
159 {{ $message }} 159 {{ $message }}
160 </span> 160 </span>
161 @enderror 161 @enderror
162 </label><br> 162 </label><br>
163 163
164 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> 164 <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4">
165 <div> 165 <div>
166 <button type="submit" 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"> 166 <button type="submit" 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">
167 Отправить 167 Отправить
168 </button> 168 </button>
169 </div> 169 </div>
170 </div> 170 </div>
171 </div> 171 </div>
172 </form> 172 </form>
173 </div> 173 </div>
174 @endsection 174 @endsection
175 175
resources/views/employers/dialog.blade.php
1 @extends('layout.frontend', ['title' => 'Диалог-переписка - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Диалог-переписка - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 $(function(){ 5 $(function(){
6 var chatbox_div = $('.chatbox__list'); 6 var chatbox_div = $('.chatbox__list');
7 chatbox_div.scrollTop(chatbox_div.prop("scrollHeight")); 7 chatbox_div.scrollTop(chatbox_div.prop("scrollHeight"));
8 8
9 $('form.chatbox__bottom [name="file"]').on('change', function() { 9 $('form.chatbox__bottom [name="file"]').on('change', function() {
10 var fileName = $(this).val().split('\\').pop(); 10 var fileName = $(this).val().split('\\').pop();
11 $('.chatbox-file-name-wrap').text('Добавлен файл: ' + fileName); 11 $('.chatbox-file-name-wrap').text('Добавлен файл: ' + fileName);
12 }); 12 });
13 }); 13 });
14 14
15 $(document).on('change', '#send_btn', function() { 15 $(document).on('change', '#send_btn', function() {
16 var this_ = $(this); 16 var this_ = $(this);
17 var val_ = this_.val(); 17 var val_ = this_.val();
18 console.log('sort items '+val_); 18 console.log('sort items '+val_);
19 19
20 $.ajax({ 20 $.ajax({
21 type: "GET", 21 type: "GET",
22 url: "{{ route('shipping_companies') }}", 22 url: "{{ route('shipping_companies') }}",
23 data: "sort="+val_+"&block=1", 23 data: "sort="+val_+"&block=1",
24 success: function (data) { 24 success: function (data) {
25 console.log('Выбор сортировки'); 25 console.log('Выбор сортировки');
26 console.log(data); 26 console.log(data);
27 $('#block_1').html(data); 27 $('#block_1').html(data);
28 }, 28 },
29 headers: { 29 headers: {
30 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 30 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
31 }, 31 },
32 error: function (data) { 32 error: function (data) {
33 data = JSON.stringify(data); 33 data = JSON.stringify(data);
34 console.log('Error: ' + data); 34 console.log('Error: ' + data);
35 } 35 }
36 }); 36 });
37 37
38 $.ajax({ 38 $.ajax({
39 type: "GET", 39 type: "GET",
40 url: "{{ route('shipping_companies') }}", 40 url: "{{ route('shipping_companies') }}",
41 data: "sort="+val_+"&block=2", 41 data: "sort="+val_+"&block=2",
42 success: function (data) { 42 success: function (data) {
43 console.log('Выбор сортировки2'); 43 console.log('Выбор сортировки2');
44 console.log(data); 44 console.log(data);
45 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 45 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
46 $('#block_2').html(data); 46 $('#block_2').html(data);
47 }, 47 },
48 headers: { 48 headers: {
49 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 49 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
50 }, 50 },
51 error: function (data) { 51 error: function (data) {
52 data = JSON.stringify(data); 52 data = JSON.stringify(data);
53 console.log('Error: ' + data); 53 console.log('Error: ' + data);
54 } 54 }
55 }); 55 });
56 }); 56 });
57 </script> 57 </script>
58 @endsection 58 @endsection
59 59
60 @section('content') 60 @section('content')
61 <section class="cabinet"> 61 <section class="cabinet">
62 <div class="container"> 62 <div class="container">
63 <ul class="breadcrumbs cabinet__breadcrumbs"> 63 <ul class="breadcrumbs cabinet__breadcrumbs">
64 <li><a href="{{ route('index') }}">Главная</a></li> 64 <li><a href="{{ route('index') }}">Главная</a></li>
65 <li><b>Личный кабинет</b></li> 65 <li><b>Личный кабинет</b></li>
66 </ul> 66 </ul>
67 <div class="cabinet__wrapper"> 67 <div class="cabinet__wrapper">
68 <div class="cabinet__side"> 68 <div class="cabinet__side">
69 <div class="cabinet__side-toper"> 69 <div class="cabinet__side-toper">
70 @include('employers.emblema') 70 @include('employers.emblema')
71 </div> 71 </div>
72 @include('employers.menu', ['item' => 5]) 72 @include('employers.menu', ['item' => 5])
73 </div> 73 </div>
74 <div class="cabinet__body"> 74 <div class="cabinet__body">
75 <div class="cabinet__body-item"> 75 <div class="cabinet__body-item">
76 <h2 class="title cabinet__title">Сообщения</h2> 76 <h2 class="title cabinet__title">Сообщения</h2>
77 </div> 77 </div>
78 <div class="cabinet__body-item"> 78 <div class="cabinet__body-item">
79 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="back"> 79 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="back">
80 <svg> 80 <svg>
81 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> 81 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use>
82 </svg> 82 </svg>
83 <span> 83 <span>
84 К списку чатов 84 К списку чатов
85 </span> 85 </span>
86 </a> 86 </a>
87 <div class="chatbox"> 87 <div class="chatbox">
88 <div class="chatbox__toper"> 88 <div class="chatbox__toper">
89 @if ($companion->is_worker) 89 @if ($companion->is_worker)
90 <div class="chatbox__toper-info messages__item-info"> 90 <div class="chatbox__toper-info messages__item-info">
91 <div class="messages__item-photo"> 91 <div class="messages__item-photo">
92 <svg> 92 <svg>
93 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 93 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
94 </svg> 94 </svg>
95 @if ((isset($companion->workers[0]->photo)) && 95 @if ((isset($companion->workers[0]->photo)) &&
96 (!empty($companion->workers[0]->photo))) 96 (!empty($companion->workers[0]->photo)))
97 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt=""> 97 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt="">
98 @else 98 @else
99 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 99 <img src="{{ asset('images/default_man.jpg') }}" alt="">
100 @endif 100 @endif
101 </div> 101 </div>
102 <div class="messages__item-text"> 102 <div class="messages__item-text">
103 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div> 103 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div>
104 </div> 104 </div>
105 </div> 105 </div>
106 @if (isset($companion->workers[0]->id)) 106 @if (isset($companion->workers[0]->id))
107 <a href="{{ route('resume_profile', ['worker' => $companion->workers[0]->id]) }}" class="button chatbox__toper-button"> 107 <a href="{{ route('resume_profile', ['worker' => $companion->workers[0]->id]) }}" class="button chatbox__toper-button">
108 <svg> 108 <svg>
109 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 109 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
110 </svg> 110 </svg>
111 Перейти в профиль 111 Перейти в профиль
112 </a> 112 </a>
113 @endif 113 @endif
114 @else 114 @else
115 <div class="chatbox__toper-info messages__item-info"> 115 <div class="chatbox__toper-info messages__item-info">
116 <div class="messages__item-photo"> 116 <div class="messages__item-photo">
117 <svg> 117 <svg>
118 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 118 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
119 </svg> 119 </svg>
120 @if ((isset($companion->employers[0]->logo)) && 120 @if ((isset($companion->employers[0]->logo)) &&
121 (!empty($companion->employers[0]->logo))) 121 (!empty($companion->employers[0]->logo)))
122 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt=""> 122 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt="">
123 @else 123 @else
124 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 124 <img src="{{ asset('images/default_man.jpg') }}" alt="">
125 @endif 125 @endif
126 </div> 126 </div>
127 <div class="messages__item-text"> 127 <div class="messages__item-text">
128 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div> 128 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div>
129 <div><span>Статус:</span> Работодатель или Администратор</div> 129 <div><span>Статус:</span> Работодатель или Администратор</div>
130 </div> 130 </div>
131 </div> 131 </div>
132 @if (isset($companion->employer->id)) 132 @if (isset($companion->employer->id))
133 <a href="" class="button chatbox__toper-button"> 133 <a href="" class="button chatbox__toper-button">
134 <svg> 134 <svg>
135 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 135 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
136 </svg> 136 </svg>
137 Перейти в профиль 137 Перейти в профиль
138 </a> 138 </a>
139 @endif 139 @endif
140 @endif 140 @endif
141 </div> 141 </div>
142 142
143 @if ($errors->any()) 143 @if ($errors->any())
144 <div class="red bold"> 144 <div class="red bold">
145 <ul> 145 <ul>
146 @foreach ($errors->all() as $error) 146 @foreach ($errors->all() as $error)
147 <li>{{ $error }}</li> 147 <li>{{ $error }}</li>
148 @endforeach 148 @endforeach
149 </ul> 149 </ul>
150 </div> 150 </div>
151 @endif 151 @endif
152 152
153 <div class="chatbox__list" id="dialogs" name="dialogs"> 153 <div class="chatbox__list" id="dialogs" name="dialogs">
154 @if ($Messages->count()) 154 @if ($Messages->count())
155 @foreach ($Messages as $it) 155 @foreach ($Messages as $it)
156 @if ($it->user_id == $companion->id) 156 @if ($it->user_id == $companion->id)
157 <div class="chatbox__item"> 157 <div class="chatbox__item">
158 <div class="chatbox__item-photo"> 158 <div class="chatbox__item-photo">
159 <svg> 159 <svg>
160 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 160 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
161 </svg> 161 </svg>
162 162
163 @if ($companion->is_worker) 163 @if ($companion->is_worker)
164 @if ((isset($companion->workers[0]->photo)) && 164 @if ((isset($companion->workers[0]->photo)) &&
165 (!empty($companion->workers[0]->photo))) 165 (!empty($companion->workers[0]->photo)))
166 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt=""> 166 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt="">
167 @else 167 @else
168 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 168 <img src="{{ asset('images/default_man.jpg') }}" alt="">
169 @endif 169 @endif
170 @else 170 @else
171 @if ((isset($companion->employers[0]->logo)) && 171 @if ((isset($companion->employers[0]->logo)) &&
172 (!empty($companion->employers[0]->logo))) 172 (!empty($companion->employers[0]->logo)))
173 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt=""> 173 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt="">
174 @else 174 @else
175 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 175 <img src="{{ asset('images/default_man.jpg') }}" alt="">
176 @endif 176 @endif
177 @endif 177 @endif
178 </div> 178 </div>
179 <div class="chatbox__item-body"> 179 <div class="chatbox__item-body">
180 @if($it->text || $it->reply_message_id || $it->ad_employer_id > 0) 180 @if($it->text || $it->reply_message_id || $it->ad_employer_id > 0)
181 <div class="chatbox__item-text"> 181 <div class="chatbox__item-text">
182 @if($it->ad_employer_id > 0) 182 @if($it->ad_employer_id > 0)
183 <b>Отклик на вакансию</b> "{{ \App\Models\Ad_employer::find($it->ad_employer_id)?->name }}"<br> 183 <b>Отклик на вакансию</b> "{{ \App\Models\Ad_employer::find($it->ad_employer_id)?->name }}"<br>
184 @if($it->text) 184 @if($it->text)
185 <b>Комментарий:</b> {{ $it->text }} 185 <b>Комментарий:</b> {{ $it->text }}
186 @endif 186 @endif
187 @else 187 @else
188 @if($it->text) 188 @if($it->text)
189 {{ $it->text }} 189 {{ $it->text }}
190 @endif 190 @endif
191 @endif 191 @endif
192 192
193 @if($it->reply_message_id) 193 @if($it->reply_message_id)
194 <div class="reply-message"> 194 <div class="reply-message">
195 {{ $it->reply_message->text }} 195 {{ $it->reply_message->text }}
196 </div> 196 </div>
197 @endif 197 @endif
198 </div> 198 </div>
199 @endif 199 @endif
200 @if ((isset($it->file)) && (!empty($it->file))) 200 @if ((isset($it->file)) && (!empty($it->file)))
201 <div class="chatbox__item-text chatbox__item-body-file-name-wrap"> 201 <div class="chatbox__item-text chatbox__item-body-file-name-wrap">
202 <div class=""> 202 <div class="">
203 @if($it->original_file_name) 203 @if($it->original_file_name)
204 {{ $it->original_file_name }} 204 {{ $it->original_file_name }}
205 @else 205 @else
206 <svg> 206 <svg>
207 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 207 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
208 </svg> 208 </svg>
209 @endif 209 @endif
210 </div> 210 </div>
211 <a href="{{ asset(Storage::url($it->file)) }}" class=""> 211 <a href="{{ asset(Storage::url($it->file)) }}" class="">
212 Скачать 212 Скачать
213 </a> 213 </a>
214 </div> 214 </div>
215 @endif 215 @endif
216 </div> 216 </div>
217 <div class="chatbox__item-time">{{ $it->created_at }}</div> 217 <div class="chatbox__item-time">{{ $it->created_at }}</div>
218 </div> 218 </div>
219 @else 219 @else
220 <div class="chatbox__item chatbox__item_reverse"> 220 <div class="chatbox__item chatbox__item_reverse">
221 <div class="chatbox__item-photo"> 221 <div class="chatbox__item-photo">
222 <svg> 222 <svg>
223 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 223 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
224 </svg> 224 </svg>
225 225
226 @if ($sender->is_worker) 226 @if ($sender->is_worker)
227 @if ((isset($sender->workers[0]->photo)) && 227 @if ((isset($sender->workers[0]->photo)) &&
228 (!empty($sender->workers[0]->photo))) 228 (!empty($sender->workers[0]->photo)))
229 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->workers[0]->photo)) }}" alt=""> 229 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->workers[0]->photo)) }}" alt="">
230 @else 230 @else
231 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 231 <img src="{{ asset('images/default_man.jpg') }}" alt="">
232 @endif 232 @endif
233 @else 233 @else
234 @if ((isset($sender->employers[0]->logo)) && 234 @if ((isset($sender->employers[0]->logo)) &&
235 (!empty($sender->employers[0]->logo))) 235 (!empty($sender->employers[0]->logo)))
236 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->employers[0]->logo)) }}" alt=""> 236 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->employers[0]->logo)) }}" alt="">
237 @else 237 @else
238 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 238 <img src="{{ asset('images/default_man.jpg') }}" alt="">
239 @endif 239 @endif
240 @endif 240 @endif
241 241
242 </div> 242 </div>
243 <div class="chatbox__item-body"> 243 <div class="chatbox__item-body">
244 @if($it->text) 244 @if($it->text)
245 <div class="chatbox__item-text"> 245 <div class="chatbox__item-text">
246 @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists()) 246 @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists())
247 <b>Отклик на вакансию</b> "{{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}"<br> 247 <b>Отклик на вакансию</b> "{{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}"<br>
248 @if($it->text) 248 @if($it->text)
249 <b>Комментарий:</b> {{ $it->text }} 249 <b>Комментарий:</b> {{ $it->text }}
250 @endif 250 @endif
251 @else 251 @else
252 @if($it->text) 252 @if($it->text)
253 {{ $it->text }} 253 {{ $it->text }}
254 @endif 254 @endif
255 @endif</div> 255 @endif</div>
256 @endif 256 @endif
257 @if ((isset($it->file)) && (!empty($it->file))) 257 @if ((isset($it->file)) && (!empty($it->file)))
258 <div class="chatbox__item-text chatbox__item-body-file-name-wrap"> 258 <div class="chatbox__item-text chatbox__item-body-file-name-wrap">
259 <a href="{{ asset(Storage::url($it->file)) }}" class=""> 259 <a href="{{ asset(Storage::url($it->file)) }}" class="">
260 Скачать 260 Скачать
261 </a> 261 </a>
262 <div class=""> 262 <div class="">
263 @if($it->original_file_name) 263 @if($it->original_file_name)
264 {{ $it->original_file_name }} 264 {{ $it->original_file_name }}
265 @else 265 @else
266 <svg> 266 <svg>
267 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 267 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
268 </svg> 268 </svg>
269 @endif 269 @endif
270 </div> 270 </div>
271 </div> 271 </div>
272 @endif 272 @endif
273 </div> 273 </div>
274 <div class="chatbox__item-time">{{ $it->created_at }}</div> 274 <div class="chatbox__item-time">{{ $it->created_at }}</div>
275 </div> 275 </div>
276 @endif 276 @endif
277 277
278 @endforeach 278 @endforeach
279 @endif 279 @endif
280 </div> 280 </div>
281 <div> 281 <div>
282 <form action="{{ route('employer.test123') }}" class="chatbox__bottom" enctype="multipart/form-data" method="POST" > 282 <form action="{{ route('employer.test123') }}" class="chatbox__bottom" enctype="multipart/form-data" method="POST" >
283 @csrf 283 @csrf
284 <label class="chatbox__bottom-file"> 284 <label class="chatbox__bottom-file">
285 <input id="file" name="file" type="file" accept=".pdf, .xls, .xlsx"> 285 <input id="file" name="file" type="file" accept=".pdf, .doc, .docx">
286 <svg> 286 <svg>
287 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 287 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
288 </svg> 288 </svg>
289 </label> 289 </label>
290 <input type="hidden" name="_token" value="{{ csrf_token() }}"/> 290 <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
291 <input type="hidden" id="user_id" name="user_id" value="{{ $sender->id }}"/> 291 <input type="hidden" id="user_id" name="user_id" value="{{ $sender->id }}"/>
292 <input type="hidden" id="to_user_id" name="to_user_id" value="{{ $companion->id }}"/> 292 <input type="hidden" id="to_user_id" name="to_user_id" value="{{ $companion->id }}"/>
293 <input type="hidden" id="ad_employer_id" name="ad_employer_id" value="{{ $ad_employer }}"/> 293 <input type="hidden" id="ad_employer_id" name="ad_employer_id" value="{{ $ad_employer }}"/>
294 <input type="hidden" id="ad_name" name="ad_name" value="@if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} @endif"/> 294 <input type="hidden" id="ad_name" name="ad_name" value="@if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} @endif"/>
295 <input id="text" name="text" type="text" class="input chatbox__bottom-text" placeholder="Ответить"> 295 <input id="text" name="text" type="text" class="input chatbox__bottom-text" placeholder="Ответить">
296 <button type="submit" id="send_btn" name="send_btn" class="chatbox__bottom-send"> 296 <button type="submit" id="send_btn" name="send_btn" class="chatbox__bottom-send">
297 <svg> 297 <svg>
298 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 298 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
299 </svg> 299 </svg>
300 </button> 300 </button>
301 </form> 301 </form>
302 <div class="chatbox-file-name-wrap mt-5 fw600"></div> 302 <div class="chatbox-file-name-wrap mt-5 fw600"></div>
303 </div> 303 </div>
304 </div> 304 </div>
305 </div> 305 </div>
306 </div> 306 </div>
307 </div> 307 </div>
308 </div> 308 </div>
309 </section> 309 </section>
310 </div> 310 </div>
311 @endsection 311 @endsection
312 312
resources/views/modals/send_admin.blade.php
1 <div id="send" class="modal"> 1 <div id="send" class="modal">
2 <div class="modal__body"> 2 <div class="modal__body">
3 <div class="modal__title">Отправить сообщение работодателю</div> 3 <div class="modal__title">Отправить сообщение работодателю</div>
4 <div class="modal__text">Если у вас возникли вопросы насчет вакансии, вы можете задать их работодателю</div> 4 <div class="modal__text">Если у вас возникли вопросы насчет вакансии, вы можете задать их работодателю</div>
5 <form class="modal__form"> 5 <form class="modal__form">
6 <div class="modal__form-item error"> 6 <div class="modal__form-item error">
7 <input id="i1" type="text" class="input" placeholder="Тема" required> 7 <input id="i1" type="text" class="input" placeholder="Тема" required>
8 <label for="i1">Не заполнено поле</label> 8 <label for="i1">Не заполнено поле</label>
9 </div> 9 </div>
10 <div class="modal__form-item"> 10 <div class="modal__form-item">
11 <textarea id="i2" class="textarea" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации.&#10;&#10;ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea> 11 <textarea id="i2" class="textarea" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации.&#10;&#10;ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea>
12 <label for="i2">Не заполнено поле</label> 12 <label for="i2">Не заполнено поле</label>
13 </div> 13 </div>
14 <div class="modal__form-item"> 14 <div class="modal__form-item">
15 <div class="file"> 15 <div class="file">
16 <label class="file__input"> 16 <label class="file__input">
17 <input type="file" accept=".pdf, .xls, .xlsx"> 17 <input type="file" accept=".pdf, .doc, .docx">
18 <span class="button button_light"> 18 <span class="button button_light">
19 <svg> 19 <svg>
20 <use xlink:href="images/sprite.svg#share"></use> 20 <use xlink:href="images/sprite.svg#share"></use>
21 </svg> 21 </svg>
22 Прикрепить резюме 22 Прикрепить резюме
23 </span> 23 </span>
24 </label> 24 </label>
25 <div class="file__list"> 25 <div class="file__list">
26 <div class="file__list-item"> 26 <div class="file__list-item">
27 <div class="file__list-item-left"> 27 <div class="file__list-item-left">
28 <svg> 28 <svg>
29 <use xlink:href="images/sprite.svg#clip"></use> 29 <use xlink:href="images/sprite.svg#clip"></use>
30 </svg> 30 </svg>
31 <span>image1.png</span> 31 <span>image1.png</span>
32 </div> 32 </div>
33 <button type="button" class="file__list-item-right js-parent-remove"> 33 <button type="button" class="file__list-item-right js-parent-remove">
34 <svg> 34 <svg>
35 <use xlink:href="images/sprite.svg#cross-bold"></use> 35 <use xlink:href="images/sprite.svg#cross-bold"></use>
36 </svg> 36 </svg>
37 </button> 37 </button>
38 </div> 38 </div>
39 <div class="file__list-item"> 39 <div class="file__list-item">
40 <div class="file__list-item-left"> 40 <div class="file__list-item-left">
41 <svg> 41 <svg>
42 <use xlink:href="images/sprite.svg#clip"></use> 42 <use xlink:href="images/sprite.svg#clip"></use>
43 </svg> 43 </svg>
44 <span>Резюме капитана корабля</span> 44 <span>Резюме капитана корабля</span>
45 </div> 45 </div>
46 <button type="button" class="file__list-item-right js-parent-remove"> 46 <button type="button" class="file__list-item-right js-parent-remove">
47 <svg> 47 <svg>
48 <use xlink:href="images/sprite.svg#cross-bold"></use> 48 <use xlink:href="images/sprite.svg#cross-bold"></use>
49 </svg> 49 </svg>
50 </button> 50 </button>
51 </div> 51 </div>
52 </div> 52 </div>
53 </div> 53 </div>
54 </div> 54 </div>
55 <div class="modal__form-item"> 55 <div class="modal__form-item">
56 <button type="submit" class="button">Отправить</button> 56 <button type="submit" class="button">Отправить</button>
57 </div> 57 </div>
58 </form> 58 </form>
59 </div> 59 </div>
60 </div> 60 </div>
61 61
resources/views/modals/send_employer.blade.php
1 <script> 1 <script>
2 $(document).on('change', '#file', function() { 2 $(document).on('change', '#file', function() {
3 let dirArray = $(this).val().split('\\') 3 let dirArray = $(this).val().split('\\')
4 $('#this_final_name').html(dirArray[dirArray.length - 1]) 4 $('#this_final_name').html(dirArray[dirArray.length - 1])
5 }); 5 });
6 </script> 6 </script>
7 <div id="send2" class="modal"> 7 <div id="send2" class="modal">
8 <div class="modal__body"> 8 <div class="modal__body">
9 <div class="modal__title">Отправить сообщение</div> 9 <div class="modal__title">Отправить сообщение</div>
10 <form class="modal__form" id="form_from_emp" name="form_from_emp" enctype="multipart/form-data" action="{{ route('employer.new_message') }}" method="POST"> 10 <form class="modal__form" id="form_from_emp" name="form_from_emp" enctype="multipart/form-data" action="{{ route('employer.new_message') }}" method="POST">
11 @csrf 11 @csrf
12 <div class="modal__form-item" style="display:none"> 12 <div class="modal__form-item" style="display:none">
13 <!-- Отправитель сообщения: --> 13 <!-- Отправитель сообщения: -->
14 <input type="hidden" id="_user_id" name="_user_id" class="input" placeholder="user_id" value=""> 14 <input type="hidden" id="_user_id" name="_user_id" class="input" placeholder="user_id" value="">
15 <!-- Получатель сообщения: --> 15 <!-- Получатель сообщения: -->
16 <input type="hidden" id="_to_user_id" name="_to_user_id" class="input" placeholder="to_user_id" value=""> 16 <input type="hidden" id="_to_user_id" name="_to_user_id" class="input" placeholder="to_user_id" value="">
17 <!-- Вакансия: --> 17 <!-- Вакансия: -->
18 <input type="hidden" id="_vacancy" name="_vacancy" class="input" placeholder="vacancy" value=""> 18 <input type="hidden" id="_vacancy" name="_vacancy" class="input" placeholder="vacancy" value="">
19 </div> 19 </div>
20 <div class="modal__form-item"> 20 <div class="modal__form-item">
21 <input id="i1" type="text" name="title" class="input" placeholder="Тема" required> 21 <input id="i1" type="text" name="title" class="input" placeholder="Тема" required>
22 <label for="i1">Не заполнено поле</label> 22 <label for="i1">Не заполнено поле</label>
23 </div> 23 </div>
24 <div class="modal__form-item"> 24 <div class="modal__form-item">
25 <textarea id="i2" class="textarea" name="text" placeholder="Напишите текст с предложением о работе" required></textarea> 25 <textarea id="i2" class="textarea" name="text" placeholder="Напишите текст с предложением о работе" required></textarea>
26 <label for="i2">Не заполнено поле</label> 26 <label for="i2">Не заполнено поле</label>
27 </div> 27 </div>
28 <div class="modal__form-item"> 28 <div class="modal__form-item">
29 <div class="file"> 29 <div class="file">
30 <label class="file__input"> 30 <label class="file__input">
31 <input type="file" name="file" id="file" accept=".pdf, .xls, .xlsx"> 31 <input type="file" name="file" id="file" accept=".pdf, .doc, .docx">
32 <span class="button button_light"> 32 <span class="button button_light">
33 <svg> 33 <svg>
34 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 34 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
35 </svg> 35 </svg>
36 Прикрепить документ 36 Прикрепить документ
37 </span> 37 </span>
38 </label> 38 </label>
39 39
40 <div class="file__list"> 40 <div class="file__list">
41 <div class="file__list-item"> 41 <div class="file__list-item">
42 <div class="file__list-item-left"> 42 <div class="file__list-item-left">
43 <svg> 43 <svg>
44 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 44 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
45 </svg> 45 </svg>
46 <span id="this_final_name" name="this_final_name"></span> 46 <span id="this_final_name" name="this_final_name"></span>
47 </div> 47 </div>
48 <button type="button" class="file__list-item-right js-parent-remove"> 48 <button type="button" class="file__list-item-right js-parent-remove">
49 <svg> 49 <svg>
50 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use> 50 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use>
51 </svg> 51 </svg>
52 </button> 52 </button>
53 </div> 53 </div>
54 </div> 54 </div>
55 </div> 55 </div>
56 </div> 56 </div>
57 <div class="modal__form-item"> 57 <div class="modal__form-item">
58 <button type="submit" class="button">Отправить</button> 58 <button type="submit" class="button">Отправить</button>
59 </div> 59 </div>
60 </form> 60 </form>
61 </div> 61 </div>
62 </div> 62 </div>
63 63
resources/views/modals/send_worker.blade.php
1 <script> 1 <script>
2 $("#form_worker" ).submit(function(event) { 2 $("#form_worker" ).submit(function(event) {
3 var val = $(this).val(); 3 var val = $(this).val();
4 var send_title = $('#send_title'); 4 var send_title = $('#send_title');
5 var send_title_val = send_title.val(); 5 var send_title_val = send_title.val();
6 }); 6 });
7 7
8 $(document).on('change', '#btn_send_file', function() { 8 $(document).on('change', '#btn_send_file', function() {
9 let dirArray = $(this).val().split('\\') 9 let dirArray = $(this).val().split('\\')
10 console.log(dirArray) 10 console.log(dirArray)
11 $('#send_name_file3').html(dirArray[dirArray.length - 1]) 11 $('#send_name_file3').html(dirArray[dirArray.length - 1])
12 console.log($('#send_name_file3').html()) 12 console.log($('#send_name_file3').html())
13 }); 13 });
14 </script> 14 </script>
15 <div id="send3" class="modal"> 15 <div id="send3" class="modal">
16 <div class="modal__body"> 16 <div class="modal__body">
17 <div class="modal__title">Отправить сообщение работодателю</div> 17 <div class="modal__title">Отправить сообщение работодателю</div>
18 <form class="modal__form" id="form_worker" name="form_worker" enctype="multipart/form-data" action="{{ route('worker.new_message') }}" method="POST"> 18 <form class="modal__form" id="form_worker" name="form_worker" enctype="multipart/form-data" action="{{ route('worker.new_message') }}" method="POST">
19 @csrf 19 @csrf
20 <input type="hidden" id="worker_user_id" name="user_from" value=""> 20 <input type="hidden" id="worker_user_id" name="user_from" value="">
21 <input type="hidden" id="worker_to_user_id" name="user_to" value=""> 21 <input type="hidden" id="worker_to_user_id" name="user_to" value="">
22 <input type="hidden" id="worker_vacancy" name="vacancy" value=""> 22 <input type="hidden" id="worker_vacancy" name="vacancy" value="">
23 <div class="modal__form-item send_text_div"> 23 <div class="modal__form-item send_text_div">
24 <textarea id="i2" class="textarea" id="send_text" name="comment" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации.&#10;&#10;ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea> 24 <textarea id="i2" class="textarea" id="send_text" name="comment" placeholder="Укажите по какому поводу вы пишите работодателю, уточните название вакансии или прикрепите ссылку на вакансию, дайте как можно больше информации.&#10;&#10;ВАЖНО не стоит писать работодателю короткий текст цитирую «Какая зарплата?, работодатель не поймет о чем речь, опишите вопрос максимально подробно»." required></textarea>
25 <label for="i2">Не заполнено поле</label> 25 <label for="i2">Не заполнено поле</label>
26 </div> 26 </div>
27 <div class="modal__form-item"> 27 <div class="modal__form-item">
28 <div class="file"> 28 <div class="file">
29 <label class="file__input"> 29 <label class="file__input">
30 <input type="file" name="file" id="btn_send_file" accept=".pdf, .xls, .xlsx"> 30 <input type="file" name="file" id="btn_send_file" accept=".pdf, .doc, .docx">
31 <span class="button button_light"> 31 <span class="button button_light">
32 <svg> 32 <svg>
33 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 33 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
34 </svg> 34 </svg>
35 Прикрепить файл-документ 35 Прикрепить файл-документ
36 </span> 36 </span>
37 </label> 37 </label>
38 38
39 <div class="file__list" id="div_file" name="div_file"> 39 <div class="file__list" id="div_file" name="div_file">
40 <div class="file__list-item"> 40 <div class="file__list-item">
41 <div class="file__list-item-left"> 41 <div class="file__list-item-left">
42 <svg> 42 <svg>
43 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 43 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
44 </svg> 44 </svg>
45 <span id="send_name_file3"></span> 45 <span id="send_name_file3"></span>
46 </div> 46 </div>
47 <button type="button" class="file__list-item-right js-parent-remove"> 47 <button type="button" class="file__list-item-right js-parent-remove">
48 <svg> 48 <svg>
49 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use> 49 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use>
50 </svg> 50 </svg>
51 </button> 51 </button>
52 </div> 52 </div>
53 </div> 53 </div>
54 </div> 54 </div>
55 </div> 55 </div>
56 <div class="modal__form-item"> 56 <div class="modal__form-item">
57 <button type="submit" id="submit_form_worker" name="submit_form_worker" class="button">Отправить</button> 57 <button type="submit" id="submit_form_worker" name="submit_form_worker" class="button">Отправить</button>
58 </div> 58 </div>
59 </form> 59 </form>
60 </div> 60 </div>
61 </div> 61 </div>
62 62
resources/views/modals/send_worker_new.blade.php
1 <script> 1 <script>
2 $(document).on('change', '#send_name', function() { 2 $(document).on('change', '#send_name', function() {
3 let dirArray = $(this).val().split('\\') 3 let dirArray = $(this).val().split('\\')
4 $('#send_name_file').html(dirArray[dirArray.length - 1]) 4 $('#send_name_file').html(dirArray[dirArray.length - 1])
5 }); 5 });
6 </script> 6 </script>
7 <div id="send" class="modal"> 7 <div id="send" class="modal">
8 <div class="modal__body"> 8 <div class="modal__body">
9 <div class="modal__title">Отправить сообщение работодателю</div> 9 <div class="modal__title">Отправить сообщение работодателю</div>
10 <form class="modal__form" id="form_worker" name="form_worker" enctype="multipart/form-data" action="{{ route('worker.new_message') }}" method="POST"> 10 <form class="modal__form" id="form_worker" name="form_worker" enctype="multipart/form-data" action="{{ route('worker.new_message') }}" method="POST">
11 @csrf 11 @csrf
12 <div class="modal__form-item" style="display: none"> 12 <div class="modal__form-item" style="display: none">
13 Отправитель сообщения: 13 Отправитель сообщения:
14 <input type="text" id="send_user_id" name="send_user_id" class="input" placeholder="user_id" value=""> 14 <input type="text" id="send_user_id" name="send_user_id" class="input" placeholder="user_id" value="">
15 Получатель сообщения: 15 Получатель сообщения:
16 <input type="text" id="send_to_user_id" name="send_to_user_id" class="input" placeholder="to_user_id" value=""> 16 <input type="text" id="send_to_user_id" name="send_to_user_id" class="input" placeholder="to_user_id" value="">
17 Вакансия: 17 Вакансия:
18 <input type="text" id="send_vacancy" name="send_vacancy" class="input" placeholder="vacancy" value=""> 18 <input type="text" id="send_vacancy" name="send_vacancy" class="input" placeholder="vacancy" value="">
19 Должность: 19 Должность:
20 <input type="text" id="send_job_title_id" name="send_job_title_id" class="input" placeholder="vacancy" value="0"> 20 <input type="text" id="send_job_title_id" name="send_job_title_id" class="input" placeholder="vacancy" value="0">
21 </div> 21 </div>
22 <div class="modal__form-item send_title_div error_"> 22 <div class="modal__form-item send_title_div error_">
23 <input id="send_title" name="send_title" type="text" class="input" placeholder="Тема" required> 23 <input id="send_title" name="send_title" type="text" class="input" placeholder="Тема" required>
24 <label for="title">Не заполнено поле</label> 24 <label for="title">Не заполнено поле</label>
25 </div> 25 </div>
26 <div class="modal__form-item send_text_div"> 26 <div class="modal__form-item send_text_div">
27 <textarea id="i2" class="textarea" id="send_text" name="send_text" placeholder="Напишите текст с предложением о работе" required></textarea> 27 <textarea id="i2" class="textarea" id="send_text" name="send_text" placeholder="Напишите текст с предложением о работе" required></textarea>
28 <label for="i2">Не заполнено поле</label> 28 <label for="i2">Не заполнено поле</label>
29 </div> 29 </div>
30 <div class="modal__form-item"> 30 <div class="modal__form-item">
31 <div class="file"> 31 <div class="file">
32 <label class="file__input" id="btn_send_file" name="btn_send_file"> 32 <label class="file__input" id="btn_send_file" name="btn_send_file">
33 <input type="file" name="send_file" id="send_name" accept=".pdf, .xls, .xlsx"> 33 <input type="file" name="send_file" id="send_name" accept=".pdf, .doc, .docx">
34 <span class="button button_light"> 34 <span class="button button_light">
35 <svg> 35 <svg>
36 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use> 36 <use xlink:href="{{ asset('images/sprite.svg#share') }}"></use>
37 </svg> 37 </svg>
38 Прикрепить файл-документ 38 Прикрепить файл-документ
39 </span> 39 </span>
40 </label> 40 </label>
41 41
42 <div class="file__list" id="div_file" name="div_file"> 42 <div class="file__list" id="div_file" name="div_file">
43 <div class="file__list-item"> 43 <div class="file__list-item">
44 <div class="file__list-item-left"> 44 <div class="file__list-item-left">
45 <svg> 45 <svg>
46 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 46 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
47 </svg> 47 </svg>
48 <span id="send_name_file" name="send_name_file"></span> 48 <span id="send_name_file" name="send_name_file"></span>
49 </div> 49 </div>
50 <button type="button" class="file__list-item-right js-parent-remove"> 50 <button type="button" class="file__list-item-right js-parent-remove">
51 <svg> 51 <svg>
52 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use> 52 <use xlink:href="{{ asset('images/sprite.svg#cross-bold') }}"></use>
53 </svg> 53 </svg>
54 </button> 54 </button>
55 </div> 55 </div>
56 </div> 56 </div>
57 </div> 57 </div>
58 </div> 58 </div>
59 <div class="modal__form-item"> 59 <div class="modal__form-item">
60 <button type="submit" id="submit_form_worker" name="submit_form_worker" class="button">Отправить</button> 60 <button type="submit" id="submit_form_worker" name="submit_form_worker" class="button">Отправить</button>
61 </div> 61 </div>
62 </form> 62 </form>
63 </div> 63 </div>
64 </div> 64 </div>
65 65
66 66
resources/views/workers/dialog.blade.php
1 @extends('layout.frontend', ['title' => 'Диалог-переписка - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Диалог-переписка - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 $(function(){ 5 $(function(){
6 var chatbox_div = $('.chatbox__list'); 6 var chatbox_div = $('.chatbox__list');
7 chatbox_div.scrollTop(chatbox_div.prop("scrollHeight")); 7 chatbox_div.scrollTop(chatbox_div.prop("scrollHeight"));
8 8
9 $('form.chatbox__bottom [name="file"]').on('change', function() { 9 $('form.chatbox__bottom [name="file"]').on('change', function() {
10 var fileName = $(this).val().split('\\').pop(); 10 var fileName = $(this).val().split('\\').pop();
11 $('.chatbox-file-name-wrap').text('Добавлен файл: ' + fileName); 11 $('.chatbox-file-name-wrap').text('Добавлен файл: ' + fileName);
12 }); 12 });
13 13
14 $('.admin-chat-answer').click(function(){ 14 $('.admin-chat-answer').click(function(){
15 var modal = $('#answer_from_admin_chat_modal'); 15 var modal = $('#answer_from_admin_chat_modal');
16 16
17 modal.data('to-user-id', $(this).data('to-user-id')); 17 modal.data('to-user-id', $(this).data('to-user-id'));
18 modal.data('message-id', $(this).data('message-id')); 18 modal.data('message-id', $(this).data('message-id'));
19 }); 19 });
20 }); 20 });
21 21
22 $(document).on('change', '#send_btn', function() { 22 $(document).on('change', '#send_btn', function() {
23 var this_ = $(this); 23 var this_ = $(this);
24 var val_ = this_.val(); 24 var val_ = this_.val();
25 console.log('sort items '+val_); 25 console.log('sort items '+val_);
26 26
27 $.ajax({ 27 $.ajax({
28 type: "GET", 28 type: "GET",
29 url: "{{ route('shipping_companies') }}", 29 url: "{{ route('shipping_companies') }}",
30 data: "sort="+val_+"&block=1", 30 data: "sort="+val_+"&block=1",
31 success: function (data) { 31 success: function (data) {
32 console.log('Выбор сортировки'); 32 console.log('Выбор сортировки');
33 console.log(data); 33 console.log(data);
34 $('#block_1').html(data); 34 $('#block_1').html(data);
35 }, 35 },
36 headers: { 36 headers: {
37 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 37 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
38 }, 38 },
39 error: function (data) { 39 error: function (data) {
40 data = JSON.stringify(data); 40 data = JSON.stringify(data);
41 console.log('Error: ' + data); 41 console.log('Error: ' + data);
42 } 42 }
43 }); 43 });
44 44
45 $.ajax({ 45 $.ajax({
46 type: "GET", 46 type: "GET",
47 url: "{{ route('shipping_companies') }}", 47 url: "{{ route('shipping_companies') }}",
48 data: "sort="+val_+"&block=2", 48 data: "sort="+val_+"&block=2",
49 success: function (data) { 49 success: function (data) {
50 console.log('Выбор сортировки2'); 50 console.log('Выбор сортировки2');
51 console.log(data); 51 console.log(data);
52 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 52 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
53 $('#block_2').html(data); 53 $('#block_2').html(data);
54 }, 54 },
55 headers: { 55 headers: {
56 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 56 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
57 }, 57 },
58 error: function (data) { 58 error: function (data) {
59 data = JSON.stringify(data); 59 data = JSON.stringify(data);
60 console.log('Error: ' + data); 60 console.log('Error: ' + data);
61 } 61 }
62 }); 62 });
63 }); 63 });
64 </script> 64 </script>
65 @endsection 65 @endsection
66 66
67 @section('content') 67 @section('content')
68 <section class="cabinet"> 68 <section class="cabinet">
69 <div class="container"> 69 <div class="container">
70 <ul class="breadcrumbs cabinet__breadcrumbs"> 70 <ul class="breadcrumbs cabinet__breadcrumbs">
71 <li><a href="{{ route('index') }}">Главная</a></li> 71 <li><a href="{{ route('index') }}">Главная</a></li>
72 <li><b>Личный кабинет</b></li> 72 <li><b>Личный кабинет</b></li>
73 </ul> 73 </ul>
74 <div class="cabinet__wrapper"> 74 <div class="cabinet__wrapper">
75 <div class="cabinet__side"> 75 <div class="cabinet__side">
76 <div class="cabinet__side-toper"> 76 <div class="cabinet__side-toper">
77 @include('workers.emblema') 77 @include('workers.emblema')
78 </div> 78 </div>
79 @include('workers.menu', ['item' => 2]) 79 @include('workers.menu', ['item' => 2])
80 </div> 80 </div>
81 <div class="cabinet__body"> 81 <div class="cabinet__body">
82 <div class="cabinet__body-item"> 82 <div class="cabinet__body-item">
83 <h2 class="title cabinet__title">Сообщения</h2> 83 <h2 class="title cabinet__title">Сообщения</h2>
84 </div> 84 </div>
85 <div class="cabinet__body-item"> 85 <div class="cabinet__body-item">
86 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="back"> 86 <a href="{{ route('worker.messages', ['type_message' => 'input']) }}" class="back">
87 <svg> 87 <svg>
88 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> 88 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use>
89 </svg> 89 </svg>
90 <span> 90 <span>
91 К списку чатов 91 К списку чатов
92 </span> 92 </span>
93 </a> 93 </a>
94 <div class="chatbox"> 94 <div class="chatbox">
95 <div class="chatbox__toper"> 95 <div class="chatbox__toper">
96 @if($chat->is_admin_chat) 96 @if($chat->is_admin_chat)
97 <div class="chatbox__toper-info messages__item-info"> 97 <div class="chatbox__toper-info messages__item-info">
98 @include('svg.logo_icon') 98 @include('svg.logo_icon')
99 <div class="messages__item-text bold font20"> 99 <div class="messages__item-text bold font20">
100 Администратор сайта 100 Администратор сайта
101 </div> 101 </div>
102 </div> 102 </div>
103 @elseif ($companion->is_worker) 103 @elseif ($companion->is_worker)
104 <div class="chatbox__toper-info messages__item-info"> 104 <div class="chatbox__toper-info messages__item-info">
105 <div class="messages__item-photo"> 105 <div class="messages__item-photo">
106 <svg> 106 <svg>
107 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 107 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
108 </svg> 108 </svg>
109 @if ((isset($companion->workers[0]->photo)) && 109 @if ((isset($companion->workers[0]->photo)) &&
110 (!empty($companion->workers[0]->photo))) 110 (!empty($companion->workers[0]->photo)))
111 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt=""> 111 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt="">
112 @else 112 @else
113 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 113 <img src="{{ asset('images/default_man.jpg') }}" alt="">
114 @endif 114 @endif
115 </div> 115 </div>
116 </div> 116 </div>
117 @if (isset($companion->workers[0]->id)) 117 @if (isset($companion->workers[0]->id))
118 <a href="{{ route('resume_profile', ['worker' => $companion->workers[0]->id]) }}" class="button chatbox__toper-button"> 118 <a href="{{ route('resume_profile', ['worker' => $companion->workers[0]->id]) }}" class="button chatbox__toper-button">
119 <svg> 119 <svg>
120 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 120 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
121 </svg> 121 </svg>
122 Перейти в профиль 122 Перейти в профиль
123 </a> 123 </a>
124 @endif 124 @endif
125 @else 125 @else
126 <div class="chatbox__toper-info messages__item-info"> 126 <div class="chatbox__toper-info messages__item-info">
127 <div class="messages__item-photo"> 127 <div class="messages__item-photo">
128 <svg> 128 <svg>
129 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 129 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
130 </svg> 130 </svg>
131 @if ((isset($companion->employers[0]->logo)) && 131 @if ((isset($companion->employers[0]->logo)) &&
132 (!empty($companion->employers[0]->logo))) 132 (!empty($companion->employers[0]->logo)))
133 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt=""> 133 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt="">
134 @else 134 @else
135 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 135 <img src="{{ asset('images/default_man.jpg') }}" alt="">
136 @endif 136 @endif
137 </div> 137 </div>
138 <div class="messages__item-text"> 138 <div class="messages__item-text">
139 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div> 139 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div>
140 <div><span>Статус:</span> Работодатель или Администратор</div> 140 <div><span>Статус:</span> Работодатель или Администратор</div>
141 </div> 141 </div>
142 </div> 142 </div>
143 @if (isset($companion->employers[0]->id)) 143 @if (isset($companion->employers[0]->id))
144 <a href="{{ route('info_company', ['company' => $companion->employers[0]->id]) }}" class="button chatbox__toper-button"> 144 <a href="{{ route('info_company', ['company' => $companion->employers[0]->id]) }}" class="button chatbox__toper-button">
145 <svg> 145 <svg>
146 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 146 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
147 </svg> 147 </svg>
148 Перейти в профиль 148 Перейти в профиль
149 </a> 149 </a>
150 @endif 150 @endif
151 @endif 151 @endif
152 </div> 152 </div>
153 153
154 @if ($errors->any()) 154 @if ($errors->any())
155 <div class="red bold"> 155 <div class="red bold">
156 <ul> 156 <ul>
157 @foreach ($errors->all() as $error) 157 @foreach ($errors->all() as $error)
158 <li>{{ $error }}</li> 158 <li>{{ $error }}</li>
159 @endforeach 159 @endforeach
160 </ul> 160 </ul>
161 </div> 161 </div>
162 @endif 162 @endif
163 163
164 <div class="chatbox__list" id="dialogs" name="dialogs"> 164 <div class="chatbox__list" id="dialogs" name="dialogs">
165 @if ($Messages->count()) 165 @if ($Messages->count())
166 @foreach ($Messages as $it) 166 @foreach ($Messages as $it)
167 @if ($it->user_id == $companion->id) 167 @if ($it->user_id == $companion->id)
168 <div class="chatbox__item"> 168 <div class="chatbox__item">
169 <div class="chatbox__item-photo"> 169 <div class="chatbox__item-photo">
170 <svg> 170 <svg>
171 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 171 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
172 </svg> 172 </svg>
173 @if($companion->is_worker) 173 @if($companion->is_worker)
174 @if ((isset($companion->workers[0]->photo)) && 174 @if ((isset($companion->workers[0]->photo)) &&
175 (!empty($companion->workers[0]->photo))) 175 (!empty($companion->workers[0]->photo)))
176 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt=""> 176 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->workers[0]->photo)) }}" alt="">
177 @else 177 @else
178 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 178 <img src="{{ asset('images/default_man.jpg') }}" alt="">
179 @endif 179 @endif
180 @else 180 @else
181 @if ((isset($companion->employers[0]->logo)) && 181 @if ((isset($companion->employers[0]->logo)) &&
182 (!empty($companion->employers[0]->logo))) 182 (!empty($companion->employers[0]->logo)))
183 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt=""> 183 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($companion->employers[0]->logo)) }}" alt="">
184 @else 184 @else
185 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 185 <img src="{{ asset('images/default_man.jpg') }}" alt="">
186 @endif 186 @endif
187 @endif 187 @endif
188 </div> 188 </div>
189 <div class="chatbox__item-body"> 189 <div class="chatbox__item-body">
190 @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists()) 190 @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists())
191 <div class="chatbox__item-text"> 191 <div class="chatbox__item-text">
192 Отклик на вакансию {{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }} 192 Отклик на вакансию {{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}
193 @if($it->text) 193 @if($it->text)
194 Комментарий: {{ $it->text }} 194 Комментарий: {{ $it->text }}
195 @endif 195 @endif
196 </div> 196 </div>
197 @else 197 @else
198 @if($it->text) 198 @if($it->text)
199 {{ $it->text }} 199 {{ $it->text }}
200 @endif 200 @endif
201 @endif 201 @endif
202 @if ((isset($it->file)) && (!empty($it->file))) 202 @if ((isset($it->file)) && (!empty($it->file)))
203 <div class="chatbox__item-text chatbox__item-body-file-name-wrap"> 203 <div class="chatbox__item-text chatbox__item-body-file-name-wrap">
204 <div class=""> 204 <div class="">
205 @if($it->original_file_name) 205 @if($it->original_file_name)
206 {{ $it->original_file_name }} 206 {{ $it->original_file_name }}
207 @else 207 @else
208 <svg> 208 <svg>
209 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 209 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
210 </svg> 210 </svg>
211 @endif 211 @endif
212 </div> 212 </div>
213 <a href="{{ asset(Storage::url($it->file)) }}" class=""> 213 <a href="{{ asset(Storage::url($it->file)) }}" class="">
214 Скачать 214 Скачать
215 </a> 215 </a>
216 </div> 216 </div>
217 @endif 217 @endif
218 </div> 218 </div>
219 <div class="chatbox__item-time">{{ $it->created_at }}</div> 219 <div class="chatbox__item-time">{{ $it->created_at }}</div>
220 </div> 220 </div>
221 @else 221 @else
222 <div class="chatbox__item chatbox__item_reverse"> 222 <div class="chatbox__item chatbox__item_reverse">
223 <div class="@if(!$chat->is_admin_chat) chatbox__item-photo @endif"> 223 <div class="@if(!$chat->is_admin_chat) chatbox__item-photo @endif">
224 @if($chat->is_admin_chat) 224 @if($chat->is_admin_chat)
225 @include('svg.logo_icon') 225 @include('svg.logo_icon')
226 @else 226 @else
227 @if ($sender->is_worker) 227 @if ($sender->is_worker)
228 @if ((isset($sender->workers[0]->photo)) && 228 @if ((isset($sender->workers[0]->photo)) &&
229 (!empty($sender->workers[0]->photo))) 229 (!empty($sender->workers[0]->photo)))
230 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->workers[0]->photo)) }}" alt=""> 230 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->workers[0]->photo)) }}" alt="">
231 @else 231 @else
232 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 232 <img src="{{ asset('images/default_man.jpg') }}" alt="">
233 @endif 233 @endif
234 @else 234 @else
235 <svg> 235 <svg>
236 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 236 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
237 </svg> 237 </svg>
238 238
239 @if ((isset($sender->employers[0]->logo)) && 239 @if ((isset($sender->employers[0]->logo)) &&
240 (!empty($sender->employers[0]->logo))) 240 (!empty($sender->employers[0]->logo)))
241 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->employers[0]->logo)) }}" alt=""> 241 <img src="{{ asset(\Illuminate\Support\Facades\Storage::url($sender->employers[0]->logo)) }}" alt="">
242 @else 242 @else
243 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 243 <img src="{{ asset('images/default_man.jpg') }}" alt="">
244 @endif 244 @endif
245 @endif 245 @endif
246 @endif 246 @endif
247 </div> 247 </div>
248 <div class="chatbox__item-body"> 248 <div class="chatbox__item-body">
249 @if($chat->is_admin_chat || $it->text || $it->reply_message_id || $it->ad_employer_id > 0) 249 @if($chat->is_admin_chat || $it->text || $it->reply_message_id || $it->ad_employer_id > 0)
250 <div class="chatbox__item-text"> 250 <div class="chatbox__item-text">
251 @if($chat->is_admin_chat) 251 @if($chat->is_admin_chat)
252 <button class="button admin-chat-answer" data-fancybox data-src="#answer_from_admin_chat_modal" 252 <button class="button admin-chat-answer" data-fancybox data-src="#answer_from_admin_chat_modal"
253 data-to-user-id="{{ $it->user_id }}" data-message-id="{{ $it->id }}" 253 data-to-user-id="{{ $it->user_id }}" data-message-id="{{ $it->id }}"
254 > 254 >
255 Ответить 255 Ответить
256 </button> 256 </button>
257 @endif 257 @endif
258 258
259 @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists())) 259 @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists()))
260 <b>Отклик на вакансию</b> "{{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}"<br> 260 <b>Отклик на вакансию</b> "{{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}"<br>
261 @if($it->text) 261 @if($it->text)
262 <b>Комментарий:</b> {{ $it->text }} 262 <b>Комментарий:</b> {{ $it->text }}
263 @endif 263 @endif
264 @else 264 @else
265 @if($it->text) 265 @if($it->text)
266 {{ $it->text }} 266 {{ $it->text }}
267 @endif 267 @endif
268 @endif 268 @endif
269 269
270 @if($it->reply_message_id) 270 @if($it->reply_message_id)
271 <div class="reply-message"> 271 <div class="reply-message">
272 {{ $it->reply_message->text }} 272 {{ $it->reply_message->text }}
273 </div> 273 </div>
274 @endif 274 @endif
275 </div> 275 </div>
276 @endif 276 @endif
277 @if ((isset($it->file)) && (!empty($it->file))) 277 @if ((isset($it->file)) && (!empty($it->file)))
278 <div class="chatbox__item-text chatbox__item-body-file-name-wrap"> 278 <div class="chatbox__item-text chatbox__item-body-file-name-wrap">
279 <a href="{{ asset(Storage::url($it->file)) }}" class=""> 279 <a href="{{ asset(Storage::url($it->file)) }}" class="">
280 Скачать 280 Скачать
281 </a> 281 </a>
282 <div class=""> 282 <div class="">
283 @if($it->original_file_name) 283 @if($it->original_file_name)
284 {{ $it->original_file_name }} 284 {{ $it->original_file_name }}
285 @else 285 @else
286 <svg> 286 <svg>
287 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 287 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
288 </svg> 288 </svg>
289 @endif 289 @endif
290 </div> 290 </div>
291 </div> 291 </div>
292 @endif 292 @endif
293 </div> 293 </div>
294 <div class="chatbox__item-time">{{ $it->created_at }}</div> 294 <div class="chatbox__item-time">{{ $it->created_at }}</div>
295 </div> 295 </div>
296 @endif 296 @endif
297 297
298 @endforeach 298 @endforeach
299 @endif 299 @endif
300 </div> 300 </div>
301 @if(!$chat->is_admin_chat) 301 @if(!$chat->is_admin_chat)
302 <div> 302 <div>
303 <form action="{{ route('worker.test123') }}" class="chatbox__bottom" enctype="multipart/form-data" method="POST" > 303 <form action="{{ route('worker.test123') }}" class="chatbox__bottom" enctype="multipart/form-data" method="POST" >
304 @csrf 304 @csrf
305 <label class="chatbox__bottom-file"> 305 <label class="chatbox__bottom-file">
306 <input id="file" name="file" type="file" accept=".pdf, .xls, .xlsx"> 306 <input id="file" name="file" type="file" accept=".pdf, .doc, .docx">
307 <svg> 307 <svg>
308 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 308 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
309 </svg> 309 </svg>
310 </label> 310 </label>
311 <input type="hidden" name="_token" value="{{ csrf_token() }}"/> 311 <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
312 <input type="hidden" id="user_id" name="user_id" value="{{ $sender->id }}"/> 312 <input type="hidden" id="user_id" name="user_id" value="{{ $sender->id }}"/>
313 <input type="hidden" id="to_user_id" name="to_user_id" value="{{ $companion->id }}"/> 313 <input type="hidden" id="to_user_id" name="to_user_id" value="{{ $companion->id }}"/>
314 <input type="hidden" id="ad_employer_id" name="ad_employer_id" value="{{ $ad_employer }}"/> 314 <input type="hidden" id="ad_employer_id" name="ad_employer_id" value="{{ $ad_employer }}"/>
315 <input type="hidden" id="ad_name" name="ad_name" value="@if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} @endif"/> 315 <input type="hidden" id="ad_name" name="ad_name" value="@if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} @endif"/>
316 <input id="text" name="text" type="text" class="input chatbox__bottom-text" placeholder="Ответить"> 316 <input id="text" name="text" type="text" class="input chatbox__bottom-text" placeholder="Ответить">
317 <button type="submit" id="send_btn" name="send_btn" class="chatbox__bottom-send"> 317 <button type="submit" id="send_btn" name="send_btn" class="chatbox__bottom-send">
318 <svg> 318 <svg>
319 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 319 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
320 </svg> 320 </svg>
321 </button> 321 </button>
322 </form> 322 </form>
323 <div class="chatbox-file-name-wrap mt-5 fw600"></div> 323 <div class="chatbox-file-name-wrap mt-5 fw600"></div>
324 </div> 324 </div>
325 @endif 325 @endif
326 </div> 326 </div>
327 </div> 327 </div>
328 </div> 328 </div>
329 </div> 329 </div>
330 </div> 330 </div>
331 </section> 331 </section>
332 </div> 332 </div>
333 333
334 @include('modals.chats.answer_from_admin_chat') 334 @include('modals.chats.answer_from_admin_chat')
335 @endsection 335 @endsection
336 336