Orange HRM 3.1 leave list customization

2019-08-04 00:25发布

问题:

In orangehrm3.1 I want to customize view leave request page. If leave request day is greater than 3 I need to hide Actions list box for supervisor. How do I do this?

Currently editing in LeaveListConfigurationFactory.php

$leaveRequestService = new LeaveRequestService();
$header7->populateFromArray(array(
    'name' => 'Actions',
    'width' => '10%',
    'isSortable' => false,
    'isExportable' => false,
    'elementType' => 'leaveListAction',
    'textAlignmentStyle' => 'left',
    'elementProperty' => array(
        'classPattern' => 'select_action quotaSelect',
        'defaultOption' => array('label' => 'Select Action', 'value' => ''),
        'hideIfEmpty' => true,
        'options' => array($leaveRequestService, 'getLeaveRequestActions', array(self::RECORD, self::$loggedInEmpNumber)),
        'namePattern' => 'select_leave_action_{id}',
        'idPattern' => 'select_leave_action_{id}',
        'hasHiddenField' => true,
        'hiddenFieldName' => '{eimId}-{leaveTypeId}',
        'hiddenFieldId' => '{eimId}-{leaveTypeId}',
        'hiddenFieldValueGetter' => 'getNumberOfDays',
        'hiddenFieldClass' => 'quotaHolder',
        'placeholderGetters' => array(
            'id' => 'getId',
            'eimId' => 'getEmpNumber',
            'leaveTypeId' => 'getLeaveTypeId'
        ),
    ),
));