From 313a7a805990c406a66597fdada982544d6a4aa9 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: Mon, 16 Oct 2023 12:04:19 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D1=81=20=D1?= =?UTF-8?q?=80=D0=B0=D0=B7=D0=B4=D0=B5=D0=BB=D0=BE=D0=BC=20=D0=B1=D0=B0=D0=B7?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85,=20=D1=8D=D0=BA=D1=81?= =?UTF-8?q?=D0=BF=D0=BE=D1=80=D1=82=20=D0=B2=20=D1=8D=D0=BA=D1=81=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/EmployersController.php | 2 +- app/Http/Controllers/Admin/UsersController.php | 116 +++++- app/Http/Controllers/Admin/WorkersController.php | 20 +- app/Http/Requests/BaseUserRequest.php | 49 +++ app/Http/Requests/WorkerRequest.php | 50 +++ app/Models/BaseUsers.php | 11 + app/Models/User.php | 12 +- .../2023_10_11_085208_create_base_users_table.php | 31 ++ public/books-25.xlsx | Bin 0 -> 6216 bytes resources/views/admin/groups/form.blade.php | 24 ++ resources/views/admin/users/add.blade.php | 11 + resources/views/admin/users/edit.blade.php | 15 + resources/views/admin/users/form.blade.php | 106 ++++++ resources/views/admin/users/index.blade.php | 5 + resources/views/admin/users/index_bd.blade.php | 263 +++++++++++++ .../views/admin/users/index_bd_ajax.blade.php | 86 +++++ resources/views/admin/worker/add.blade.php | 369 ++++++++++++++++++ resources/views/admin/worker/edit_bd.blade.php | 391 ++++++++++++++++++++ resources/views/layout/admin.blade.php | 86 ++++- routes/web.php | 11 + 20 files changed, 1653 insertions(+), 5 deletions(-) create mode 100644 app/Http/Requests/BaseUserRequest.php create mode 100644 app/Http/Requests/WorkerRequest.php create mode 100644 app/Models/BaseUsers.php create mode 100644 database/migrations/2023_10_11_085208_create_base_users_table.php create mode 100644 public/books-25.xlsx create mode 100644 resources/views/admin/users/add.blade.php create mode 100644 resources/views/admin/users/edit.blade.php create mode 100644 resources/views/admin/users/form.blade.php create mode 100644 resources/views/admin/users/index_bd.blade.php create mode 100644 resources/views/admin/users/index_bd_ajax.blade.php create mode 100644 resources/views/admin/worker/add.blade.php create mode 100644 resources/views/admin/worker/edit_bd.blade.php diff --git a/app/Http/Controllers/Admin/EmployersController.php b/app/Http/Controllers/Admin/EmployersController.php index 3e652f8..50f00da 100644 --- a/app/Http/Controllers/Admin/EmployersController.php +++ b/app/Http/Controllers/Admin/EmployersController.php @@ -26,7 +26,7 @@ class EmployersController extends Controller } $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.*'])->join('employers as emp','emp.user_id','users.id') - ->where('users.is_worker', '0'); + ->where('users.is_worker', '0')->Realuser(); $all_employer = $users->count(); $find_cat = ""; diff --git a/app/Http/Controllers/Admin/UsersController.php b/app/Http/Controllers/Admin/UsersController.php index cec8581..e3cb058 100644 --- a/app/Http/Controllers/Admin/UsersController.php +++ b/app/Http/Controllers/Admin/UsersController.php @@ -3,9 +3,15 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; +use App\Http\Requests\BaseUserRequest; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use PhpOffice\PhpSpreadsheet\Spreadsheet; +use PhpOffice\PhpSpreadsheet\Style\Alignment; +use PhpOffice\PhpSpreadsheet\Style\Border; +use PhpOffice\PhpSpreadsheet\Style\Font; +use PhpOffice\PhpSpreadsheet\Writer\Xlsx; class UsersController extends Controller { @@ -33,6 +39,52 @@ class UsersController extends Controller } } + public function index_bd(Request $request) { + $title = 'Админка - Пользователи базы данных'; + + $find_key = ""; + $users = User::query(); + if (isset($request->find)) { + $find_key = $request->find; + $users = $users->where('name', 'LIKE', "%$find_key%") + ->orWhere('email', 'LIKE', "%$find_key%") + ->orWhere('telephone', 'LIKE', "%$find_key%"); + } + + $users = $users->Baseuser()->paginate(15); + + if ($request->ajax()) { + return view('admin.users.index_bd_ajax', compact('users')); + } else { + return view('admin.users.index_bd', compact('users', 'title', 'find_key')); + } + } + + public function add_bd() { + return view('admin.users.add'); + } + + public function add_store_bd(BaseUserRequest $request) { + $params = $request->all(); + $user = User::create($params); + return redirect()->route('admin.worker-profile-add', ['user' => $user]); + } + + public function edit_bd(User $user) { + return view('admin.users.edit', compact('user')); + } + + public function update_bd(BaseUserRequest $request, User $user) { + $params = $request->all(); + $user->update($params); + return redirect()->route('admin.basedata'); + } + + public function destroy_bd(User $user) { + $user->delete(); + return redirect()->route('admin.basedata'); + } + public function roles(Request $request) { if ($request->ajax()) { $user = User::find($request->id); @@ -40,7 +92,7 @@ class UsersController extends Controller $user->update($request->all()); } - $users = User::query()->paginate(15); + $users = User::query()->Realuser()->paginate(15); if ($request->ajax()) { return view('admin.users.roles.index_ajax', compact('users')); @@ -48,4 +100,66 @@ class UsersController extends Controller return view('admin.users.roles.index', compact('users')); } } + + public function doc_bd(User $user) { + $id = $user->id; + $spreadsheet = new Spreadsheet(); + $activeWorksheet = $spreadsheet->getActiveSheet(); + $activeWorksheet->setCellValue('A1', 'Отчет по соискателю'); + $activeWorksheet->getStyle('A1')->applyFromArray([ + 'font' => [ + 'name' => 'Arial', + 'bold' => true, + 'italic' => false, + 'underline' => Font::UNDERLINE_DOUBLE, + 'strikethrough' => false, + 'color' => [ + 'rgb' => '808080' + ] + ], + 'borders' => [ + 'allBorders' => [ + 'borderStyle' => Border::BORDER_THIN, + 'color' => [ + 'rgb' => '808080' + ] + ], + ], + 'alignment' => [ + 'horizontal' => Alignment::HORIZONTAL_CENTER, + 'vertical' => Alignment::VERTICAL_CENTER, + 'wrapText' => true, + ] + ]); + + $activeWorksheet->setCellValue('A2', "Псевдоним/имя: ".$user->name); + $activeWorksheet->setCellValue('A3', "Фамилия: ".$user->surname); + $activeWorksheet->setCellValue('A4', "Имя: ".$user->name_man); + $activeWorksheet->setCellValue('A5', "Отчество: ".$user->surname2); + $activeWorksheet->setCellValue('A6', "Телефон: ".$user->telephone); + $activeWorksheet->setCellValue('A7', "Емайл: ".$user->email); + + if (isset($user->workers[0]->id)) { + $activeWorksheet->setCellValue('A9', "Анкета: "); + $activeWorksheet->setCellValue('A10', "Телефон: " . $user->workers[0]->telephone); + $activeWorksheet->setCellValue('A11', "Емайл: " . $user->workers[0]->email); + } + + if (isset($user->jobtitles[0]->id)) { + $activeWorksheet->setCellValue('A12', "Должность: " . $user->jobtitles[0]->name); + } + + $writer = new Xlsx($spreadsheet); + + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment; filename="user'.$id.'.xlsx"'); + header('Cache-Control: no-cache'); + + $writer->save('php://output'); + $writer->save(storage_path("app/public/export/user$id.xlsx")); + + //$spreadsheet->disconnectWorksheets(); + return redirect()->route('admin.basedata'); + + } } diff --git a/app/Http/Controllers/Admin/WorkersController.php b/app/Http/Controllers/Admin/WorkersController.php index 85c157c..a29730e 100644 --- a/app/Http/Controllers/Admin/WorkersController.php +++ b/app/Http/Controllers/Admin/WorkersController.php @@ -3,11 +3,13 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; +use App\Http\Requests\WorkerRequest; use App\Models\Company; use App\Models\Job_title; use App\Models\Static_worker; use App\Models\User; use App\Models\Worker; +use Carbon\Carbon; use Illuminate\Database\Eloquent\Builder; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; @@ -70,7 +72,7 @@ class WorkersController extends Controller }); } - $users = $users->paginate(15); + $users = $users->Realuser()->paginate(15); /* $Arr = array(); @@ -115,6 +117,22 @@ class WorkersController extends Controller } } + public function form_add_worker(User $user) { + $job_titles = Job_title::query()->active()->orderBy('name')->get(); + + $time_end_anketa = 'Создана только'; + $long_days = Company::find(1)->time_resume; + $time_end_anketa = date("d.m.Y H:i:s", strtotime(Carbon::now() . "+$long_days days")); + + return view('admin.worker.add', compact('user', 'job_titles', 'time_end_anketa')); + } + + public function form_store_worker(WorkerRequest $request, User $user) { + $params = $request->all(); + $worker = Worker::create($params); + return redirect()->route('admin.basedata'); + } + public function form_edit_worker(Worker $worker) { $job_titles = Job_title::query()->active()->orderBy('name')->get(); diff --git a/app/Http/Requests/BaseUserRequest.php b/app/Http/Requests/BaseUserRequest.php new file mode 100644 index 0000000..e202c39 --- /dev/null +++ b/app/Http/Requests/BaseUserRequest.php @@ -0,0 +1,49 @@ + + */ + public function rules() + { + return [ + 'name' => 'required|min:3|max:255', + 'surname' => 'required|min:3|max:255', + 'name_man' => 'required|min:3|max:255', + 'email' => 'required|email|min:5', + ]; + } + + public function messages() { + return [ + 'required' => 'Поле :attribute обязательно для ввода', + 'min' => [ + 'string' => 'Поле «:attribute» должно быть не меньше :min символов', + 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' + ], + 'max' => [ + 'string' => 'Поле «:attribute» должно быть не больше :max символов', + 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' + ], + 'email' => 'Введите корректный емайл' + + ]; + } +} diff --git a/app/Http/Requests/WorkerRequest.php b/app/Http/Requests/WorkerRequest.php new file mode 100644 index 0000000..9c2ea1f --- /dev/null +++ b/app/Http/Requests/WorkerRequest.php @@ -0,0 +1,50 @@ + + */ + public function rules() + { + return [ + 'email' => 'email|string|max:255', + ]; + } + + public function messages() { + return [ + 'required' => 'Поле :attribute обязательно для ввода', + 'unique' => 'Поле :attribute должно быть уникальным', + 'mimes' => 'Допускаются файлы только с расширением jpeg,jpg,png', + 'min' => [ + 'string' => 'Поле «:attribute» должно быть не меньше :min символов', + 'integer' => 'Поле «:attribute» должно быть :min или больше', + 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' + ], + + 'max' => [ + 'string' => 'Поле «:attribute» должно быть не больше :max символов', + 'integer' => 'Поле «:attribute» должно быть :max или меньше', + 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' + ], + + ]; + } +} diff --git a/app/Models/BaseUsers.php b/app/Models/BaseUsers.php new file mode 100644 index 0000000..673b904 --- /dev/null +++ b/app/Models/BaseUsers.php @@ -0,0 +1,11 @@ +where('is_remove', '=', '0'); } + public function scopeBaseuser($query) { + return $query->where('is_bd', '=', '1'); + } + + public function scopeRealuser($query) { + return $query->where('is_bd', '=', '0'); + } + } diff --git a/database/migrations/2023_10_11_085208_create_base_users_table.php b/database/migrations/2023_10_11_085208_create_base_users_table.php new file mode 100644 index 0000000..61f3e78 --- /dev/null +++ b/database/migrations/2023_10_11_085208_create_base_users_table.php @@ -0,0 +1,31 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('base_users'); + } +}; diff --git a/public/books-25.xlsx b/public/books-25.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..9aeeb02c02871d3ff7f436aa80e4b8b8cdfb1169 GIT binary patch literal 6216 zcmZ`-Wmr`0799!cZjh4hkWPt_?vjQXdVrxs8bmrohE^$u5JBlKsUf66KtM!5x@!-ZNGotksH6xY!!_<%-<2eK*-5MDKu>$FZ)UAjVA8%q*o~Xs2R;0rjt9B@ zEE9ovtc4KhMyi8^u^4mn+3`O+GxQTQuW_=-r_1Y z0a>Q7LfqccQH79FFIj=96L5!F`gEBQW{%k#$ueD}Q&Q|n(q4PQ$X8wdElQa*TywJd z`frm)uat@(Jb$F{G-TCQeQ;Pf?*_@@p+!!Rf?Z#b0Yh`FOA%NdGOWo6=afopVJy%yxMTq9gLKl>X^fW z9Ny5qCI?lWxWonk0MI}K0Ps+9SbN#KdJFLXy#FBsY{;cc5I<}$5EmW@uZa}8mu)qW zS1(+JHR}2`nl-($l`r_hKe`gLX}s%6dZA8kgztqv?FZ@TnfQqces$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p^*H{EBQRm!gP_6z7YyB(g<8Pp$-~4|T zD{2jY{FwfF{tv_TcY^Dt;9oevPl6;=mH)*e{2h4RH~SS>h^ip}-$nbK=eo7@E6)I` zsrcP!`W=1U;P@3Cj+&_dLH})c{0_f9djAUN!1`kmzYpTS6I}1*ekGtH_=DhIo!##Y z*ITGx8J7NH_@|-z9eVvN{uMe&^vBD8J(+(8U$6DQf-6b>0spJ=|ITuK`~1pMfJ#zS g7X18#zgYg~X42KbL>)Fi4QV{U7%FjWDSrO@52rk)-T(jq literal 0 HcmV?d00001 diff --git a/resources/views/admin/groups/form.blade.php b/resources/views/admin/groups/form.blade.php index 427bab0..01b6b87 100644 --- a/resources/views/admin/groups/form.blade.php +++ b/resources/views/admin/groups/form.blade.php @@ -18,6 +18,10 @@ + Назад @@ -32,6 +36,7 @@ > № Имя пользователя + Статус пользователя Добавленные в группу @@ -44,6 +49,25 @@ {{$user->name}} + + + @if ($user->is_worker) + Работник + @else + Работодатель + @endif + + @if ($user->admin) + + Администратор + + @endif + @if ($user->is_bd) + + База данных + + @endif + ingroup->contains('id', $group->id)) {?>checked @endisset/> diff --git a/resources/views/admin/users/add.blade.php b/resources/views/admin/users/add.blade.php new file mode 100644 index 0000000..48a2516 --- /dev/null +++ b/resources/views/admin/users/add.blade.php @@ -0,0 +1,11 @@ +@extends('layout.admin', ['title' => 'Админка - Добавление пользователя в базу данных']) + +@section('content') +

+ Добавление пользователя в базу данных +

+
+ @csrf + @include('admin.users.form') +
+@endsection diff --git a/resources/views/admin/users/edit.blade.php b/resources/views/admin/users/edit.blade.php new file mode 100644 index 0000000..a583512 --- /dev/null +++ b/resources/views/admin/users/edit.blade.php @@ -0,0 +1,15 @@ +@extends('layout.admin', ['title' => 'Админка - Редактирование пользователя в базу данных']) + +@section('content') +

+ Редактирование пользователя в базу данных +

+
+ @csrf + @isset($user) + @method('PUT') + @endisset + + @include('admin.users.form') +
+@endsection diff --git a/resources/views/admin/users/form.blade.php b/resources/views/admin/users/form.blade.php new file mode 100644 index 0000000..66e325e --- /dev/null +++ b/resources/views/admin/users/form.blade.php @@ -0,0 +1,106 @@ +
+
+ +
+ +
+ + + + + + +
+ +
+ +
+ + + +
+
+ + Назад +
+
+
diff --git a/resources/views/admin/users/index.blade.php b/resources/views/admin/users/index.blade.php index 49cd5ac..d0c1e99 100644 --- a/resources/views/admin/users/index.blade.php +++ b/resources/views/admin/users/index.blade.php @@ -106,6 +106,11 @@ Администратор @endif + @if ($user->is_bd) + + База данных + + @endif @if ($user->id > 1) diff --git a/resources/views/admin/users/index_bd.blade.php b/resources/views/admin/users/index_bd.blade.php new file mode 100644 index 0000000..7cb18c1 --- /dev/null +++ b/resources/views/admin/users/index_bd.blade.php @@ -0,0 +1,263 @@ +@extends('layout.admin', ['title' => $title]) + +@section('script') + +@endsection + +@section('search') + @include('admin.find') +@endsection + +@section('content') +
+
+ Добавить пользователя

+ + + + + + + + + + + + + + @foreach($users as $user) + + + + + + + + + + + + + + + @endforeach + +
ИмяEmail/телефонСтатусАнкетаДата регистрацииИзменить
+ {{$user->id}} + + + + + {{ $user->name }} + +
+ +
+

{{ empty($user->employers->email) ? $user->email : $user->employers->email }}

+

+ {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} +

+
+
+
+ + @if ($user->is_worker) + Работник + @else + Работодатель + @endif + + @if ($user->admin) + + Администратор + + @endif + @if ($user->is_bd) + + База данных + + @endif + + @if (isset($user->workers[0]->id)) + Править | + Скачать + @endif + + {{ date('d.m.Y', strtotime($user->created_at)) }} + +
+ Изменить | + @csrf + @method('DELETE') + +
+
+
+ +
+ appends($_GET)->links('admin.pagginate'); ?> + links('admin.pagginate'); ?> +
+ + + +
+ + appends($_GET)->links('catalogs.paginate'); ?> + + +@endsection diff --git a/resources/views/admin/users/index_bd_ajax.blade.php b/resources/views/admin/users/index_bd_ajax.blade.php new file mode 100644 index 0000000..df23471 --- /dev/null +++ b/resources/views/admin/users/index_bd_ajax.blade.php @@ -0,0 +1,86 @@ +
+ + + + + + + + + + + + @foreach($users as $user) + + + + + + + + + @endforeach + +
ИмяEmail/логинСтатусДата регистрации
+ {{$user->id}} + + + {{ $user->name }} + +
+ +
+

{{ empty($user->employers->email) ? $user->email : $user->employers->email }}

+

+ {{ empty($user->employers->telephone) ? $user->telephone : $user->employers->telephone }} +

+
+
+
+ + @if ($user->is_worker) + Работник + @else + Работодатель + @endif + + @if ($user->admin) + + Администратор + + @endif + @if ($user->is_bd) + + База данных + + @endif + + {{ date('d.m.Y', strtotime($user->created_at)) }} +
+
+ +
+ appends($_GET)->links('admin.pagginate'); ?> + links('admin.pagginate'); ?> +
diff --git a/resources/views/admin/worker/add.blade.php b/resources/views/admin/worker/add.blade.php new file mode 100644 index 0000000..cd84bc5 --- /dev/null +++ b/resources/views/admin/worker/add.blade.php @@ -0,0 +1,369 @@ + +@extends('layout.admin', ['title' => 'Админка - Добавление резюме соискателя']) + +@section('content') +
+ @csrf +
+
+ + + + + + +
+
+ + + +
+
+
+
+ +
+ +
+ +
+ + + + +
+
+ +
+

+ +
+
+ + Назад +
+
+
+
+ + + + + + + + + +@endsection diff --git a/resources/views/admin/worker/edit_bd.blade.php b/resources/views/admin/worker/edit_bd.blade.php new file mode 100644 index 0000000..a538aa7 --- /dev/null +++ b/resources/views/admin/worker/edit_bd.blade.php @@ -0,0 +1,391 @@ + +@extends('layout.admin', ['title' => 'Админка - Редактирование соискателя']) + +@section('content') +

+ Соискатель-пользователь: {{$worker->users->surname}} {{$worker->users->name_man}} {{$worker->users->surname2}} ({{$worker->user_id}})" +

+
+ @csrf +
+
+ + + + + +
+
+ + + +
+
+
+
+ +
+ +
+ +
+ +
+ + + + +
+
+ +
+

+ +
+
+ + Назад +
+
+
+
+ + + + + + + + + +@endsection diff --git a/resources/views/layout/admin.blade.php b/resources/views/layout/admin.blade.php index 6e266ce..2fbb296 100644 --- a/resources/views/layout/admin.blade.php +++ b/resources/views/layout/admin.blade.php @@ -192,6 +192,27 @@ Сообщения все + +
  • + + + Заявки на рассылку + +
  • +
  • @endif
  • + + + Базы данных + +
  • + +
  • @@ -255,6 +296,7 @@ Учебн.заведения
  • +
  • Сообщения все
  • +
  • + + + Заявки на рассылку + +
  • + + +
  • @endif + +
  • + + + Базы данных + +
  • +
  • -