Reply To: Leave Policies

Front Page Forums HRM Leave Policies Reply To: Leave Policies

#6660
ishubham
Participant

Hi,

I solved the problem by editing tab-leave.php in \modules\hrm\views\employee
After definition of array of policies, I put this code: (on line 4)
Code is very sloppy I think, but it will get the job done!
Please let me know if there’s improved way of achieving this.

if($employee->gender == 'male') {
$policies = array_filter(
$policies,
function($pol) {
return $pol->gender == 'male' || $pol->gender == -1;
}
);
} else if($employee->gender == 'female') {
$policies = array_filter(
$policies,
function($pol) {
return $pol->gender == 'female' || $pol->gender == -1;
}
);
} else {
$policies = array_filter(
$policies,
function($pol) {
return $pol->gender == 'other' || $pol->gender == -1;
}
);
}
</code

Contact Us

Reach out to us for any inquiry

You must enter full name
You must enter email
You must enter message

We received your message

We will reach you with your email address soon. Thank you for the time!