/
home
/
sjslayjy
/
public_html
/
mosaram
/
resources
/
views
/
Upload File
HOME
<?php use App\Http\Controllers\addlocationController; ?> @extends('master') @section('content') @stack('plugin-styles') </head> <body> <style type="text/css"> .label{ font-size: 10px; } #btn{ font-size:12px; } </style> <div class="container content-box pad25A" style="page-break-after: always;"> <div class="col-lg-12 grid-margin"> <div class="card" style="box-shadow: rgb(60 64 67 / 30%) 0px 1px 2px 0px, rgb(60 64 67 / 15%) 0px 2px 6px 2px;border-radius: 5px;"> <div class="card-body"> <div class="row"> <div class="col-lg-12"> <form action="{{url('attendance-report')}}" method="post"> {{ csrf_field() }} <div class="row"> <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> @foreach($users as $user) <option value='{{ $user->id }}'>{{ $user->name }} </option> @endforeach </select> @error('user_id') <span class="text-danger">{{ $message }}</span> @enderror </div> <div class="col-sm-4"> <label style="font-size:17px;font-weight: 500;">Date</label> <input type="date" class="form-control date-picker fromDates" id="attendance_date" name="attendance_date" value="<?php echo date('Y-m-d');?>"> @error('attendance_date') <span class="text-danger">{{ $message }}</span> @enderror </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;"> </div> </div> </form> </div> </div> </div> </div> </div> <div class="col-lg-12 grid-margin"> <div class="card" style="box-shadow: rgb(60 64 67 / 30%) 0px 1px 2px 0px, rgb(60 64 67 / 15%) 0px 2px 6px 2px;border-radius: 5px;"> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered myTable" id="dynamic-table"> <thead> <tr> <th>S.N.</th> <th>Name</th> <th>Time In</th> <th>Time Out</th> <th>Stay Time</th> <th>Attendance</th> </tr> </thead> <tbody> @php $i=1; @endphp @if(isset($userAndDateWiseReports)) @foreach($userAndDateWiseReports as $userAndDateWiseReport) <tr> <td>{{$i}}</td> <td>{{ getModelById('User',$userAndDateWiseReport->user_id)->name }}</td> <td>{{ date('d-M-Y h:i:s A',strtotime($userAndDateWiseReport->in_time))}}</td> <td>@if(!is_null($userAndDateWiseReport->out_time)) {{ date('d-M-Y h:i:s A',strtotime($userAndDateWiseReport->out_time)) }} @endif</td> <td>{{ $userAndDateWiseReport->hours_stay }}</td> <td>{{ $userAndDateWiseReport->type }}</td> </tr> @php $i++; @endphp @endforeach @else @foreach($attendanceReports as $attendanceReport) <tr> <td>{{$i}}</td> <td>{{ $attendanceReport->name }}</td> <td>{{ date('d-M-Y h:i:s A',strtotime($attendanceReport->in_time))}}</td> <td>@if(!is_null($attendanceReport->out_time)) {{ date('d-M-Y h:i:s A',strtotime($attendanceReport->out_time)) }} @endif</td> <td>{{ $attendanceReport->hours_stay }}</td> <td>{{ $attendanceReport->type }}</td> </tr> @php $i++; @endphp @endforeach @endif </tbody> </table> </div> </div> </div> </div> </div> <script type="text/javascript"> $(document).ready(function(){ }); </script> @endsection