ishubham

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Leave Policies #6711
    ishubham
    Participant

    @Shawon That’s great. Will look into your way of doing it once the update is released.:)

    in 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

    in reply to: Leave Policies #6658
    ishubham
    Participant

    Hi,

    Sorry to add to this thread, but my problem is similar to him.
    I have created a Maternity Leave policy for only female employees.
    But it is seen under male employees’ job section too.
    Male employees can’t avail those, but still it’s visible in their leave tab.

Viewing 3 posts - 1 through 3 (of 3 total)

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 query

We will reply to you very soon :)