<?php

namespace Modules\HR\Policies;

use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Modules\HR\Models\OvertimeEntry;

class OvertimeEntryPolicy
{
    use HandlesAuthorization;

    public function viewAny(User $user): bool
    {
        return $user->can('hr.setting.manage')
            || $user->can('hr.overtime-entry.approved');
    }

    public function approved(User $user, OvertimeEntry $salaryRevision): bool
    {
        return $user->can('hr.overtime-entry.approved');
    }
}
