Commit 3dddd00f35cdf5590d358ad69cf5fa841394f1a8

Authored by Андрей Ларионов
Exists in master

Обновление по проекту пятница

Showing 20 changed files Side-by-side Diff

app/Http/Controllers/CompanyController.php
... ... @@ -8,7 +8,7 @@ use Illuminate\Http\Request;
8 8 class CompanyController extends Controller
9 9 {
10 10 public function shipping_companies(Request $request) {
11   - $emps = Employer::query()->with('ads');
  11 + $emps = Employer::query()->with('ads')->where('status_hidden', '=', '0');
12 12 if (($request->has('search')) && (!empty($request->get('search')))) {
13 13 $search = $request->get('search');
14 14 $emps = $emps->where('name_company', 'LIKE', "%$search%");
app/Http/Controllers/EmployerController.php
... ... @@ -162,18 +162,26 @@ class EmployerController extends Controller
162 162 public function cabinet_vacancie() {
163 163 $id = Auth()->user()->id;
164 164  
165   - $categories = Category::query()->active()->get();
166   - //if ($categories->count()) {
167   - // $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', $categories[0]->id)->get();
168   - //} else {
169   - // $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->Notbdif()->where('position_id', 0)->get();
170   - //}
171   - $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->where('is_bd', '=' , '0')->get();
172   - $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
173   - WhereHas('users',
174   - function (Builder $query) use ($id) {$query->Where('id', $id);
175   - })->get();
176   - return view('employers.add_vacancy', compact('Employer', 'jobs' , 'categories'));
  165 + if (Auth()->user()->is_public) {
  166 + $categories = Category::query()->active()->get();
  167 +
  168 + $jobs = Job_title::query()->OrderBy('name')->where('is_remove', '=', '0')->where('is_bd', '=', '0')->get();
  169 + $Employer = Employer::query()->with('users')->with('ads')->with('flots')->
  170 +
  171 + WhereHas('users',
  172 + function (Builder $query) use ($id) {
  173 + $query->Where('id', $id);
  174 + })->get();
  175 +
  176 + return view('employers.add_vacancy', compact('Employer', 'jobs', 'categories'));
  177 + } else {
  178 + return redirect()->route('employer.cabinet_vacancie_danger');
  179 + }
  180 + }
  181 +
  182 + // Форма предупреждения об оплате
  183 + public function cabinet_vacancie_danger() {
  184 + return view('employers.add_vacancy_danger');
177 185 }
178 186  
179 187 // Сохранение вакансии
... ... @@ -728,7 +736,12 @@ class EmployerController extends Controller
728 736  
729 737 // Рассылка сообщений
730 738 public function send_all_messages() {
731   - return view('employers.send_all');
  739 + $id = Auth()->user()->id;
  740 + $sending = Employer::query()->where('id', '=', "$id")->first();
  741 + if ($sending->sending_is)
  742 + return view('employers.send_all');
  743 + else
  744 + return view('employers.send_all_danger');
732 745 }
733 746  
734 747 // Отправка сообщений для информации
app/Http/Controllers/PagesController.php
... ... @@ -2,8 +2,12 @@
2 2  
3 3 namespace App\Http\Controllers;
4 4  
  5 +use App\Http\Requests\RequestSendAdmin;
  6 +use App\Mail\MailAdminy;
  7 +use App\Mail\MailRepair;
5 8 use App\Models\pages;
6 9 use Illuminate\Http\Request;
  10 +use Illuminate\Support\Facades\Mail;
7 11 use Illuminate\Support\Facades\Redis;
8 12 use PhpOffice\PhpSpreadsheet\Spreadsheet;
9 13 use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
... ... @@ -16,6 +20,16 @@ class PagesController extends Controller
16 20 return view('pages', compact('page'));
17 21 }
18 22  
  23 + public function form_feedback(RequestSendAdmin $request){
  24 + $all = $request->all();
  25 +
  26 + foreach ([$request->get('email')] as $recipient) {
  27 + Mail::to($recipient)->send(new MailAdminy($all));
  28 + }
  29 +
  30 + return redirect()->back()->with('Сообщение было успешно отправлено и будет обработано');
  31 + }
  32 +
19 33 public function redis() {
20 34 $redis = Redis::connection();
21 35 $redis->set('User:CompanyName', 'РЕКАМОРЕ');
app/Http/Controllers/WorkerController.php
... ... @@ -73,63 +73,76 @@ class WorkerController extends Controller
73 73 // лист база резюме
74 74 public function bd_resume(Request $request)
75 75 {
  76 + $look = false;
  77 + $idiot = 0;
76 78 if (isset(Auth()->user()->id)) {
77 79 $idiot = Auth()->user()->id;
78   - } else {
79   - $idiot = 0;
  80 + if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin))
  81 + $look = true;
80 82 }
81 83  
82   - $status_work = $this->status_work;
83   - $resumes = Worker::query()->with('users')->with('job_titles');
84   - $resumes = $resumes->whereHas('users', function (Builder $query) {
85   - $query->Where('is_worker', '=', '1')
86   - ->Where('is_bd', '=', '0');
87   - });
88   -
89   - //dd($request->get('job'));
90   - if (($request->has('job')) && ($request->get('job') > 0)) {
91   - $resumes = $resumes->whereHas('job_titles', function(Builder $query) use ($request) {
92   - $query->Where('job_titles.id', $request->get('job'));
  84 + if ($look) {
  85 + $status_work = $this->status_work;
  86 + $resumes = Worker::query()->with('users')->with('job_titles');
  87 + $resumes = $resumes->whereHas('users', function (Builder $query) {
  88 + $query->Where('is_worker', '=', '1')
  89 + ->Where('is_bd', '=', '0');
93 90 });
94   - }
95 91  
96   - $Job_title = Job_title::query()->get();
97   -
98   - if ($request->get('sort')) {
99   - $sort = $request->get('sort');
100   - switch ($sort) {
101   - case 'name_up':
102   - $resumes = $resumes->orderBy(User::select('surname')
103   - ->whereColumn('Workers.user_id', 'users.id')
104   - );
105   - break;
106   - case 'name_down':
107   - $resumes = $resumes->orderByDesc(User::select('surname')
108   - ->whereColumn('Workers.user_id', 'users.id')
109   - );
110   - break;
111   - case 'created_at_up': $resumes = $resumes->OrderBy('created_at')->orderBy('id'); break;
112   - case 'created_at_down': $resumes = $resumes->orderByDesc('created_at')->orderBy('id'); break;
113   - case 'default': $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
114   - default: $resumes = $resumes->orderBy('id')->orderby('updated_at'); break;
  92 + //dd($request->get('job'));
  93 + if (($request->has('job')) && ($request->get('job') > 0)) {
  94 + $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) {
  95 + $query->Where('job_titles.id', $request->get('job'));
  96 + });
115 97 }
116   - }
117 98  
118   - $res_count = $resumes->count();
119   - //$resumes = $resumes->get();
  99 + $Job_title = Job_title::query()->get();
120 100  
121   - $resumes = $resumes->paginate(4);
122   - if ($request->ajax()) {
123   - // Условия обставлены
124   - if ($request->has('block') && ($request->get('block') == 1)) {
125   - return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot'));
  101 + if ($request->get('sort')) {
  102 + $sort = $request->get('sort');
  103 + switch ($sort) {
  104 + case 'name_up':
  105 + $resumes = $resumes->orderBy(User::select('surname')
  106 + ->whereColumn('Workers.user_id', 'users.id')
  107 + );
  108 + break;
  109 + case 'name_down':
  110 + $resumes = $resumes->orderByDesc(User::select('surname')
  111 + ->whereColumn('Workers.user_id', 'users.id')
  112 + );
  113 + break;
  114 + case 'created_at_up':
  115 + $resumes = $resumes->OrderBy('created_at')->orderBy('id');
  116 + break;
  117 + case 'created_at_down':
  118 + $resumes = $resumes->orderByDesc('created_at')->orderBy('id');
  119 + break;
  120 + case 'default':
  121 + $resumes = $resumes->orderBy('id')->orderby('updated_at');
  122 + break;
  123 + default:
  124 + $resumes = $resumes->orderBy('id')->orderby('updated_at');
  125 + break;
  126 + }
126 127 }
127 128  
128   - if ($request->has('block') && ($request->get('block') == 2)) {
129   - return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot'));
  129 + $res_count = $resumes->count();
  130 + //$resumes = $resumes->get();
  131 + $resumes = $resumes->paginate(4);
  132 + if ($request->ajax()) {
  133 + // Условия обставлены
  134 + if ($request->has('block') && ($request->get('block') == 1)) {
  135 + return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count', 'idiot'));
  136 + }
  137 +
  138 + if ($request->has('block') && ($request->get('block') == 2)) {
  139 + return view('ajax.resume_2', compact('resumes', 'status_work', 'res_count', 'idiot'));
  140 + }
  141 + } else {
  142 + return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title'));
130 143 }
131 144 } else {
132   - return view('resume', compact('resumes', 'status_work', 'res_count', 'idiot', 'Job_title'));
  145 + return redirect()->route('index')->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]);
133 146 }
134 147 }
135 148  
app/Http/Requests/RequestSendAdmin.php
... ... @@ -0,0 +1,30 @@
  1 +<?php
  2 +
  3 +namespace App\Http\Requests;
  4 +
  5 +use Illuminate\Foundation\Http\FormRequest;
  6 +
  7 +class RequestSendAdmin extends FormRequest
  8 +{
  9 + /**
  10 + * Determine if the user is authorized to make this request.
  11 + *
  12 + * @return bool
  13 + */
  14 + public function authorize()
  15 + {
  16 + return true;
  17 + }
  18 +
  19 + /**
  20 + * Get the validation rules that apply to the request.
  21 + *
  22 + * @return array<string, mixed>
  23 + */
  24 + public function rules()
  25 + {
  26 + return [
  27 + //
  28 + ];
  29 + }
  30 +}
app/Mail/MailAdminy.php
... ... @@ -0,0 +1,66 @@
  1 +<?php
  2 +
  3 +namespace App\Mail;
  4 +
  5 +use Illuminate\Bus\Queueable;
  6 +use Illuminate\Contracts\Queue\ShouldQueue;
  7 +use Illuminate\Mail\Mailable;
  8 +use Illuminate\Mail\Mailables\Content;
  9 +use Illuminate\Mail\Mailables\Envelope;
  10 +use Illuminate\Queue\SerializesModels;
  11 +
  12 +class MailAdminy extends Mailable
  13 +{
  14 + use Queueable, SerializesModels;
  15 +
  16 + protected $data;
  17 + /**
  18 + * Create a new message instance.
  19 + *
  20 + * @return void
  21 + */
  22 + public function __construct($data)
  23 + {
  24 + $this->data = $data;
  25 + }
  26 +
  27 + /**
  28 + * Get the message envelope.
  29 + *
  30 + * @return \Illuminate\Mail\Mailables\Envelope
  31 + */
  32 + public function envelope()
  33 + {
  34 + return new Envelope(
  35 + subject: 'Mail Adminy',
  36 + );
  37 + }
  38 +
  39 + /**
  40 + * Get the message content definition.
  41 + *
  42 + * @return \Illuminate\Mail\Mailables\Content
  43 + */
  44 + public function content()
  45 + {
  46 + return new Content(
  47 + view: 'emails.send_adminy',
  48 + );
  49 + }
  50 +
  51 + public function build()
  52 + {
  53 + // Вернуть все данные
  54 + return $this->view('emails.send_adminy', ['data' => $this->data]);
  55 + }
  56 +
  57 + /**
  58 + * Get the attachments for the message.
  59 + *
  60 + * @return array
  61 + */
  62 + public function attachments()
  63 + {
  64 + return [];
  65 + }
  66 +}
app/Providers/MyServiceProvider.php
... ... @@ -112,7 +112,8 @@ class MyServiceProvider extends ServiceProvider
112 112 $view_job_title = ['modals.register'];
113 113 View::composer($view_job_title,
114 114 function($view_job_title) {
115   - $Job_titles = Job_title::query()->where('is_remove', '=', '1')->where('is_bd', '=' , '0')->get();
  115 + $Job_titles = Job_title::query()->where('is_remove', '=', '0')->
  116 + where('is_bd', '=' , '1')->get();
116 117 $view_job_title->with(['Job_titles' => $Job_titles]);
117 118 }
118 119 );
public/css/telegram.css
... ... @@ -0,0 +1,46 @@
  1 +.btn_telegram_share {
  2 + display: inline-block;
  3 + text-align: center;
  4 + vertical-align: middle;
  5 + margin-right: 7px;
  6 + padding: 3px 10px;
  7 + border: 1px solid #54aaeb;
  8 + border-radius: 50px;
  9 + background: #54aaeb;
  10 + background: -webkit-gradient(linear, left top, left bottom, from(#54aaeb), to(#54aaeb));
  11 + background: -moz-linear-gradient(top, #54aaeb, #54aaeb);
  12 + background: linear-gradient(to bottom, #54aaeb, #54aaeb);
  13 + font: normal normal normal 16px arial;
  14 + color: #ffffff;
  15 + text-decoration: none;
  16 +}
  17 +/*.btn_telegram_share:focus*/
  18 +.btn_telegram_share:hover
  19 +{
  20 + border: 1px solid #61c4ff;
  21 + background: #65ccff;
  22 + background: -webkit-gradient(linear, left top, left bottom, from(#65ccff), to(#65ccff));
  23 + background: -moz-linear-gradient(top, #65ccff, #65ccff);
  24 + background: linear-gradient(to bottom, #65ccff, #65ccff);
  25 + color: #ffffff;
  26 + text-decoration: none;
  27 +}
  28 +.btn_telegram_share:active {
  29 + background: #32668d;
  30 + background: -webkit-gradient(linear, left top, left bottom, from(#32668d), to(#54aaeb));
  31 + background: -moz-linear-gradient(top, #32668d, #54aaeb);
  32 + background: linear-gradient(to bottom, #32668d, #54aaeb);
  33 +}
  34 +.btn_telegram_share:before{
  35 + content: "\0000a0";
  36 + display: inline-block;
  37 + height: 24px;
  38 + width: 24px;
  39 + line-height: 24px;
  40 + margin: 0 4px -6px -4px;
  41 + position: relative;
  42 + top: 0px;
  43 + left: 0px;
  44 + background: url("http://Втавляем ссылку на свою картинку.png") no-repeat left center transparent;
  45 + background-size: 100% 100%;
  46 +}
resources/views/ajax/resume_1.blade.php
1 1  
2   -@if ($resumes->count())
3   - @foreach ($resumes as $res)
4   - <div class="main__resume-base-body-item">
5   - <div class="main__resume-base-body-item-buttons">
6   - <button type="button" class="like js-toggle js_box_favorites <?=\App\Classes\RusDate::selected_item($res->id);?>" data-val="{{ $res->id }}">
7   - <svg>
8   - <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
9   - </svg>
10   - </button>
11   - <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
  2 +<div class="main__resume-base-body-item">
  3 + <div class="main__resume-base-body-item-buttons">
  4 + <button type="button" data-id="{{ $res->id }}" id="elem{{ $res->id }}" class="like js-toggle js_box_favorit {{ \App\Classes\LikesClass::get_status_worker($res) }}" data-val="{{ $res->id }}">
  5 + <svg>
  6 + <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
  7 + </svg>
  8 + </button>
  9 + @guest
  10 + <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
  11 + class="chat js-toggle js_it_button">
  12 + <svg>
  13 + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
  14 + </svg>
  15 + </button>
  16 + @else
  17 + @if (App\Classes\StatusUser::Status()==0)
  18 + @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
  19 + <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
  20 + <svg>
  21 + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
  22 + </svg>
  23 + </button>
  24 + @endif
  25 + @else
  26 + <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}'
  27 + class="chat js-toggle js_it_button">
12 28 <svg>
13 29 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
14 30 </svg>
15   - </button>
  31 + </button> @endif
  32 + @endif
  33 + </div>
  34 + <div class="main__resume-base-body-item-wrapper">
  35 + <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
  36 + <div class="main__resume-base-body-item-inner">
  37 + <div>
  38 + <b>Статус</b>
  39 + <span>{{ $status_work[$res->status_work] }}</span>
16 40 </div>
17   - <div class="main__resume-base-body-item-wrapper">
18   - <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
19   - <div class="main__resume-base-body-item-inner">
20   - <div>
21   - <b>Статус</b>
22   - <span>{{ $status_work[$res->status_work] }}</span>
23   - </div>
24   - <div>
25   - <b>Имя работника</b>
26   - <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
27   - </div>
28   - <div>
29   - <b>Номер телефона</b>
30   - <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
31   - </div>
32   - <div>
33   - <b>Электронный адрес</b>
34   - <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
35   - </div>
36   - <div>
37   - <b>Город проживания</b>
38   - <span>{{ $res->city }}</span>
39   - </div>
40   - <div>
41   - <b>Опыт работы</b>
42   - <span>{{ $res->experience }}</span>
43   - </div>
44   - </div>
  41 + <div>
  42 + <b>Имя работника</b>
  43 + <span>@if (isset($res->users)){{ $res->users->surname." ".$res->users->name_man." ".$res->users->surname2 }} @endif</span>
45 44 </div>
46   - <div class="main__employer-page-two-item-tags">
47   - @if ($res->job_titles->count())
48   - @if (isset($res->job_titles))
49   - @foreach ($res->job_titles as $key => $j)
50   - <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
51   - @endforeach
52   - @endif
53   - @endif
  45 + <div>
  46 + <b>Номер телефона</b>
  47 + <span><a href="tel:{{ $res->telephone }}">{{ $res->telephone }}</a></span>
  48 + </div>
  49 + <div>
  50 + <b>Электронный адрес</b>
  51 + <span><a href="mailto:{{ $res->email }}">{{ $res->email }}</a></span>
  52 + </div>
  53 + <div>
  54 + <b>Город проживания</b>
  55 + <span>{{ $res->city }}</span>
  56 + </div>
  57 + <div>
  58 + <b>Опыт работы</b>
  59 + <span>{{ $res->experience }}</span>
54 60 </div>
55   - <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a>
56 61 </div>
57   - @endforeach
  62 + </div>
  63 + <div class="main__employer-page-two-item-tags">
  64 + @if ($res->job_titles->count())
  65 + @if (isset($res->job_titles))
  66 + @foreach ($res->job_titles as $key => $j)
  67 + <span class="main__employer-page-two-item-tag">#{{ $j->name }}</span>
  68 + @endforeach
  69 + @endif
  70 + @endif
  71 + </div>
  72 + <a href="{{ route('resume_profile', ['worker' => $res->id]) }}" class="button button_light main__resume-base-body-item-link">Перейти в резюме</a>
  73 +</div>
  74 +@endforeach
58 75  
59   - {{ $resumes->appends($_GET)->links('paginate') }}
  76 +{{ $resumes->appends($_GET)->links('paginate') }}
60 77 @else
61 78 <p>По данному запросу ничего не найдено</p>
62 79 @endif
resources/views/emails/send_adminy.blade.php
... ... @@ -0,0 +1,7 @@
  1 +<div>
  2 + Пользователь написал вам: {{ $data['name'] }}<br>
  3 + Email: {{ $data['email'] }}<br>
  4 + Название компании: {{ $data['name_company'] }}
  5 + Телефон: {{ $data['telephone'] }}<br>
  6 + Текст сообщения: {{ $data['text'] }}<br>
  7 +</div>
resources/views/employers/add_vacancy_danger.blade.php
... ... @@ -0,0 +1,60 @@
  1 +@extends('layout.frontend', ['title' => 'База данных - РекаМоре'])
  2 +
  3 +@section('scripts')
  4 + <script>
  5 + console.log('Test system');
  6 + $(document).on('click', '.die_black', function() {
  7 + var this_ = $(this);
  8 + var ajax_ = $('#ajax_flot_div');
  9 + var id_ = this_.attr('data-test');
  10 + var url_ = this_.attr('data-link');
  11 +
  12 + console.log(url_);
  13 + $.ajax({
  14 + type: "GET",
  15 + url: url_,
  16 + success: function (data) {
  17 + console.log('Ответка');
  18 + ajax_.html(data);
  19 + },
  20 + headers: {
  21 + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  22 + },
  23 + error: function (data) {
  24 + console.log('Error: ' + data);
  25 + }
  26 + });
  27 + });
  28 + </script>
  29 +@endsection
  30 +
  31 +@section('content')
  32 + <section class="cabinet">
  33 + <div class="container">
  34 + <ul class="breadcrumbs cabinet__breadcrumbs">
  35 + <li><a href="{{ route('index') }}">Главная</a></li>
  36 + <li><b>Личный кабинет</b></li>
  37 + </ul>
  38 + <div class="cabinet__wrapper">
  39 + <div class="cabinet__side">
  40 + <div class="cabinet__side-toper">
  41 + @include('employers.emblema')
  42 + </div>
  43 + @include('employers.menu', ['item' => 2])
  44 + </div>
  45 + <div class="cabinet__body">
  46 + <div class="cabinet__body-item">
  47 + <h2 class="title cabinet__title">Добавление вакансии</h2>
  48 + </div>
  49 + <div class="cabinet__body-item">
  50 + <div class="cabinet__table-header">
  51 + <div><!--_if (isset($it->workers[0]->job_titles[0]->name)) _ $it->workers[0]->job_titles[0]->name }}_else Не указано _endif-->
  52 + Нельзя добавить вакансию, прочтите инструкцию для преодоления данной проблемы.
  53 + <a style="text-decoration:underline" href="{{ route('page', ['pages' => 'Usloviya-razmescheniya']) }}">Условия размещения</a>
  54 + </div>
  55 + </div>
  56 + </div>
  57 + </div>
  58 + </section>
  59 + </div>
  60 +@endsection
resources/views/employers/bd_resume_danger.blade.php
... ... @@ -0,0 +1,60 @@
  1 +@extends('layout.frontend', ['title' => 'База данных - РекаМоре'])
  2 +
  3 +@section('scripts')
  4 + <script>
  5 + console.log('Test system');
  6 + $(document).on('click', '.die_black', function() {
  7 + var this_ = $(this);
  8 + var ajax_ = $('#ajax_flot_div');
  9 + var id_ = this_.attr('data-test');
  10 + var url_ = this_.attr('data-link');
  11 +
  12 + console.log(url_);
  13 + $.ajax({
  14 + type: "GET",
  15 + url: url_,
  16 + success: function (data) {
  17 + console.log('Ответка');
  18 + ajax_.html(data);
  19 + },
  20 + headers: {
  21 + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  22 + },
  23 + error: function (data) {
  24 + console.log('Error: ' + data);
  25 + }
  26 + });
  27 + });
  28 + </script>
  29 +@endsection
  30 +
  31 +@section('content')
  32 + <section class="cabinet">
  33 + <div class="container">
  34 + <ul class="breadcrumbs cabinet__breadcrumbs">
  35 + <li><a href="{{ route('index') }}">Главная</a></li>
  36 + <li><b>Личный кабинет</b></li>
  37 + </ul>
  38 + <div class="cabinet__wrapper">
  39 + <div class="cabinet__side">
  40 + <div class="cabinet__side-toper">
  41 + @include('employers.emblema')
  42 + </div>
  43 + @include('employers.menu', ['item' => 8])
  44 + </div>
  45 + <div class="cabinet__body">
  46 + <div class="cabinet__body-item">
  47 + <h2 class="title cabinet__title">База резюме</h2>
  48 + </div>
  49 + <div class="cabinet__body-item">
  50 + <div class="cabinet__table-header">
  51 + <div><!--_if (isset($it->workers[0]->job_titles[0]->name)) _ $it->workers[0]->job_titles[0]->name }}_else Не указано _endif-->
  52 + Данные нельзя просмотреть, прочтите инструкцию
  53 + <a style="text-decoration:underline" href="{{ route('page', ['pages' => 'Usloviya-razmescheniya']) }}">Условия размещения</a>
  54 + </div>
  55 + </div>
  56 + </div>
  57 + </div>
  58 + </section>
  59 + </div>
  60 +@endsection
resources/views/employers/list_vacancy.blade.php
... ... @@ -149,6 +149,11 @@
149 149 </svg>
150 150 </a>
151 151 @endif
  152 + <!--<a class="btn_telegram_share table__controls-item" href="https://telegram.me/share/url?url=ВАШ_URL&text={{ $it->name }}">
  153 + <svg>
  154 + <use xlink:href=" asset('images/sprite.svg#arrow-radius') }}"></use>
  155 + </svg>
  156 + </a>-->
152 157  
153 158 <!--<button type="button" class="table__controls-item">
154 159 <svg>
resources/views/employers/menu.blade.php
... ... @@ -33,6 +33,7 @@
33 33 </i>
34 34 <span>Профиль</span>
35 35 </a>
  36 + @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_public))
36 37 <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif">
37 38 <i>
38 39 <svg>
... ... @@ -41,6 +42,16 @@
41 42 </i>
42 43 <span>Разместить вакансию</span>
43 44 </a>
  45 + @else
  46 + <a href="{{ route('employer.cabinet_vacancie_danger') }}" class="cabinet__menu-item @if ($item==2) active @endif">
  47 + <i>
  48 + <svg>
  49 + <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use>
  50 + </svg>
  51 + </i>
  52 + <span>Разместить вакансию</span>
  53 + </a>
  54 + @endif
44 55 <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif">
45 56 <i>
46 57 <svg>
... ... @@ -81,6 +92,7 @@
81 92 </i>
82 93 <span>База данных</span>
83 94 </a>
  95 + @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin))
84 96 <a href="{{ route('bd_resume') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif">
85 97 <i>
86 98 <svg>
... ... @@ -89,6 +101,16 @@
89 101 </i>
90 102 <span>База резюме</span>
91 103 </a>
  104 + @else
  105 + <a href="{{ route('bd_resume_danger') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif">
  106 + <i>
  107 + <svg>
  108 + <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use>
  109 + </svg>
  110 + </i>
  111 + <span>База резюме</span>
  112 + </a>
  113 + @endif
92 114 <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif">
93 115 <i>
94 116 <svg>
resources/views/employers/send_all_danger.blade.php
... ... @@ -0,0 +1,60 @@
  1 +@extends('layout.frontend', ['title' => 'База данных - РекаМоре'])
  2 +
  3 +@section('scripts')
  4 + <script>
  5 + console.log('Test system');
  6 + $(document).on('click', '.die_black', function() {
  7 + var this_ = $(this);
  8 + var ajax_ = $('#ajax_flot_div');
  9 + var id_ = this_.attr('data-test');
  10 + var url_ = this_.attr('data-link');
  11 +
  12 + console.log(url_);
  13 + $.ajax({
  14 + type: "GET",
  15 + url: url_,
  16 + success: function (data) {
  17 + console.log('Ответка');
  18 + ajax_.html(data);
  19 + },
  20 + headers: {
  21 + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  22 + },
  23 + error: function (data) {
  24 + console.log('Error: ' + data);
  25 + }
  26 + });
  27 + });
  28 + </script>
  29 +@endsection
  30 +
  31 +@section('content')
  32 + <section class="cabinet">
  33 + <div class="container">
  34 + <ul class="breadcrumbs cabinet__breadcrumbs">
  35 + <li><a href="{{ route('index') }}">Главная</a></li>
  36 + <li><b>Личный кабинет</b></li>
  37 + </ul>
  38 + <div class="cabinet__wrapper">
  39 + <div class="cabinet__side">
  40 + <div class="cabinet__side-toper">
  41 + @include('employers.emblema')
  42 + </div>
  43 + @include('employers.menu', ['item' => 8])
  44 + </div>
  45 + <div class="cabinet__body">
  46 + <div class="cabinet__body-item">
  47 + <h2 class="title cabinet__title">Рассылка сообщений</h2>
  48 + </div>
  49 + <div class="cabinet__body-item">
  50 + <div class="cabinet__table-header">
  51 + <div><!--_if (isset($it->workers[0]->job_titles[0]->name)) _ $it->workers[0]->job_titles[0]->name }}_else Не указано _endif-->
  52 + Данные нельзя просмотреть, прочтите инструкцию
  53 + <a style="text-decoration:underline" href="{{ route('page', ['pages' => 'Usloviya-razmescheniya']) }}">Условия размещения</a>
  54 + </div>
  55 + </div>
  56 + </div>
  57 + </div>
  58 + </section>
  59 + </div>
  60 +@endsection
resources/views/index.blade.php
... ... @@ -5,6 +5,7 @@
5 5 @endsection
6 6  
7 7 @section('content')
  8 + @include('messages_error')
8 9 <section class="work">
9 10 <div class="container">
10 11 <img src="{{ asset('images/1.png') }}" alt="" class="work__pic">
resources/views/layout/frontend.blade.php
... ... @@ -8,6 +8,7 @@
8 8 <meta name="theme-color" content="#377D87">
9 9 <script src="{{ asset('js/jquery.js') }}"></script>
10 10 <!--<script type="text/javascript" src=" asset('js/jquery.cookie.js') }}"></script>-->
  11 + <link rel="stylesheet" href="{{ asset('css/telegram.css') }}">
11 12 <link rel="stylesheet" href="{{ asset('css/star-rating.min.css') }}">
12 13 <link rel="stylesheet" href="{{ asset('css/style.css') }}">
13 14 <style>
resources/views/pages.blade.php
... ... @@ -19,14 +19,112 @@
19 19 </div>
20 20 </div>
21 21 </section>
  22 + @if ($page->slug !== 'Usloviya-razmescheniya')
22 23 <main class="main">
23 24 <div class="container">
24 25 <div class="main__content">
25 26 <div class="main__content-item">
26   - {!! $page->text !!}
  27 + {!! $page->text !!}
27 28 </div>
28 29 </div>
29 30 </div>
30 31 </main>
  32 + @else
  33 + <main class="main">
  34 + <div class="container">
  35 + <div class="main__cond">
  36 + <div class="main__cond-label">
  37 + На рынке мы с 2020 года.
  38 + <br>Мы молодая компания, которой важно сделать хороший и востребованный продукт!
  39 + </div>
  40 + <div>
  41 + <h3>За это время нам удалось:</h3>
  42 + <ul class="main__cond-icons">
  43 + <li>
  44 + <span><img src="{{ asset('images/svg/1.svg') }}" alt=""></span>
  45 + Создать самое крупное сообщество Вконтакте по поиску работы на речноми морском флоте
  46 + </li>
  47 + <li>
  48 + <span><img src="{{ asset('images/svg/2.svg') }}" alt=""></span>
  49 + Создать самый крупный телеграм канал по поиску работы на речноми морском флоте
  50 + </li>
  51 + <li>
  52 + <span><img src="{{ asset('images/svg/3.svg') }}" alt=""></span>
  53 + Создать действительно эффективную и удобную базу анкет
  54 + </li>
  55 + <li>
  56 + <span><img src="{{ asset('images/svg/4.svg') }}" alt=""></span>
  57 + Разместить свою рекламу во многих учебных заведениях нашей страны. Колледжи,вузы, утц, медицинские центры охотно размещают нашу рекламу в своих заведениях
  58 + </li>
  59 + <li>
  60 + <span><img src="{{ asset('images/svg/5.svg') }}" alt=""></span>
  61 + Подключить к нашему сервису более 120 судоходных компаний России
  62 + </li>
  63 + <li>
  64 + <span><img src="{{ asset('images/svg/6.svg') }}" alt=""></span>
  65 + Оправдать доверие и ожидание, так как компании заключившие с нами договорв первый раз в 95% случаев остаются довольны сотрудничеством и продлевают договор
  66 + </li>
  67 + </ul>
  68 + </div>
  69 + <div>
  70 + <h3>Форма обратной связи</h3>
  71 + <p>Все поля обязательны для заполнения.</p>
  72 + <form class="callback main__cond-callback" method="POST" action="{{ route('form_feedback') }}">
  73 + @csrf
  74 + <div class="callback__body">
  75 + <input type="text" class="input" name="name" id="name" placeholder="Ваше имя" value="{{ old('name') ?? '' }}" required="">
  76 + @error('name')
  77 + <span class="text-xs text-red-600">
  78 + {{ $message }}
  79 + </span>
  80 + @enderror
  81 + <input type="text" class="input" name="name_company" id="name_company" value="{{ old('name_company') ?? '' }}" placeholder="Название судоходной компании" required="">
  82 + @error('name_company')
  83 + <span class="text-xs text-red-600">
  84 + {{ $message }}
  85 + </span>
  86 + @enderror
  87 + <input type="tel" class="input" name="telephone" id="telephone" value="{{ old('teelphone') ?? '' }}" placeholder="Телефон" required="">
  88 + @error('telephone')
  89 + <span class="text-xs text-red-600">
  90 + {{ $message }}
  91 + </span>
  92 + @enderror
  93 + <input type="email" class="input" name="email" id="email" value="{{ old('email') ?? '' }}" placeholder="Электронная почта" required="">
  94 + @error('email')
  95 + <span class="text-xs text-red-600">
  96 + {{ $message }}
  97 + </span>
  98 + @enderror
  99 + </div>
  100 + <textarea class="textarea callback__textarea" name="text" id="text" placeholder="Текст сообщения" required="">{{ old('text') ?? '' }}</textarea>
  101 + <div class="callback__bottom">
  102 + <label class="checkbox">
  103 + <input type="checkbox" name="politik" id="politik" class="checkbox__input" required="">
  104 + <span class="checkbox__icon">
  105 + <svg>
  106 + <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
  107 + </svg>
  108 + </span>
  109 + <span class="checkbox__text">
  110 + <span>
  111 + Я согласен(на) с
  112 + <a href="{{ route('page', ['pages' => 'Politika-konfidencialnosti']) }}">Политикой конфиденциальности</a>
  113 + </span>
  114 + </span>
  115 + @error('politik')
  116 + <span class="text-xs text-red-600">
  117 + {{ $message }}
  118 + </span>
  119 + @enderror
  120 + </label>
  121 + <button type="submit" class="button">Отправить</button>
  122 + </div>
  123 + </form>
  124 + </div>
  125 + </div>
  126 + </div>
  127 + </main>
  128 + @endif
31 129 </div>
32 130 @endsection
resources/views/resume.blade.php
... ... @@ -340,18 +340,21 @@
340 340 </button>
341 341 @else
342 342 @if (App\Classes\StatusUser::Status()==0)
  343 + @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
343 344 <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
344 345 <svg>
345 346 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
346 347 </svg>
347 348 </button>
  349 + @endif
348 350 @else
349 351 <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}'
350 352 class="chat js-toggle js_it_button">
351 353 <svg>
352 354 <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
353 355 </svg>
354   - </button> @endif
  356 + </button>
  357 + @endif
355 358 @endif
356 359 </div>
357 360 <div class="main__resume-base-body-item-wrapper">
... ... @@ -413,11 +416,36 @@
413 416 <use xlink:href="{{ asset('images/sprite.svg#heart') }}"></use>
414 417 </svg>
415 418 </button>
416   - <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
  419 + <!--<button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid=" $idiot}}" data-tuid=" $res->id }}" data-options='{"touch":false,"autoFocus":false}'>
417 420 <svg>
418   - <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
  421 + <use xlink:href=" asset('images/sprite.svg#chat') }}"></use>
419 422 </svg>
420   - </button>
  423 + </button>-->
  424 + @guest
  425 + <button type="button" data-fancybox data-src="#question" data-options='{"touch":false,"autoFocus":false}'
  426 + class="chat js-toggle js_it_button">
  427 + <svg>
  428 + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
  429 + </svg>
  430 + </button>
  431 + @else
  432 + @if (App\Classes\StatusUser::Status()==0)
  433 + @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_message))
  434 + <button type="button" class="chat js-toggle js_it_button" data-fancybox data-src="#send2" data-vacancy="0" data-uid="{{ $idiot}}" data-tuid="{{ $res->users->id }}" data-options='{"touch":false,"autoFocus":false}'>
  435 + <svg>
  436 + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
  437 + </svg>
  438 + </button>
  439 + @endif
  440 + @else
  441 + <button type="button" data-fancybox data-src="#question2" data-options='{"touch":false,"autoFocus":false}'
  442 + class="chat js-toggle js_it_button">
  443 + <svg>
  444 + <use xlink:href="{{ asset('images/sprite.svg#chat') }}"></use>
  445 + </svg>
  446 + </button>
  447 + @endif
  448 + @endif
421 449 </div>
422 450 <div class="main__resume-base-body-item-wrapper">
423 451 <img src="@isset ($res->photo) {{ asset(Storage::url($res->photo)) }} @else {{ asset('images/default_man.jpg')}} @endif" alt="" class="main__resume-base-body-item-photo">
... ... @@ -405,6 +405,9 @@ Route::get(&#39;excel/&#39;, [PagesController::class, &#39;excel&#39;])-&gt;name(&#39;excel&#39;);
405 405 // Страницы с произвольным контентом
406 406 Route::get('pages/{pages:slug}', [PagesController::class, 'pages'])->name('page');
407 407  
  408 +// Форма обратной связи
  409 +Route::post('form_feedback', [PagesController::class, 'form_feedback'])->name('form_feedback');
  410 +
408 411 // Публичные страницы соискателя
409 412 Route::get('workers/profile/{worker}', [WorkerController::class, 'profile'])->name('worker_page');
410 413  
... ... @@ -444,6 +447,9 @@ Route::get(&#39;contacts&#39;, [MainController::class, &#39;contacts&#39;])-&gt;name(&#39;contacts&#39;);
444 447  
445 448 //База резюме
446 449 Route::get('bd-resume', [WorkerController::class, 'bd_resume'])->name('bd_resume');
  450 +Route::get('bd_resume_danger', function(){
  451 + return view('employers.bd_resume_danger');
  452 +})->name('bd_resume_danger');
447 453  
448 454 Route::get('like-resume', [MainController::class, 'like_worker'])->name('like_resume');
449 455  
... ... @@ -564,6 +570,8 @@ Route::group([
564 570 // 2 страница - Добавление вакансий
565 571 Route::get('cabinet/vacancie', [EmployerController::class, 'cabinet_vacancie'])->name('cabinet_vacancie');
566 572 Route::post('vacancie', [EmployerController::class, 'cabinet_vacancy_save1'])->name('vac_save');
  573 + Route::get('cabinet/vacancie_danger', [EmployerController::class, 'cabinet_vacancie_danger'])->name('cabinet_vacancie_danger');
  574 +
567 575  
568 576 Route::get('selected_people', [EmployerController::class, 'selected_people'])->name('selected_people');
569 577