diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 3f379e6..7f875ac 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -372,7 +372,7 @@ class EmployerController extends Controller //'name_man' => ['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'name_company' => ['required', 'string', 'max:255'], - 'password' => ['required', 'string', 'min:8'], + 'password' => ['required', 'string', 'min:6'], ]; @@ -399,10 +399,10 @@ class EmployerController extends Controller return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); } - if (strlen($request->get('password')) < 8) { + if (strlen($request->get('password')) < 6) { return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); } - + /* $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M'); @@ -425,7 +425,7 @@ class EmployerController extends Controller if ((!$spec_bool) || (!$alpha_bool)) { return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); - } + }*/ if (empty($request->get('surname'))) { $params['surname'] = 'Неизвестно'; @@ -592,11 +592,12 @@ class EmployerController extends Controller // Данные $users = $users->Baseuser()-> - orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))-> - paginate(5); + orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id')); + $count_users = $users; + $users = $users->paginate(5); - return view('employers.bd', compact('users')); + return view('employers.bd', compact('users', 'count_users')); } //Настройка уведомлений diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index da1a7de..7d62fee 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -188,6 +188,7 @@ class WorkerController extends Controller view()->share('Query',$Query); + $pdf = PDF::loadView('layout.pdf', $Query); //->setPaper('a4', 'landscape'); return $pdf->stream(); @@ -197,7 +198,11 @@ class WorkerController extends Controller $status_work = $this->status_work; $Query = Worker::query()->with('users')->with('job_titles') ->with('place_worker')->with('sertificate')->with('prev_company') - ->with('infobloks'); + ->with('infobloks')-> + whereHas('users', function (Builder $query) { + $query->Where('is_worker', '=', '1') + ->Where('is_bd', '=', '1'); + }); //$Query = $Query->where('id', '=', $worker->id); $Query = $Query->get()->toArray(); @@ -471,7 +476,7 @@ class WorkerController extends Controller 'surname' => ['required', 'string', 'max:255'], 'name_man' => ['required', 'string', 'max:255'], 'email' => ['required', 'email', 'max:255', 'unique:users'], - 'password' => ['required', 'string', 'min:8'] + 'password' => ['required', 'string', 'min:6'] ]; $messages = [ @@ -497,7 +502,11 @@ class WorkerController extends Controller return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); } - $haystack = $request->get('password'); + if (strlen($request->get('password')) < 6) { + return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); + } + + /*$haystack = $request->get('password'); $specsumbol = Array('!','~', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', ';', ':', '<', '>', '?'); $alpha = Array('Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', @@ -520,13 +529,9 @@ class WorkerController extends Controller } } - if (!$lenpwd_bool) { - return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); - } - if ((!$spec_bool) || (!$alpha_bool)) { return json_encode(Array("ERROR" => "Error: Нет спецсимволов в пароле, латинские буквы заглавные, а также один из символов: !~#$%^&*()-=;,:<>?")); - } + }*/ if (($request->has('politik')) && ($request->get('politik') == 1)) { $validator = Validator::make($params, $rules, $messages); diff --git a/public/css/style.css b/public/css/style.css index c3513f2..97c5b8c 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1058,7 +1058,7 @@ h1 { } .input[disabled] { color: #9c9d9d; - background: #e7e7e7; + /*background: #e7e7e7;*/ } .input[type=date] { text-transform: uppercase; diff --git a/resources/views/employers/bd.blade.php b/resources/views/employers/bd.blade.php index 1b26249..e5fa28c 100644 --- a/resources/views/employers/bd.blade.php +++ b/resources/views/employers/bd.blade.php @@ -80,7 +80,7 @@ Всего вакансий найдено: - {{ $users->count() }} + {{ $count_users->count() }}