/
home
/
sjslayjy
/
public_html
/
mosaram
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title', 'Attendance List'); ?> <?php $__env->startSection('style'); ?> <?php echo e(Html::style('assets/css/bootstrap-datepicker3.min.css')); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <li> <i class="ace-icon fa fa-home home-icon"></i> <a href="#"><?php echo e(__('messages.Home')); ?></a> </li> <li class="active">Attendance</li> </ul> </div> <div class="page-content"> <div class="row"> <form action="<?php echo e(url('attendance-report')); ?>" method="POST"> <?php echo e(csrf_field()); ?> <div class="col-sm-4"> <label style="font-size:17px; font-weight: 500;">User</label> <select name="user_id" class="form-control select2"> <option value="">select user</option> <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value='<?php echo e($user->id); ?>' <?php if(isset($userId)): ?><?php echo e(($user->id==$userId)?'selected':''); ?> <?php endif; ?> ><?php echo e($user->name); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="col-sm-4"> <label style="font-size:17px;font-weight: 500;">To Date</label> <input type="date" class="form-control date-picker fromDates" id="attendance_date" name="attendance_date" value="<?php echo date('Y-m-d');?>"> </div> <div class="col-sm-4" style="padding-top:33px;"> <input type="submit" value="Submit" id="btn" class="btn btn-primary" style="border-radius: 7px;padding: 8px 30px;font-weight: 500;"> <a href="<?php echo e(url('attendance-report')); ?>" class="btn btn btn-outline-primary" style="border-radius: 7px;padding: 8px 30px;font-weight: 500;">Clear</a> </div> </form> </div> </div> <div class="page-content"> <div class="pull-right tableTools-container"></div> <h3 class="header smaller lighter blue">Attendance</h3> <div class="table-header"><span class="badge badge-success"> </div> <div class="table-responsive"> <div class="dataTables_borderWrap"> <table id="dynamic-table" class="table table-striped table-bordered table-hover"> <thead> <tr> <th>S.N.</th> <th>Name</th> <th>App.Version</th> <th>Date</th> <th>First Time In</th> <th>Last Time Out</th> <th>Total Stay Time</th> <th>Attendance</th> <th>Attendance Location</th> <th>Total In Out</th> </tr> </thead> <tbody> <?php $i=1; ?> <?php if(isset($userAndDateWiseReports)): ?> <?php $__currentLoopData = $userAndDateWiseReports; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $userAndDateWiseReport): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($i); ?></td> <td><?php echo e(getModelById('User',$userAndDateWiseReport->user_id)->name); ?></td> <td><?php echo e(getModelById('User',$userAndDateWiseReport->user_id)->version); ?></td> <td><?php echo e(date('d-M-Y',strtotime($userAndDateWiseReport->in_time))); ?></td> <td><?php echo e(date('d-M-Y h:i:s A',strtotime($userAndDateWiseReport->in_time))); ?></td> <td><?php if(!is_null($userAndDateWiseReports1)): ?><?php echo e(date('d-M-Y h:i:s A',strtotime($userAndDateWiseReports1->out_time))); ?> <?php endif; ?></td> <td><?php if(!is_null($total_time)): ?> <?php echo e($total_time); ?> <?php else: ?> No out time available. <?php endif; ?></td> <td><?php echo e($userAndDateWiseReport->attendance_status); ?></td> <td><?php $attend = $attendanceReport->location_id; $location = \DB::table('addlocation')->where('id',$attend)->first(); echo $location->name ?></td> <td><button class="btn btn-info" onclick="getInOut(<?php echo e($userAndDateWiseReport->user_id); ?>, <?php echo e(strtotime($userAndDateWiseReport->created_at)); ?>)">view</button></td> </tr> <?php $i++; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <?php $__currentLoopData = $attendanceReports; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$attendanceReport): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($i); ?></td> <td><?php echo e(getModelById('User',$attendanceReport->user_id)->name); ?></td> <td><?php echo e(getModelById('User',$attendanceReport->user_id)->version); ?></td> <td><?php echo e(date('d-M-Y',strtotime($attendanceReport->in_time))); ?></td> <td><?php echo e(date('d-M-Y h:i:s A',strtotime($attendanceReport->in_time))); ?></td> <td><?php if(!is_null($attendanceReports1[$key]->outTime)): ?> <?php echo e(date('d-M-Y h:i:s A',strtotime($attendanceReports1[$key]->outTime))); ?> <?php endif; ?></td> <td><?php if($totalTimes[$key]!='00:00:00'): ?> <?php echo e($totalTimes[$key]); ?> <?php endif; ?></td> <td><?php echo e($attendanceReport->attendance_status); ?></td> <td><?php $attend = $attendanceReport->location_id; $location = \DB::table('addlocation')->where('id',$attend)->first(); echo $location->name ?></td> <td><button class="btn btn-info" onclick="getInOut(<?php echo e($attendanceReport->user_id); ?>, <?php echo e(strtotime($attendanceReport->created_at)); ?>)">view</button></td> </tr> <?php $i++; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div><!-- /.page-content --> </div> </div> </div><!-- /.main-content --> <div class="modal fade" id="inOutTimeModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true" style="padding: 0% 17% 0% 17%;"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">In Out Time Details</h5> </div> <div class="modal-body" id="inOutTimeModalContent"> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!--status update--> <!-- <div class="modal fade" id="editItemModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Update Status</h4> </div> <div class="modal-body" id="EditBodyItem"> </div> </div> </div> </div> --> <?php $__env->startSection('script'); ?> <?php echo e(Html::script('assets/js/jquery.dataTables.min.js')); ?> <?php echo e(Html::script('assets/js/jquery.dataTables.bootstrap.min.js')); ?> <?php echo e(Html::script('assets/js/dataTables.buttons.min.js')); ?> <?php echo e(Html::script('assets/js/buttons.flash.min.js')); ?> <?php echo e(Html::script('assets/js/buttons.html5.min.js')); ?> <?php echo e(Html::script('assets/js/buttons.print.min.js')); ?> <?php echo e(Html::script('assets/js/buttons.colVis.min.js')); ?> <?php echo e(Html::script('assets/js/dataTables.select.min.js')); ?> <?php echo e(Html::script('assets/js/ace-elements.min.js')); ?> <?php echo e(Html::script('assets/js/ace.min.js')); ?> <?php echo e(Html::script('assets/js/bootstrap-datepicker.min.js')); ?> <script type="text/javascript"> jQuery(function($) { //initiate dataTables plugin var myTable = $('#dynamic-table').DataTable({ bAutoWidth: false, "aaSorting": [], }); $.fn.dataTable.Buttons.defaults.dom.container.className = 'dt-buttons btn-overlap btn-group btn-overlap'; new $.fn.dataTable.Buttons(myTable, { buttons: [{ "extend": "colvis", "text": "<i class='fa fa-search bigger-110 blue'></i> <span class='hidden'>Show/hide columns</span>", "className": "btn btn-white btn-primary btn-bold", columns: ':not(:first):not(:last)' }, { "extend": "copy", "text": "<i class='fa fa-copy bigger-110 pink'></i> <span class='hidden'>Copy to clipboard</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "csv", "text": "<i class='fa fa-database bigger-110 orange'></i> <span class='hidden'>Export to CSV</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "excel", "text": "<i class='fa fa-file-excel-o bigger-110 green'></i> <span class='hidden'>Export to Excel</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "pdf", "text": "<i class='fa fa-file-pdf-o bigger-110 red'></i> <span class='hidden'>Export to PDF</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "print", "text": "<i class='fa fa-print bigger-110 grey'></i> <span class='hidden'>Print</span>", "className": "btn btn-white btn-primary btn-bold", autoPrint: false, message: 'This print was produced using the Print button for DataTables' } ] }); myTable.buttons().container().appendTo($('.tableTools-container')); //style the message box var defaultCopyAction = myTable.button(1).action(); myTable.button(1).action(function(e, dt, button, config) { defaultCopyAction(e, dt, button, config); $('.dt-button-info').addClass('gritter-item-wrapper gritter-info gritter-center white'); }); var defaultColvisAction = myTable.button(0).action(); myTable.button(0).action(function(e, dt, button, config) { defaultColvisAction(e, dt, button, config); if ($('.dt-button-collection > .dropdown-menu').length == 0) { $('.dt-button-collection') .wrapInner( '<ul class="dropdown-menu dropdown-light dropdown-caret dropdown-caret" />') .find('a').attr('href', '#').wrap("<li />") } $('.dt-button-collection').appendTo('.tableTools-container .dt-buttons') }); }); function getInOut(userId,createdDate){ var createdD = new Date(createdDate * 1000); var dateC = createdD.toUTCString(); $.ajax({ type:'get', url:'/in-out-time-by-date/'+userId+'/'+dateC, success: function(response){ console.log(response); $('#inOutTimeModalContent').html(response); $('#inOutTimeModal').modal('toggle'); } }); } </script> <?php $__env->stopSection(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('dashboard.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home3/pmmsanvp/public_html/sarojMain/resources/views/attendance-report.blade.php ENDPATH**/ ?>