Commit 12a0a3100508ebd91e69d8e17a163d955191aea3

Authored by Hayk Nazaryan
1 parent 7f3406fc64
Exists in master

chat fixes

Showing 4 changed files with 6 additions and 15 deletions Side-by-side Diff

app/Http/Controllers/HomeController.php
... ... @@ -26,12 +26,6 @@ class HomeController extends Controller
26 26 {
27 27 return view('home');
28 28 }
29   - public function ss(Request $request)
30   - {
31   - dd($request->all());
32   -
33   - return view('home');
34   - }
35 29  
36 30 public function send_message(Request $request)
37 31 {
resources/views/modals/chats/answer_to_admin_chat.blade.php
... ... @@ -38,7 +38,7 @@
38 38  
39 39 $.ajax({
40 40 type: "POST",
41   - url: "{{ route('employer.send_message') }}",
  41 + url: "{{ route('send_message') }}",
42 42 data: {
43 43 to_user_id: to_user_id,
44 44 reply_message_id: reply_message_id,
resources/views/workers/dialog.blade.php
... ... @@ -196,13 +196,11 @@
196 196 </div>
197 197 <div class="chatbox__item-body">
198 198 <div class="chatbox__item-text">
199   - @if($chat->is_admin_chat)
200   - <button class="button admin-chat-answer" data-fancybox data-src="#answer_from_admin_chat_modal"
201   - data-to-user-id="{{ $it->user_id }}" data-message-id="{{ $it->id }}"
202   - >
203   - Ответить
204   - </button>
205   - @endif
  199 + <button class="button admin-chat-answer" data-fancybox data-src="#answer_from_admin_chat_modal"
  200 + data-to-user-id="{{ $it->user_id }}" data-message-id="{{ $it->id }}"
  201 + >
  202 + Ответить
  203 + </button>
206 204 @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists())
207 205  
208 206 Отклик на вакансию {{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}
... ... @@ -648,5 +648,4 @@ Route::group([
648 648 Route::get('TestWorker', [WorkerController::class, 'TestWorker'])->name('TestWorker');
649 649  
650 650 Route::post('send_message', [HomeController::class, 'send_message'])->name('send_message');
651   -Route::post('send_message/ss', [HomeController::class, 'ss'])->name('ss');
652 651