From 6bad752f0bc6ef5519e0376f43f6f0742d2a9571 Mon Sep 17 00:00:00 2001 From: Fedor Date: Tue, 1 Oct 2024 21:07:07 +0700 Subject: [PATCH] task-132687 minor changes --- app/Classes/Tools.php | 38 ++++++++++++++------ .../Integrations/Telegram/VacancyChannel.php | 1 + app/Http/Controllers/EmployerController.php | 12 +++---- resources/views/admin/users/form.blade.php | 2 +- resources/views/employers/dialog.blade.php | 24 +++++++++++-- resources/views/employers/favorite.blade.php | 38 ++++++++++++++++++-- .../views/modals/vacancy/add_comment.blade.php | 31 ++++++++++------ .../vacancy/ask_for_resume_comment.blade.php | 2 +- .../vacancy/send_response_no_comment.blade.php | 22 ++++++++++++ resources/views/vacance-item.blade.php | 7 ++-- 10 files changed, 137 insertions(+), 40 deletions(-) create mode 100644 resources/views/modals/vacancy/send_response_no_comment.blade.php diff --git a/app/Classes/Tools.php b/app/Classes/Tools.php index 4b10015..f9aa89a 100644 --- a/app/Classes/Tools.php +++ b/app/Classes/Tools.php @@ -27,28 +27,44 @@ class Tools public static function getWorkerProfilePercent(Worker $Worker): int { - $persent = 10; + $persent = 0; - if ((!empty($Worker->telephone)) && - (!empty($Worker->email)) && (!empty($Worker->experience)) && - (!empty($Worker->city)) && (!empty($Worker->old_year))) { - $persent = $persent + 40; + if ( + (!empty($Worker->users->surname)) && + (!empty($Worker->users->name_man)) && + (!empty($Worker->users->surname2)) && + (!empty($Worker->old_year)) && + ($Worker->job_titles->count() > 0) && + (!empty($Worker->salary_expectations)) && + (!empty($Worker->experience)) && + (!empty($Worker->english_level)) && + (!empty($Worker->ready_boart_date)) && + (!empty($Worker->boart_type_preference)) && + (!empty($Worker->visa_available)) && + (!empty($Worker->confirmation_work_for_vvp)) && + (!empty($Worker->military_id_available)) && + (!empty($Worker->city)) && + (!empty($Worker->telephone)) && + (!empty($Worker->email)) && + (!empty($Worker->telephone2)) + ) { + $persent += 50; } if ($Worker->sertificate->count() > 0) { - $persent = $persent + 15; + $persent += 10; } if ($Worker->infobloks->count() > 0) { - $persent = $persent + 20; + $persent += 10; } - if ($Worker->prev_company->count() > 0) { - $persent = $persent + 10; + if ($Worker->place_worker->count() > 0) { + $persent += 25; } - if (!empty($Worker->photo)) { - $persent = $persent + 5; + if ($Worker->prev_company->count() > 0) { + $persent += 5; } return $persent; diff --git a/app/Components/Integrations/Telegram/VacancyChannel.php b/app/Components/Integrations/Telegram/VacancyChannel.php index 17a2d75..2a8c167 100644 --- a/app/Components/Integrations/Telegram/VacancyChannel.php +++ b/app/Components/Integrations/Telegram/VacancyChannel.php @@ -55,6 +55,7 @@ class VacancyChannel $text = str_ireplace('

', '', $vacancy->text); $text = str_ireplace('

', '', $text); + $text = str_ireplace('
', '', $text); $this->botApi->sendMessage([ 'chat_id' => $chatId, diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 987c71d..79a379f 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -296,13 +296,11 @@ class EmployerController extends Controller // Обновление даты public function vacancy_up(Ad_employer $ad_employer) { - $up = date('m/d/Y h:i:s', time());; - $vac_emp = Ad_employer::findOrFail($ad_employer->id); - $vac_emp->updated_at = $up; - $vac_emp->save(); + $up = date('m/d/Y h:i:s', time()); + $ad_employer->updated_at = $up; + $ad_employer->save(); - return redirect()->back(); //route('employer.vacancy_list'); - // начало конца + return redirect()->back(); } //Видимость вакансии @@ -546,7 +544,7 @@ class EmployerController extends Controller $workerBuilder->whereHas('users', function (Builder $query) use ($search) { $query->where('surname', 'LIKE', "%$search%") - ->oWhere('name_man', 'LIKE', "%$search%") + ->orWhere('name_man', 'LIKE', "%$search%") ->orWhere('surname2', 'LIKE', "%$search%"); }); } diff --git a/resources/views/admin/users/form.blade.php b/resources/views/admin/users/form.blade.php index c373242..d40c44f 100644 --- a/resources/views/admin/users/form.blade.php +++ b/resources/views/admin/users/form.blade.php @@ -14,7 +14,7 @@ @isset($list_job_titles) @foreach($list_job_titles as $job_title)