diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 9f427d2..0517707 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -530,6 +530,20 @@ class EmployerController extends Controller $validator = Validator::make($request->all(), $rules, $messages); + /*if ($validator->fails()) { + return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) + ->withErrors($validator); + } else { + if ($request->has('file')) { + $params['file'] = $request->file('file')->store("messages", 'public'); + } + Message::create($params); + //return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]); + return redirect()->route('employer.dialog', + ['user1' => $user1, 'user2' => $user2, 'ad_employer' => $id_vacancy, 'ad_name' => $ad_name]); + + }*/ + if ($validator->fails()) { return redirect()->route('employer.dialog', ['user1' => $user1, 'user2' => $user2]) ->withErrors($validator); diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index f08ed22..34858de 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -818,9 +818,12 @@ class WorkerController extends Controller } if (isset($user2->id)) { - $companion = User_Model::query()->with('workers')-> - with('employers')-> - where('id', $user2->id)->first(); + $companion = User_Model::query() + ->with('workers') + ->with('employers') + ->where('id', $user2->id) + ->first() + ; } $Messages = Message::query()-> @@ -832,6 +835,10 @@ class WorkerController extends Controller ->get() ; + Message::where('user_id', '=', $user2->id) + ->where('to_user_id', '=', $user1->id) + ->update(['flag_new' => 0]); + return view('workers.dialog', compact('companion', 'sender', 'Messages', 'ad_employer')); } diff --git a/public/css/style_may2024.css b/public/css/style_may2024.css index f8863c1..d18fd86 100644 --- a/public/css/style_may2024.css +++ b/public/css/style_may2024.css @@ -7110,6 +7110,8 @@ main + .news { -ms-flex-direction: column; flex-direction: column; gap: 10px; + max-height: 400px; + overflow: auto; } @media (min-width: 768px) { .chatbox__list { diff --git a/resources/views/employers/bd.blade.php b/resources/views/employers/bd.blade.php index 3f99237..d2ac597 100644 --- a/resources/views/employers/bd.blade.php +++ b/resources/views/employers/bd.blade.php @@ -16,6 +16,11 @@ $('.cabinet__export-button-wrap button').click(function(){ $('.cabinet__export-error').parent().remove(); }); + + $('.search-reset-button').click(function(){ + var wrap = $(this).closest('.cabinet__filters'); + wrap.find('[name="search"]').val(''); + }); }); @@ -65,18 +70,19 @@

База данных

-
+
+ Сбросить поиск
diff --git a/resources/views/employers/dialog.blade.php b/resources/views/employers/dialog.blade.php index 318de83..eabdcc5 100644 --- a/resources/views/employers/dialog.blade.php +++ b/resources/views/employers/dialog.blade.php @@ -2,7 +2,11 @@ @section('scripts')