diff --git a/app/Classes/Capcha.php b/app/Classes/Capcha.php new file mode 100644 index 0000000..000085a --- /dev/null +++ b/app/Classes/Capcha.php @@ -0,0 +1,63 @@ +USE_SESSION = true; + // 1. Генерируем код капчи + // 1.1. Устанавливаем символы, из которых будет составляться код капчи + $this->chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz'; + // 1.2. Количество символов в капче + $this->length = 6; + } + + public function Release() { + // 1.3. Генерируем код + $code = substr(str_shuffle($this->chars), 0, $this->length); + + if ($this->USE_SESSION) { + // 2a. Используем сессию + session_start(); + $_SESSION['captcha'] = crypt($code, '$1$itchief$7'); + session_write_close(); + } else { + // 2a. Используем куки (время действия 600 секунд) + $value = crypt($code, '$1$itchief$7'); + $expires = time() + 600; + setcookie('captcha', $value, $expires, '/', 'test.ru', false, true); + } + + // 3. Генерируем изображение + // 3.1. Создаем новое изображение из файла + $image = imagecreatefrompng(__DIR__ . '/files/bg.png'); + // 3.2 Устанавливаем размер шрифта в пунктах + $size = 36; + // 3.3. Создаём цвет, который будет использоваться в изображении + $color = imagecolorallocate($image, 66, 182, 66); + // 3.4. Устанавливаем путь к шрифту + $font = __DIR__ . '/files//oswald.ttf'; + // 3.5 Задаём угол в градусах + $angle = rand(-10, 10); + // 3.6. Устанавливаем координаты точки для первого символа текста + $x = 56; + $y = 64; + // 3.7. Наносим текст на изображение + imagefttext($image, $size, $angle, $x, $y, $color, $font, $code); + // 3.8 Устанавливаем заголовки + header('Cache-Control: no-store, must-revalidate'); + header('Expires: 0'); + header('Content-Type: image/png'); + // 3.9. Выводим изображение + imagepng($image); + // 3.10. Удаляем изображение + imagedestroy($image); + } +} diff --git a/app/Http/Controllers/Admin/AdminController.php b/app/Http/Controllers/Admin/AdminController.php index a5d4c23..cee6877 100644 --- a/app/Http/Controllers/Admin/AdminController.php +++ b/app/Http/Controllers/Admin/AdminController.php @@ -5,9 +5,11 @@ namespace App\Http\Controllers\Admin; use App\Classes\Tools; use App\Http\Controllers\Controller; use App\Http\Requests\CompanyRequest; +use App\Http\Requests\RequestAdminNews; use App\Http\Requests\RequestPosition; use App\Models\Company; use App\Models\Employer; +use App\Models\News; use App\Models\Positions; use App\Models\User; use Carbon\Carbon; @@ -378,4 +380,50 @@ class AdminController extends Controller $position->delete(); return redirect()->route('admin.position'); } + + public function news_admin() { + $news = News::query()->paginate(10); + return view('admin.news.list', compact('news')); + } + + public function new_admin_add() { + return view('admin.news.add'); + } + + public function new_admin_add_save(RequestAdminNews $request) { + $params = $request->all(); + if ($request->has('image')) { + $params['image'] = $request->file('image')->store('news', 'public'); + } + + News::create($params); + return redirect()->route('admin.news_admin'); + } + + public function new_admin_edit(News $new) { + // Вернуть все + return view('admin.news.edit', compact('new')); + } + + public function new_admin_update_save(RequestAdminNews $request, News $new) { + $params = $request->all(); + if ($request->has('image')) { + if (!empty($request->get('image'))) { + $params['image'] = $request->file('image')->store('news', 'public'); + } else { + if (!empty($new->image)) + $params['image'] = $new->image; + else + unset($params['image']); + } + } + $new->update($params); + return redirect()->route('admin.news_admin'); + } + + public function new_admin_delete(News $new) + { + $new->delete(); + return redirect()->route('admin.news_admin'); + } } diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 7219c2e..937803d 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -75,6 +75,15 @@ class EmployerController extends Controller return view('employers.cabinet45', compact('Employer')); } + public function slider_flot() { + $id = Auth()->user()->id; + $Employer = Employer::query()->with('users')->with('ads')->with('flots')-> + WhereHas('users', + function (Builder $query) use ($id) {$query->Where('id', $id); + })->get(); + return view('employers.fly-flot', compact('Employer')); + } + public function cabinet_save(Employer $Employer, Request $request) { $params = $request->all(); $params['user_id'] = Auth()->user()->id; @@ -101,14 +110,14 @@ class EmployerController extends Controller } Flot::create($params); $data_flots = Flot::query()->where('employer_id', $request->get('employer_if'))->get(); - return redirect()->route('employer.cabinet')->with('success', 'Новый корабль был добавлен'); + return redirect()->route('employer.slider_flot')->with('success', 'Новый корабль был добавлен'); } public function delete_flot(Flot $Flot) { $data_flots = Flot::query()->where('employer_id', $Flot->employer_id)->get(); if (isset($Flot->id)) $Flot->delete(); - return redirect()->route('employer.cabinet')->with('success', 'Корабль был удален'); + return redirect()->route('employer.slider_flot')->with('success', 'Корабль был удален'); } // Форма добавления вакансий @@ -329,8 +338,8 @@ class EmployerController extends Controller $params = $request->all(); $rules = [ - 'surname' => ['required', 'string', 'max:255'], - 'name_man' => ['required', 'string', 'max:255'], + //'surname' => ['required', 'string', 'max:255'], + //'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'], @@ -355,7 +364,15 @@ class EmployerController extends Controller return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); } - $validator = Validator::make($request->all(), $rules, $messages); + if (empty($request->get('surname'))) { + $params['surname'] = 'Неизвестно'; + } + + if (empty($request->get('name_man'))) { + $params['name_man'] = 'Неизвестно'; + } + + $validator = Validator::make($params, $rules, $messages); if ($validator->fails()) { return json_encode(Array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); @@ -500,10 +517,14 @@ class EmployerController extends Controller // ->whereColumn('locations.document_id', 'documents.id') //); + $users = User_Model::query()->with('workers'); - if (isset($request->find)) { - $find_key = $request->find; + + if ($request->has('search')) { + $find_key = $request->get('search'); $users = $users->where('name', 'LIKE', "%$find_key%") + ->orWhere('surname', 'LIKE', "%$find_key%") + ->orWhere('name_man', 'LIKE', "%$find_key%") ->orWhere('email', 'LIKE', "%$find_key%") ->orWhere('telephone', 'LIKE', "%$find_key%"); } @@ -513,6 +534,7 @@ class EmployerController extends Controller orderBy(Worker::select('position_work')->whereColumn('Workers.user_id', 'users.id'))-> paginate(5); + return view('employers.bd', compact('users')); } diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php index 29d3c7c..411d19a 100644 --- a/app/Http/Controllers/MainController.php +++ b/app/Http/Controllers/MainController.php @@ -193,16 +193,20 @@ class MainController extends Controller else $uid = 0; + if ($request->get('job') == 0) + $job_search = ''; + else + $job_search = $request->get('job'); + $Query = Ad_employer::with('jobs')-> with('cat')-> with('employer')-> - whereHas('jobs_code', function ($query) use ($request) { - if (null !== ($request->get('job')) && ($request->get('job') !== 0)) { - $query->where('job_title_id', $request->get('job')); - } - }) - ->select('ad_employers.*'); + whereHas('jobs_code', function ($query) use ($job_search) { + if (!empty($job_search)) { + $query->where('job_title_id', $job_search); + } + })->select('ad_employers.*'); if (isset($categories->id) && ($categories->id > 0)) { $Query = $Query->where('category_id', '=', $categories->id); @@ -213,8 +217,6 @@ class MainController extends Controller if ($request->get('sort')) { $sort = $request->get('sort'); - - switch ($sort) { case 'name_up': $Query = $Query->orderBy('name')->orderBy('id'); break; case 'name_down': $Query = $Query->orderByDesc('name')->orderby('id'); break; @@ -233,8 +235,6 @@ class MainController extends Controller $Reclama = reclame::query()->get(); - - if ($request->ajax()) { if ($request->has('title')) { return view('ajax.list_category', compact( @@ -323,7 +323,8 @@ class MainController extends Controller if ($validator->fails()) { - return redirect()->route('index')->with('Error', "Email или пароль невалидный"); + return json_encode(Array("ERROR" => "Email или пароль невалидный!")); + //redirect()->route('index')->with('Error', "Email или пароль невалидный"); } else { $credentials = $request->only('email', 'password'); diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index 1b0d34c..0a994f4 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -75,6 +75,8 @@ class WorkerController extends Controller $idiot = 0; } + + $status_work = $this->status_work; $resumes = Worker::query()->with('users')->with('job_titles'); $resumes = $resumes->whereHas('users', function (Builder $query) { @@ -82,6 +84,15 @@ class WorkerController extends Controller ->Where('is_bd', '=', '0'); }); + //dd($request->get('job')); + if (($request->has('job')) && ($request->get('job') > 0)) { + $resumes = $resumes->whereHas('job_titles', function(Builder $query) use ($request) { + $query->Where('job_titles.id', $request->get('job')); + }); + } + + $Job_title = Job_title::query()->get(); + if ($request->get('sort')) { $sort = $request->get('sort'); switch ($sort) { @@ -103,6 +114,8 @@ class WorkerController extends Controller } $res_count = $resumes->count(); + //$resumes = $resumes->get(); + $resumes = $resumes->paginate(4); if ($request->ajax()) { // Условия обставлены @@ -114,7 +127,7 @@ class WorkerController extends Controller return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot')); } } else { - return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot')); + return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title')); } } @@ -180,6 +193,21 @@ class WorkerController extends Controller return $pdf->stream(); } + public function resume_download_all() { + $status_work = $this->status_work; + $Query = Worker::query()->with('users')->with('job_titles') + ->with('place_worker')->with('sertificate')->with('prev_company') + ->with('infobloks'); + //$Query = $Query->where('id', '=', $worker->id); + $Query = $Query->get()->toArray(); + + view()->share('Query',$Query); + + $pdf = PDF::loadView('layout.pdf-list-people', $Query); //->setPaper('a4', 'landscape'); + + return $pdf->stream(); + } + // Кабинет работника public function cabinet(Request $request) { @@ -464,11 +492,12 @@ class WorkerController extends Controller } if (($request->has('politik')) && ($request->get('politik') == 1)) { - $validator = Validator::make($request->all(), $rules, $messages); + $validator = Validator::make($params, $rules, $messages); if ($validator->fails()) { return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); } else { + $user = $this->create($params); event(new Registered($user)); Auth::guard()->login($user); @@ -522,7 +551,8 @@ class WorkerController extends Controller 'telephone' => $data['telephone'], 'password' => Hash::make($data['password']), 'pubpassword' => base64_encode($data['password']), - 'email_verified_at' => Carbon::now() + 'email_verified_at' => Carbon::now(), + 'is_worker' => $data['is_worker'], ]); if ($Code_user->id > 0) { $Worker = new Worker(); @@ -626,17 +656,29 @@ class WorkerController extends Controller return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); } + // Форма сертификате + public function new_sertificate(Worker $worker) { + return view('workers.sertificate_add', compact('worker')); + } + // Добавление сертификата public function add_serificate(Request $request) { $params = $request->all(); - $params['date_begin'] = date('d.m.Y', strtotime($params['date_begin'])); - $params['end_begin'] = date('d.m.Y', strtotime($params['end_begin'])); + $Sertificate = new sertification(); $Sertificate->create($params); $Docs = sertification::query()->where('worker_id', $request->get('worker_id'))->get(); - return view('ajax.documents', compact('Docs')); + return redirect()->route('worker.cabinet'); + //return view('ajax.documents', compact('Docs')); } + public function delete_diplom(Request $request, Worker $worker) { + $infoblok_id = $request->get('infoblok_id'); + $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); + + //$Infoblocks = infobloks::query()->get(); + return redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); + } // Удалить сертификат public function delete_sertificate(sertification $doc) { diff --git a/app/Http/Requests/RequestAdminNews.php b/app/Http/Requests/RequestAdminNews.php new file mode 100644 index 0000000..e9fa7dd --- /dev/null +++ b/app/Http/Requests/RequestAdminNews.php @@ -0,0 +1,30 @@ + + */ + public function rules() + { + return [ + // + ]; + } +} diff --git a/app/Models/User.php b/app/Models/User.php index 949eb51..3705ebb 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -31,6 +31,7 @@ class User extends Authenticatable 'is_lookin', 'is_message', 'is_public', + 'is_worker', 'is_remove', 'is_ban', 'is_new', diff --git a/resources/views/admin/news/add.blade.php b/resources/views/admin/news/add.blade.php new file mode 100644 index 0000000..2c29008 --- /dev/null +++ b/resources/views/admin/news/add.blade.php @@ -0,0 +1,8 @@ +@extends('layout.admin', ['title' => 'Админка - Добавление новости']) + +@section('content') +
+ @csrf + @include('admin.news.form') +
+@endsection diff --git a/resources/views/admin/news/edit.blade.php b/resources/views/admin/news/edit.blade.php new file mode 100644 index 0000000..ac42c5b --- /dev/null +++ b/resources/views/admin/news/edit.blade.php @@ -0,0 +1,8 @@ +@extends('layout.admin', ['title' => 'Админка - Редактирование новости']) + +@section('content') +
+ @csrf + @include('admin.news.form') +
+@endsection diff --git a/resources/views/admin/news/form.blade.php b/resources/views/admin/news/form.blade.php new file mode 100644 index 0000000..e6b5b2b --- /dev/null +++ b/resources/views/admin/news/form.blade.php @@ -0,0 +1,77 @@ + +
+
+ +
+ +
+ +
+ +
+
+ + Назад +
+
+
+ + diff --git a/resources/views/admin/news/list.blade.php b/resources/views/admin/news/list.blade.php new file mode 100644 index 0000000..52ff010 --- /dev/null +++ b/resources/views/admin/news/list.blade.php @@ -0,0 +1,92 @@ +@extends('layout.admin', ['title' => 'Админка - Реклама сайта']) + +@section('script') + + +@endsection + +@section('modal') + @include('admin.reclames.modal') +@endsection + +@section('search') + +@endsection + +@section('content') + + + Добавить новость + +
+ +
+ + +
+ + + + + + + + + + + @foreach($news as $new) + + + + + + + + @endforeach + +
Заголовок новостиДата публикации/редактированияРедактировать
+ {{$new->id}} + + {{$new->title}} + + {{ $new->created_at }} / {{ $new->updated_at }} + + Изменить | + Удалить +
+
+ +
+ appends($_GET)->links('admin.pagginate'); ?> +
+
+@endsection diff --git a/resources/views/ajax/resume_1.blade.php b/resources/views/ajax/resume_1.blade.php index 4c6d481..5e21cda 100644 --- a/resources/views/ajax/resume_1.blade.php +++ b/resources/views/ajax/resume_1.blade.php @@ -1,3 +1,4 @@ + @if ($resumes->count()) @foreach ($resumes as $res)
@@ -42,9 +43,20 @@
+
+ @if ($res->job_titles->count()) + @if (isset($res->job_titles)) + @foreach ($res->job_titles as $key => $j) + #{{ $j->name }} + @endforeach + @endif + @endif +
Перейти в резюме @endforeach {{ $resumes->appends($_GET)->links('paginate') }} +@else +

По данному запросу ничего не найдено

@endif diff --git a/resources/views/ajax/resume_2.blade.php b/resources/views/ajax/resume_2.blade.php index 8160b7f..4f8074d 100644 --- a/resources/views/ajax/resume_2.blade.php +++ b/resources/views/ajax/resume_2.blade.php @@ -42,10 +42,21 @@ +
+ @if ($res->job_titles->count()) + @if (isset($res->job_titles)) + @foreach ($res->job_titles as $key => $j) + #{{ $j->name }} + @endforeach + @endif + @endif +
Перейти в резюме @endforeach {{ $resumes->appends($_GET)->links('paginate') }} +@else +

По данному запросу ничего не найдено

@endif diff --git a/resources/views/employers/add_vacancy.blade.php b/resources/views/employers/add_vacancy.blade.php index ea96ce4..b9f2e44 100644 --- a/resources/views/employers/add_vacancy.blade.php +++ b/resources/views/employers/add_vacancy.blade.php @@ -99,10 +99,10 @@ -
+ -
+ + +
+
+ {{ $users->onEachSide(0)->appends($_GET)->links('paginate') }} + diff --git a/resources/views/employers/cabinet45.blade.php b/resources/views/employers/cabinet45.blade.php index c6e59bf..f5ac05e 100644 --- a/resources/views/employers/cabinet45.blade.php +++ b/resources/views/employers/cabinet45.blade.php @@ -1,10 +1,10 @@ -@extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре']) +@extends('layout.frontend', ['title' => 'Кабинет работодателя - РекаМоре']) @section('scripts') + +@endsection +@section('content') +
+
+ +
+
+
+ @include('employers.emblema') +
+ + @include('employers.menu', ['item' => 12]) + +
+
+ @include('messages_error') + +
+
+

Мой флот

+
+ + + @csrf + + +
+
+ +
+ + @error('name') + + {{ $message }} + + @enderror +
+
+
+ +
+ + @error('text') + + {{ $message }} + + @enderror +
+
+
+ +
+ + @error('region') + + {{ $message }} + + @enderror +
+
+
+ +
+ + @error('power') + + {{ $message }} + + @enderror +
+
+
+ +
+ + @error('DWT') + + {{ $message }} + + @enderror +
+
+
+ +
+ + @error('POWER_GD') + + {{ $message }} + + @enderror +
+
+
+ +
+ + @error('IMO') + + {{ $message }} + + @enderror +
+
+ +
+ + + +
+ @if (isset($Employer[0]->flots)) + @if ($Employer[0]->flots->count()) + @foreach ($Employer[0]->flots as $it) +
+ + + + + + @if (!empty($it->image)) + {{ $it->name }} + @else + {{ $it->name }} + @endif + {{ $it->name }} + {{ $it->region }} + DWT{{ $it->DWT }} + Мощность ГД{{ $it->POWER_GD }} + IMO{{ $it->IMO }} + {{ $it->power }} +
+ @endforeach + @endif + @endif +
+
+
+
+
+ +
+ + +@endsection diff --git a/resources/views/employers/menu.blade.php b/resources/views/employers/menu.blade.php index 7588848..9880a08 100644 --- a/resources/views/employers/menu.blade.php +++ b/resources/views/employers/menu.blade.php @@ -105,11 +105,19 @@ Настройки уведомлений - + + + + + + + Мой флот + + Сменить пароль - + Удалить профиль diff --git a/resources/views/employers/password-reset.blade.php b/resources/views/employers/password-reset.blade.php index 85008ad..e7f6c18 100644 --- a/resources/views/employers/password-reset.blade.php +++ b/resources/views/employers/password-reset.blade.php @@ -18,7 +18,7 @@ - @include('employers.menu', ['item' => 12]) + @include('employers.menu', ['item' => 13])
diff --git a/resources/views/js/captha.blade.php b/resources/views/js/captha.blade.php new file mode 100644 index 0000000..1d63e1a --- /dev/null +++ b/resources/views/js/captha.blade.php @@ -0,0 +1,115 @@ + + + diff --git a/resources/views/js/modals.blade.php b/resources/views/js/modals.blade.php index 0bf313e..d2622b4 100644 --- a/resources/views/js/modals.blade.php +++ b/resources/views/js/modals.blade.php @@ -1,4 +1,92 @@ diff --git a/resources/views/layout/admin.blade.php b/resources/views/layout/admin.blade.php index c9f2c1f..03f44ec 100644 --- a/resources/views/layout/admin.blade.php +++ b/resources/views/layout/admin.blade.php @@ -487,6 +487,29 @@ @endif @endif @endforeach + + +
  • + + + Новости + +
  • diff --git a/resources/views/layout/frontend.blade.php b/resources/views/layout/frontend.blade.php index e6df7b3..0a54e47 100644 --- a/resources/views/layout/frontend.blade.php +++ b/resources/views/layout/frontend.blade.php @@ -18,7 +18,7 @@ - + @@ -294,10 +294,8 @@ } }; -@yield('scripts') - @include('js.modals') -@include('js.cookies') - +@include('js.captha') +@yield('scripts') diff --git a/resources/views/layout/pdf-list-people.blade.php b/resources/views/layout/pdf-list-people.blade.php new file mode 100644 index 0000000..9c9e182 --- /dev/null +++ b/resources/views/layout/pdf-list-people.blade.php @@ -0,0 +1,350 @@ + + + + + + Резюме соискателя + + + + + + + +@if (count($Query) > 0) + @foreach ($Query as $Q) +
    +
    +
    + +
    +

    @if (isset($Q['users']['surname'])) {{ $Q['users']['surname']." ".$Q['users']['name_man']." ".$Q['users']['surname2'] }} @endif

    +
    +

    {{ $Q['text'] }}

    +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Основная информация
    Имя:@if (isset($Q['users']['name_man'])) {{ $Q['users']['name_man'] }} @endif
    Должность: + @foreach ($Q['job_titles'] as $it) + {{ $it['name'] }}
    + @endforeach +
    Телефон:{{ $Q['telephone'] }} + {{ $Q['telephone2'] }} +
    E-mail:{{ $Q['email'] }}
    Возраст:{{ $Q['old_year'] }}
    Статус: + @php $code = $Q['status_work']; @endphp + @if ($code == 0) Ищу работу @elseif($code == 1) Не указано @else Не ищу работу @endif
    Город проживания:{{ $Q['city'] }}
    Уровень английского:{{ $Q['en_is'] }}
    Опыт работы:{{ $Q['old_year'] }}
    +
    +
    +
    +
    + + + + + + + + @if (count($Q['sertificate'])) + @foreach($Q['sertificate'] as $it) + + + + + @endforeach + @else + + + + + @endif + +
    Сертификаты / документы
    {{ $it['name']." ".$it['education'] }}{{ date('d.m.Y H:i:s', strtotime($it['date_begin']))."-".date('d.m.Y H:i:s', strtotime($it['end_begin'])) }}
    - -
    +
    +
    +
    +
    + + + + + + + + @if (count($Q['place_worker']) > 0) + @foreach($Q['place_worker'] as $it) + + + + + + @endforeach + @endif + +
    Опыт работы
    {{ $it['begin_work']." - ".$it['end_work'] }} + {{ $it['name_company'] }} + {{ $it['job_title'] }} + Судно: {{ $it['teplohod'] }} +
    +
    +
    +
    +
    +

    О себе

    +

    {{ $Q['text'] }}

    + +
    +
    +
    + +
    +
    + @endforeach +@endif + + diff --git a/resources/views/list_vacancies.blade.php b/resources/views/list_vacancies.blade.php index b2ab495..41d14eb 100644 --- a/resources/views/list_vacancies.blade.php +++ b/resources/views/list_vacancies.blade.php @@ -292,7 +292,7 @@ @php $i++ @endphp @endforeach
    - {{ $Query->appends($_GET)->links('paginate') }} + {{ $Query->onEachSide(0)->appends($_GET)->links('paginate') }}
  • diff --git a/resources/views/modals/register.blade.php b/resources/views/modals/register.blade.php index 1b95222..b0422f2 100644 --- a/resources/views/modals/register.blade.php +++ b/resources/views/modals/register.blade.php @@ -1,3 +1,12 @@ + diff --git a/resources/views/worker.blade.php b/resources/views/worker.blade.php index c56edad..82cb11b 100644 --- a/resources/views/worker.blade.php +++ b/resources/views/worker.blade.php @@ -79,7 +79,13 @@ Должность: - @if (isset($Query[0]->job_titles[0]->name)) {{ $Query[0]->job_titles[0]->name }} @else Не указано @endif + + @if ($Query[0]->job_titles->count()) + @foreach ($Query[0]->job_titles as $it) + {{ $it->name }} + @endforeach + @endif + Телефон: diff --git a/resources/views/workers/ajax/diploms_dop.blade.php b/resources/views/workers/ajax/diploms_dop.blade.php new file mode 100644 index 0000000..9764f7b --- /dev/null +++ b/resources/views/workers/ajax/diploms_dop.blade.php @@ -0,0 +1,34 @@ +@if (isset($worker->infobloks)) + @if ($worker->infobloks->count()) + @php $i = 1; @endphp + @foreach ($worker->infobloks as $info) +
    + +
    +
    + +
    +
    +
    + @php $i++; @endphp + @endforeach + @endif +@endif + +
    + +
    +
    + +
    +
    +
    diff --git a/resources/views/workers/cabinet.blade.php b/resources/views/workers/cabinet.blade.php index 4de829c..0b458ee 100644 --- a/resources/views/workers/cabinet.blade.php +++ b/resources/views/workers/cabinet.blade.php @@ -3,7 +3,7 @@ @section('scripts') @endsection @@ -329,6 +360,21 @@ +
    +

    О себе

    + +
    + + +
    +
    + +
    @if ((isset($Worker[0]->sertificate)) && ($Worker[0]->sertificate->count() > 0)) @php $i = 0; @endphp @@ -346,7 +392,13 @@
    - + +
    + +
    +
    +
    +
    @@ -370,43 +422,17 @@
    -

    Добавить сертификат

    -
    - -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - -
    + +

    Дополнительная информация

    -
    - @if (isset($Worker[0]->infobloks)) +
    + @if (isset($Worker[0]->infobloks)) @if ($Worker[0]->infobloks->count()) @php $i = 1; @endphp @foreach ($Worker[0]->infobloks as $info) @@ -414,7 +440,7 @@
    - @@ -426,24 +452,24 @@ @endif @endif -
    +
    + + Добавить документ +
    @@ -529,91 +555,10 @@ @php $i++ @endphp @endforeach @endif - - - Новое место работы
    -
    - -
    -

    О себе

    - -
    - -
    -
    + Новое место работы +
    diff --git a/resources/views/workers/sertificate_add.blade.php b/resources/views/workers/sertificate_add.blade.php new file mode 100644 index 0000000..854e8d4 --- /dev/null +++ b/resources/views/workers/sertificate_add.blade.php @@ -0,0 +1,88 @@ +@extends('layout.frontend', ['title' => 'Добавление стандартного документа - РекаМоре']) + +@section('scripts') + +@endsection + +@section('content') +
    +
    + +
    +
    +
    + @include('workers.emblema') + +
    + + @include('workers.menu', ['item' => 1]) +
    + +
    +
    +

    Добавить сертификат

    +
    + @csrf + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + + Назад +
    +
    +
    +
    +
    +
    + +@endsection diff --git a/routes/web.php b/routes/web.php index 062e5f4..3f693ea 100644 --- a/routes/web.php +++ b/routes/web.php @@ -188,6 +188,14 @@ Route::group([ // кабинет настройки сайта сохранение формы Route::post('config', [AdminController::class, 'store_config'])->name('store_config'); + // кабинет - новости + Route::get('news-list', [AdminController::class, 'news_admin'])->name('news_admin'); + Route::get('news/add', [AdminController::class, 'new_admin_add'])->name('new_admin_add'); + Route::post('news/add', [AdminController::class, 'new_admin_add_save'])->name('new_admin_save_add'); + Route::get('news/edit/{new}', [AdminController::class, 'new_admin_edit'])->name('new_admin_edit'); + Route::post('news/edit/{new}', [AdminController::class, 'new_admin_update_save'])->name('new_admin_update'); + Route::get('news/delete/{new}', [AdminController::class, 'new_admin_delete'])->name('new_admin_delete'); + // кабинет - пользователи Route::get('users', [UsersController::class, 'index'])->name('users'); @@ -444,6 +452,9 @@ Route::get('resume-profile/{worker}', [WorkerController::class, 'resume_profile' //Скачать резюме Route::get('resume-download/{worker}', [WorkerController::class, 'resume_download'])->name('resume_download'); +Route::get('resume-download/all', [WorkerController::class, 'resume_download_all'])->name('resume_download_all2'); +Route::get('resume-download', [WorkerController::class, 'resume_download_all'])->name('resume_download_all'); + //Вход в кабинет Route::get('login', [MainController::class, 'input_login'])->name('login'); @@ -505,12 +516,14 @@ Route::group([ Route::get('кабинет/up/{worker}', [WorkerController::class, 'up'])->name('up'); // Добавление сертификата + Route::get('кабинет/new_sertificate/{worker}', [WorkerController::class, 'new_sertificate'])->name('new_sertificate'); Route::get('кабинет/add_sertificate', [WorkerController::class, 'add_serificate'])->name('add_serificate'); Route::get('кабинет/delete_sertificate/{doc}', [WorkerController::class, 'delete_sertificate'])->name('delete_sertificate'); // Добавление документа-диплома Route::get('кабинет/add_diplom/{worker}', [WorkerController::class, 'add_diplom'])->name('add_diplom'); Route::post('кабинет/add_diplom', [WorkerController::class, 'add_diplom_save'])->name('dop_info_save'); + Route::get('кабинет/delete_diplom/{worker}', [WorkerController::class, 'delete_diplom'])->name('delete_diplom'); // Добавление стандартного диплома Route::get('кабинет/add_document/{worker}', [WorkerController::class, 'add_document'])->name('add_document'); @@ -534,6 +547,7 @@ Route::group([ Route::post('cabinet/{Employer}', [EmployerController::class, 'cabinet_save'])->name('cabinet_save'); Route::post('flot_add_ajax', [EmployerController::class, 'save_add_flot'])->name('save_add_flot'); Route::get('flot_delete_ajax/{Flot}', [EmployerController::class, 'delete_flot'])->name('delete_flot'); + Route::get('cabinet/flot', [EmployerController::class, 'slider_flot'])->name('slider_flot'); // 2 страница - Добавление вакансий Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');