officelifehq / officelife

OfficeLife is the first EmpOps platform. It manages everything employees do in a company. From projects to holidays to 1:1s to teams.
https://officelife.io
GNU Affero General Public License v3.0
889 stars 117 forks source link

employee modal - 500 error #1474

Open AiFxApp opened 2 years ago

AiFxApp commented 2 years ago

Cant view employee modal - 500 error

When clicking in an employees to view or possibly add details i get this: image

AiFxApp commented 2 years ago

App\Helpers\HolidayHelper::getNumberOfDaysLeftToEarn(): Argument #1 ($ptoPolicy) must be of type App\Models\Company\CompanyPTOPolicy, null given,

C:\officelife-main\app\Helpers\HolidayHelper .php   : 34


     */

    public static function getHolidaysEarnedEachMonth(Employee $employee): float

    {

        return $employee->amount_of_allowed_holidays / 12;

    }

    /**

     * Return the number of days that an employee will earn as holidays from

     * today til the end of the year.

     *

     * @param CompanyPTOPolicy $ptoPolicy

     * @param Employee $employee

     *

     * @return float

     */

   LINE 34>>  public static function getNumberOfDaysLeftToEarn(CompanyPTOPolicy $ptoPolicy, Employee $employee): float

    {```