diff --git a/app/Classes/Tools.php b/app/Classes/Tools.php index f9aa89a..b5e84f0 100644 --- a/app/Classes/Tools.php +++ b/app/Classes/Tools.php @@ -29,9 +29,15 @@ class Tools { $persent = 0; - if ( - (!empty($Worker->users->surname)) && + if((!empty($Worker->users->surname)) && (!empty($Worker->users->name_man)) && + (!empty($Worker->telephone)) && + (!empty($Worker->email)) + ) { + $persent += 10; + } + + if ( (!empty($Worker->users->surname2)) && (!empty($Worker->old_year)) && ($Worker->job_titles->count() > 0) && @@ -44,18 +50,16 @@ class Tools (!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; + $persent += 40; } if ($Worker->sertificate->count() > 0) { $persent += 10; } - if ($Worker->infobloks->count() > 0) { + if ($Worker->infobloks->where(fn($ib) => $ib->pivot->status === 1)->count() > 0) { $persent += 10; } diff --git a/resources/views/education/index.blade.php b/resources/views/education/index.blade.php index 8d38039..3f94bde 100644 --- a/resources/views/education/index.blade.php +++ b/resources/views/education/index.blade.php @@ -76,7 +76,7 @@