From 567d6161f9a1a6c8a9ddd98a05e170253105b502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Wed, 8 Nov 2023 19:06:54 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B4=D0=B0=D0=BA=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BE=D0=B4=D0=B0=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D0=B9=20=D0=B8=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/EmployersController.php | 18 ++++- resources/views/admin/education/form.blade.php | 81 ++++++++++---------- resources/views/admin/education/index.blade.php | 11 ++- resources/views/admin/employer/index.blade.php | 46 ++++++++++- 4 files changed, 109 insertions(+), 47 deletions(-) diff --git a/app/Http/Controllers/Admin/EmployersController.php b/app/Http/Controllers/Admin/EmployersController.php index caa16b6..fddae54 100644 --- a/app/Http/Controllers/Admin/EmployersController.php +++ b/app/Http/Controllers/Admin/EmployersController.php @@ -18,18 +18,28 @@ class EmployersController extends Controller { public function index(Request $request) { //$all_employer = User::where('is_worker', '0')->count(); - + $all_public = -1; + $all_status = -1; if ($request->ajax()) { $user = User::find($request->id); $request->offsetUnset('id'); $user->update($request->all()); } - $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.logo as emp_logo', 'emp.*']) + $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.code as code_id', 'emp.logo as emp_logo', 'emp.*']) ->join('employers as emp','emp.user_id','users.id') - ->where('users.is_worker', '0')->Realuser()->Notadmin(); + ->where('users.is_worker', '0')->Realuser(); //->Notadmin(); $all_employer = $users->count(); + $all_public = Employer::where('status_hidden', '=', '0')-> + count(); + + $all_status = Employer::where(function($query) { + $query->Where('category', '=', 'Не оплачен') + ->orWhere('category', '=', 'Не определен') + ->orWhere('category', '=', 'Согласование'); + })->count(); + $find_cat = ""; if (isset($request->category)) { if ($request->category != 'Все категории') { @@ -61,6 +71,8 @@ class EmployersController extends Controller 'find_key', 'find_cat', 'all_employer', + 'all_public', + 'all_status', 'select_category')); } } diff --git a/resources/views/admin/education/form.blade.php b/resources/views/admin/education/form.blade.php index 65bf479..e697afb 100644 --- a/resources/views/admin/education/form.blade.php +++ b/resources/views/admin/education/form.blade.php @@ -20,45 +20,6 @@

- -
- -
- -
+
+
Контакты:
+
+ +
+ +
+
+ +
+
+ + + +
+
+

+ Опубликованых +

+

+ {{ $all_public }} +

+
+
+ +
+
+ + + +
+
+

+ На рассмотрении +

+

+ {{ $all_status }} +

+
+
@@ -90,11 +124,12 @@ 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" > № + ID Лого - Название компании/Email/Тел/Пароль + Компания/Email/Тел/Пароль Категория - Комментарий - Дата регистрации + Коммент. + Дата регист. Редакт. @@ -105,6 +140,11 @@ {{$user->id}} + @if (isset($user->code_id)) + {{$user->code_id}} + @endif + + @if (isset($user->emp_logo) && ($user->emp_logo))