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('