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))