HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/hrms-production/storage/framework/views/cfd3beb9bf229e33d6068e85287c22848d45e741.php
<?php $__env->startSection('content'); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2 justify-content-between">
                <div class="col-sm-6">
                    <h1 id="page-title">Seniority List</h1>
                </div>
                <div class="col-sm-4">
                    <div class="form-group mb-2">
                        <label class="mb-0" for="Designation Name">Select Designation</label>
                        <select class="form-control form-control-sm select2" aria-hidden="true" name="DesignationNameId"
                            id="DesignationNameId" data-placeholder="Select Designation">
                            <option value="" disabled selected>Select Designation</option>
                        </select>
                    </div>
                </div>


            </div>
        </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">
            
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <!-- /.card-header -->
                        <div class="card-body">
                            <table id="emplaoyeeTable" class="table table-bordered table-striped table-sm">
                                <thead>
                                    <tr>
                                        <th>S.No.</th>
                                        <th>Emp Name</th>
                                        <th>D.O.B.</th>
                                        <th>Qualification</th>
                                        <th>Pervious Post</th>
                                        <th>Joining date of current post</th>
                                        <th>Nomination / Promotion</th>
                                        <th>Employee Category</th>
                                        <th>Appointment Category</th>
                                        <th>Retirement Date</th>
                                        <th>Remarks</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    
                                </tbody>
                            </table>
                        </div>
                        <!-- /.card-body -->
                    </div>
                    <!-- /.card -->
                    </form>
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->

        </div>
        <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
</div>


<script>
    // $(function() {
    //         $("#emplaoyeeTable").DataTable({
    //             "responsive": true,
    //             "lengthChange": true,
    //             "autoWidth": false,
    //             "lengthMenu": [10, 20, 50, 100, 250, 500],
    //             "buttons": ["csv", "excel", "pdf", "print"]
    //         }).buttons().container().appendTo('#emplaoyeeTable_wrapper .col-md-6:eq(0)');
    //     });
</script>


<script>
    $(document).ready(function() {
          $.ajax({
            type: "GET",
            url: "<?php echo e(url('/designation-list')); ?>",
            dataType: "json",
            success: function(response) {
              var json = response.Designation;
              $.each(json, function(i, designation) {
                $("#DesignationNameId").append("<option value='" + designation.DesignationId + "'>" + designation.DesignationName + "</option>");
                $('#DesignationNameId').trigger('change');
              });
            }
          });
    }); 

    $(document).ready(function() {
        var nodata = '<tr class="odd"><td valign="top" colspan="12" class="text-center">No data available in table, please select designation.</td></tr>';
            $('#emplaoyeeTable').find('tbody').html('#' +nodata);
    });
    // Get Selected Designation Id
    $('#DesignationNameId').on('select2:select', function (e) {
            //alert(e.params.data);
            var data = e.params.data;
            var DesignationId = data.id;
            //alert(DesignationId);
        if (DesignationId == null) {
            var nodata = '<tr class="odd"><td valign="top" colspan="8" class="text-center">No data available in table</td></tr>';
            $('#emplaoyeeTable').find('tbody').html('#' +nodata);
           return false;
        } else {
            $("#emplaoyeeTable tbody").empty();
            $('#emplaoyeeTable').dataTable().fnClearTable();
            $('#emplaoyeeTable').dataTable().fnDestroy();
                $.ajax({
                type: "POST",
                url: "<?php echo e(url('/')); ?>/get-seniority-list",
                dataType: 'json',
                data: {
                    DesignationId: DesignationId,
                    _token: "<?php echo e(csrf_token()); ?>",
                },
                success: function (response) {
                        $('#emplaoyeeTable').find('tbody').append(response.output);
                        
                        $("#emplaoyeeTable").DataTable({
                        "responsive": true,
                        "ordering": false,
                        "buttons": ["csv", "excel", "pdf", "print"]
                        }).buttons().container().appendTo('#emplaoyeeTable_wrapper .col-md-6:eq(0)');
                }
            });
        }
            
    });
</script>
<!-- /.content-wrapper -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.include.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/hrms/resources/views/admin/Reports/employee-seniority-list.blade.php ENDPATH**/ ?>