Commit 02bd35fdddf41c332fd03903d5c49c6a382228e5
Exists in
master
uncommited files
Showing 15 changed files Side-by-side Diff
- app/Http/Controllers/CompanyController.php
- app/Http/Controllers/EmployerController.php
- app/Http/Controllers/MainController.php
- app/Http/Controllers/PagesController.php
- app/Http/Requests/PagesRequest.php
- app/Mail/MailCreateEmployer.php
- app/Models/pages.php
- database/migrations/2024_03_05_100903_create_title_workers_table.php
- database/migrations/2024_06_06_092618_alter_table_pages.php
- public/css/style_may2024.css
- resources/views/admin/pages/form.blade.php
- resources/views/emails/create_emp.blade.php
- resources/views/emails/send_adminy.blade.php
- resources/views/employers/menu.blade.php
- resources/views/pages.blade.php
app/Http/Controllers/CompanyController.php
... | ... | @@ -56,7 +56,7 @@ class CompanyController extends Controller |
56 | 56 | |
57 | 57 | $ads = Ad_employer::query()->with('jobs')->with('jobs_code')-> |
58 | 58 | OrderByDesc('id')-> |
59 | - where('employer_id', '=', $company[0]->id)->paginate(2); | |
59 | + where('employer_id', '=', $company[0]->id)->paginate(50); | |
60 | 60 | |
61 | 61 | return view('info_company_new', compact('company', 'user_id', 'title', 'ads')); |
62 | 62 | } |
app/Http/Controllers/EmployerController.php
... | ... | @@ -10,6 +10,8 @@ use App\Http\Requests\FlotRequest; |
10 | 10 | use App\Http\Requests\MessagesRequiest; |
11 | 11 | use App\Http\Requests\VacancyRequestEdit; |
12 | 12 | use App\Http\Requests\VacansiaRequiest; |
13 | +use App\Mail\MailAdminy; | |
14 | +use App\Mail\MailCreateEmployer; | |
13 | 15 | use App\Mail\MailSotrudnichestvo; |
14 | 16 | use App\Mail\SendAllMessages; |
15 | 17 | use App\Models\Ad_employer; |
... | ... | @@ -300,7 +302,7 @@ class EmployerController extends Controller |
300 | 302 | $vac_emp->updated_at = $up; |
301 | 303 | $vac_emp->save(); |
302 | 304 | |
303 | - return redirect()->route('employer.vacancy_list'); | |
305 | + return redirect()->back(); //route('employer.vacancy_list'); | |
304 | 306 | // начало конца |
305 | 307 | } |
306 | 308 | |
... | ... | @@ -475,6 +477,9 @@ class EmployerController extends Controller |
475 | 477 | } else { |
476 | 478 | $user = $this->create($params); |
477 | 479 | event(new Registered($user)); |
480 | + | |
481 | + Mail::to(env('EMAIL_ADMIN'))->send(new MailCreateEmployer($params)); | |
482 | + | |
478 | 483 | Auth::guard()->login($user); |
479 | 484 | } |
480 | 485 |
app/Http/Controllers/MainController.php
... | ... | @@ -153,7 +153,8 @@ class MainController extends Controller |
153 | 153 | public function vacancies(Request $request) { |
154 | 154 | //должности |
155 | 155 | $Job_title = Job_title::query()->where('is_remove', '=', '0')-> |
156 | - where('is_bd', '=', '0')->orderByDesc('sort')->orderBy('name')->get(); | |
156 | + where('is_bd', '=', '0')->orderByDesc('sort')-> | |
157 | + orderBy('name')->get(); | |
157 | 158 | |
158 | 159 | $categories = Category::query()->selectRaw('count(ad_employers.id) as cnt, categories.*') |
159 | 160 | ->selectRaw('min(ad_employers.salary) as min_salary, max(ad_employers.salary) as max_salary') |
... | ... | @@ -266,7 +267,9 @@ class MainController extends Controller |
266 | 267 | } |
267 | 268 | } |
268 | 269 | |
269 | - $Job_title = Job_title::query()->where('is_bd', '=', '0')->OrderBy('name')->get(); | |
270 | + $Job_title = Job_title::query()->where('is_remove', '=', '0')-> | |
271 | + where('is_bd', '=', '0')->orderByDesc('sort')-> | |
272 | + orderBy('name')->get(); | |
270 | 273 | |
271 | 274 | $Query_count = $Query->count(); |
272 | 275 |
app/Http/Controllers/PagesController.php
... | ... | @@ -4,9 +4,7 @@ namespace App\Http\Controllers; |
4 | 4 | |
5 | 5 | use App\Http\Requests\RequestSendAdmin; |
6 | 6 | use App\Mail\MailAdminy; |
7 | -use App\Mail\MailRepair; | |
8 | 7 | use App\Models\pages; |
9 | -use Illuminate\Http\Request; | |
10 | 8 | use Illuminate\Support\Facades\Mail; |
11 | 9 | use Illuminate\Support\Facades\Redis; |
12 | 10 | use PhpOffice\PhpSpreadsheet\Spreadsheet; |
app/Http/Requests/PagesRequest.php
app/Mail/MailCreateEmployer.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 MailCreateEmployer 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 Create Employer', | |
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.create_emp', | |
48 | + ); | |
49 | + } | |
50 | + | |
51 | + public function build() | |
52 | + { | |
53 | + // Вернуть все данные | |
54 | + return $this->view('emails.create_emp', ['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/Models/pages.php
database/migrations/2024_03_05_100903_create_title_workers_table.php
... | ... | @@ -16,7 +16,7 @@ return new class extends Migration |
16 | 16 | Schema::create('title_workers', function (Blueprint $table) { |
17 | 17 | $table->id(); |
18 | 18 | $table->bigInteger('worker_id')->nullable(false); |
19 | - $table->bigInteger('jib_title_id')->nullable(false); | |
19 | + $table->bigInteger('job_title_id')->nullable(false); | |
20 | 20 | $table->timestamps(); |
21 | 21 | }); |
22 | 22 | } |
database/migrations/2024_06_06_092618_alter_table_pages.php
... | ... | @@ -0,0 +1,32 @@ |
1 | +<?php | |
2 | + | |
3 | +use Illuminate\Database\Migrations\Migration; | |
4 | +use Illuminate\Database\Schema\Blueprint; | |
5 | +use Illuminate\Support\Facades\Schema; | |
6 | + | |
7 | +return new class extends Migration | |
8 | +{ | |
9 | + /** | |
10 | + * Run the migrations. | |
11 | + * | |
12 | + * @return void | |
13 | + */ | |
14 | + public function up() | |
15 | + { | |
16 | + Schema::table('pages', function (Blueprint $table) { | |
17 | + $table->longText('text2')->nullable(true); | |
18 | + }); | |
19 | + } | |
20 | + | |
21 | + /** | |
22 | + * Reverse the migrations. | |
23 | + * | |
24 | + * @return void | |
25 | + */ | |
26 | + public function down() | |
27 | + { | |
28 | + Schema::table('pages', function (Blueprint $table) { | |
29 | + $table->dropColumn('text2'); | |
30 | + }); | |
31 | + } | |
32 | +}; |
public/css/style_may2024.css
... | ... | @@ -3898,7 +3898,7 @@ h1 { |
3898 | 3898 | } |
3899 | 3899 | } |
3900 | 3900 | .main__employer-page-two .main__employer-page-two-item { |
3901 | - display: none; | |
3901 | + /*display: none;*/ | |
3902 | 3902 | } |
3903 | 3903 | .main__employer-page-two .main__employer-page-two-item:nth-of-type(1), .main__employer-page-two .main__employer-page-two-item:nth-of-type(2) { |
3904 | 3904 | display: -webkit-box; |
... | ... | @@ -8985,4 +8985,4 @@ main + .news { |
8985 | 8985 | display: -webkit-box; |
8986 | 8986 | display: -ms-flexbox; |
8987 | 8987 | display: flex; |
8988 | -} | |
8989 | 8988 | \ No newline at end of file |
8989 | +} |
resources/views/admin/pages/form.blade.php
... | ... | @@ -86,9 +86,9 @@ |
86 | 86 | |
87 | 87 | <label class="block text-sm"> |
88 | 88 | <span class="text-gray-700 dark:text-gray-400">Текст</span> |
89 | - <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text" placeholder="Текст (html)" required | |
90 | - rows="10">{{ old('text') ?? $page->text ?? '' }}</textarea> | |
91 | - @error('text') | |
89 | + <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor" name="text2" placeholder="Текст (html)" required | |
90 | + rows="10">{{ old('text2') ?? $page->text2 ?? '' }}</textarea> | |
91 | + @error('text2') | |
92 | 92 | <span class="text-xs text-red-600 dark:text-red-400"> |
93 | 93 | {{ $message }} |
94 | 94 | </span> |
... | ... | @@ -139,7 +139,7 @@ |
139 | 139 | <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> |
140 | 140 | <script> |
141 | 141 | CKEDITOR.replace( 'anons'); |
142 | - CKEDITOR.replace( 'text', { | |
142 | + CKEDITOR.replace( 'text2', { | |
143 | 143 | filebrowserUploadUrl: "{{route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", |
144 | 144 | filebrowserImageUploadUrl: "{{ route('ckeditor.image-upload', ['_token' => csrf_token() ])}}", |
145 | 145 | filebrowserUploadMethod: 'form' |
resources/views/emails/create_emp.blade.php
resources/views/emails/send_adminy.blade.php
1 | 1 | <div> |
2 | 2 | Пользователь написал вам: {{ $data['name'] }}<br> |
3 | 3 | Email: {{ $data['email'] }}<br> |
4 | - Название компании: {{ $data['name_company'] }} | |
4 | + Название компании: {{ $data['name_company'] }}<br> | |
5 | 5 | Телефон: {{ $data['telephone'] }}<br> |
6 | 6 | Текст сообщения: {{ $data['text'] }}<br> |
7 | 7 | </div> |
resources/views/employers/menu.blade.php
... | ... | @@ -60,14 +60,14 @@ |
60 | 60 | </i> |
61 | 61 | <span>Мои вакансии</span> |
62 | 62 | </a> |
63 | - <a href="{{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item @if ($item==4) active @endif"> | |
63 | + <!-- <a href="{ route('employer.answers', ['employer' => $id_employer]) }}" class="cabinet__menu-item if ($item==4) active endif"> | |
64 | 64 | <i> |
65 | 65 | <svg> |
66 | - <use xlink:href="{{ asset('images/sprite.svg#cabinet-4') }}"></use> | |
66 | + <use xlink:href="{ asset('images/sprite.svg#cabinet-4') }}"></use> | |
67 | 67 | </svg> |
68 | 68 | </i> |
69 | 69 | <span>Отклики на вакансию</span> |
70 | - </a> | |
70 | + </a>--> | |
71 | 71 | <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif"> |
72 | 72 | <i> |
73 | 73 | <svg> |