<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"><?php print CommonLanguage::getMessage('emp_opening'); ?></div>
            <?php if ($permissions->hasPermission('add_emp_opening')) { ?>
            <div class="col-xs-12 p-0 m-b-10">  
                <div class="floatingContainer ">
                    <a href="" id="new_emp_opening" data-target="#add-edit-emp-opening-modal" data-toggle="modal" >
                        <div class="actionButton bg-success text-white" >
                            <p class="floatingText"><span class="floatingTextBG"><?php echo CommonLanguage::getMessage('add_emp_opening') ?></span></p>
                        </div>
                    </a>
                </div>
            </div>
            <?php } ?>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-12">
                    <div class="table-responsive">
                        <table class="table table-bordered hrm" id="tableWithSearch">
                            <thead>
                                <tr>
                                    <th><?php print CommonLanguage::getMessage('employee') ?></th>
                                    <th><?php print CommonLanguage::getMessage('Date') ?></th>
                                    <th><?php print CommonLanguage::getMessage('total_salary') ?></th>
                                    <th><?php print CommonLanguage::getMessage('total_allowance') ?></th>
                                    <th><?php print CommonLanguage::getMessage('total_tax') ?></th>
                                    <th><?php print CommonLanguage::getMessage('Action') ?></th>
                                </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function(){
        RebuildDataTable($('.panel-heading .panel-title').html(), [0,1,2], 'HRMAjax/getEmployeeOpening');
        $('#tableWithSearch').on('click', '.delete_emp_opening', function () {
            var entry_value = $(this).attr('data-id')
            IncludeDeleteModal(common_delete_modal, {entry_id: entry_value}, function () {
                RebuildDataTable($('.panel-heading .panel-title').html(), [0,1,2], 'HRMAjax/getEmployeeOpening');
            }, "HRMAjax/deleteEmpOpening");
        });
    });
</script>
<?php
    include 'Views/HRM/add_edit_emp_opening_modal.php';