From 7fa088c5b0476e7dfcdc6f928a1766b3c30e1b5a Mon Sep 17 00:00:00 2001 From: Sergey Panarin Date: Wed, 31 Jul 2024 11:02:13 +0200 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B4=D0=B0=D1=87=D0=B8=2058,49,51=20?= =?UTF-8?q?+=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BE=D1=82=20=D0=9C=D0?= =?UTF-8?q?=B0=D1=80=D0=B8=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/EmployerController.php | 14 +++++++++++ app/Http/Controllers/WorkerController.php | 13 +++++++--- public/css/style_may2024.css | 2 ++ resources/views/employers/bd.blade.php | 16 ++++++++---- resources/views/employers/dialog.blade.php | 6 ++++- resources/views/workers/cabinet.blade.php | 7 ++++-- resources/views/workers/dialog.blade.php | 26 +++++++++++++++----- resources/views/workers/docs-edit.blade.php | 2 +- .../workers/form_additional_documents.blade.php | 2 +- .../views/workers/form_basic_information.blade.php | 2 +- .../views/workers/prev_company_edit_form.blade.php | 2 +- resources/views/workers/sertificate_edit.blade.php | 2 +- 12 files changed, 72 insertions(+), 22 deletions(-) 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')