🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:e7230f9d9f11d29f5f2e9bf80bde5127.php
<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?> <?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> <?php $component->withName('app-layout'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?> <?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php $__env->slot('header', null, []); ?> <div class="flex items-center justify-between"> <h2 class="text-xl font-semibold leading-tight text-white"> <?php echo e(__('Attendance Overview')); ?> </h2> <span class="inline-flex items-center rounded-full bg-white/10 px-3 py-1 text-sm font-medium text-white"> <?php echo e(\Carbon\Carbon::parse($date)->format('l, F j, Y')); ?> </span> </div> <?php $__env->endSlot(); ?> <div class="py-8"> <div class="mx-auto max-w-7xl sm:px-6 lg:px-8 space-y-6"> <?php if(session('success')): ?> <div class="rounded-lg border border-green-200 bg-green-50 p-4"> <div class="flex items-center"> <svg class="h-5 w-5 text-green-500 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg> <p class="text-sm font-medium text-green-800"><?php echo e(session('success')); ?></p> </div> </div> <?php endif; ?> <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="px-6 py-4"> <form action="<?php echo e(route('admin.attendance')); ?>" method="GET" class="flex flex-col gap-4 sm:flex-row sm:items-end"> <div class="flex-1 max-w-xs"> <label for="date" class="block text-sm font-medium text-navy mb-1.5">Select Date</label> <input type="date" name="date" id="date" value="<?php echo e($date); ?>" class="block w-full rounded-lg border-gray-300 shadow-sm transition focus:border-orange focus:ring-orange sm:text-sm"> </div> <div> <button type="submit" class="inline-flex items-center gap-2 rounded-lg bg-navy px-5 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-navy-dark focus:outline-none focus:ring-2 focus:ring-orange focus:ring-offset-2"> <svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"/></svg> Filter </button> </div> <div class="sm:ml-2"> <a href="<?php echo e(route('admin.attendance', ['date' => now()->format('Y-m-d')])); ?>" class="inline-flex items-center gap-2 rounded-lg bg-gray-100 px-5 py-2.5 text-sm font-medium text-gray-700 transition hover:bg-gray-200"> Today </a> </div> </form> </div> </div> <div class="grid grid-cols-1 gap-5 sm:grid-cols-3"> <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5 p-5"> <div class="flex items-center"> <div class="flex-shrink-0 rounded-lg bg-navy p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Total Records</p> <p class="text-2xl font-bold text-navy"><?php echo e($records->count()); ?></p> </div> </div> </div> <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5 p-5"> <div class="flex items-center"> <div class="flex-shrink-0 rounded-lg bg-green-600 p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Clocked Out</p> <p class="text-2xl font-bold text-green-700"><?php echo e($records->whereNotNull('clock_out')->count()); ?></p> </div> </div> </div> <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5 p-5"> <div class="flex items-center"> <div class="flex-shrink-0 rounded-lg bg-orange p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Still Working</p> <p class="text-2xl font-bold text-orange"><?php echo e($records->whereNull('clock_out')->count()); ?></p> </div> </div> </div> </div> <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="border-b border-gray-100 bg-gray-50/50 px-6 py-4"> <h3 class="text-base font-semibold text-navy"> Attendance for <?php echo e(\Carbon\Carbon::parse($date)->format('F j, Y')); ?> </h3> </div> <div class="overflow-x-auto"> <?php if($records->count() > 0): ?> <table class="min-w-full divide-y divide-gray-200"> <thead> <tr class="bg-gray-50"> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">#</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Employee</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Clock In</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Clock Out</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Total Hours</th> </tr> </thead> <tbody class="divide-y divide-gray-100 bg-white"> <?php $__currentLoopData = $records; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $record): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr class="transition hover:bg-gray-50/50"> <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-400"> <?php echo e($index + 1); ?> </td> <td class="whitespace-nowrap px-6 py-4"> <div class="flex items-center"> <div class="flex h-9 w-9 items-center justify-center rounded-full bg-navy text-sm font-semibold text-white"> <?php echo e(strtoupper(substr($record->user->name ?? '?', 0, 1))); ?> </div> <div class="ml-3"> <p class="text-sm font-medium text-navy"><?php echo e($record->user->name ?? 'Unknown'); ?></p> <p class="text-xs text-gray-400"><?php echo e($record->user->email ?? ''); ?></p> </div> </div> </td> <td class="whitespace-nowrap px-6 py-4"> <span class="inline-flex items-center gap-1 text-sm text-gray-700"> <svg class="h-4 w-4 text-green-500" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"/></svg> <?php echo e($record->clock_in ? \Carbon\Carbon::parse($record->clock_in)->format('h:i A') : '—'); ?> </span> </td> <td class="whitespace-nowrap px-6 py-4"> <?php if($record->clock_out): ?> <span class="inline-flex items-center gap-1 text-sm text-gray-700"> <svg class="h-4 w-4 text-red-500" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75"/></svg> <?php echo e(\Carbon\Carbon::parse($record->clock_out)->format('h:i A')); ?> </span> <?php else: ?> <span class="inline-flex items-center rounded-full bg-orange-light/20 px-2.5 py-0.5 text-xs font-semibold text-orange"> <svg class="mr-1 h-3 w-3 animate-pulse" fill="currentColor" viewBox="0 0 8 8"><circle cx="4" cy="4" r="3"/></svg> Working </span> <?php endif; ?> </td> <td class="whitespace-nowrap px-6 py-4"> <?php if($record->total_hours): ?> <span class="inline-flex items-center rounded-full bg-navy/5 px-2.5 py-0.5 text-sm font-semibold text-navy"> <?php echo e(number_format($record->total_hours, 2)); ?> hrs </span> <?php elseif($record->clock_in && !$record->clock_out): ?> <?php $elapsed = \Carbon\Carbon::parse($record->clock_in)->diffInMinutes(now()) / 60; ?> <span class="inline-flex items-center rounded-full bg-orange-light/20 px-2.5 py-0.5 text-sm font-medium text-orange"> ~<?php echo e(number_format($elapsed, 1)); ?> hrs </span> <?php else: ?> <span class="text-sm text-gray-400">—</span> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> <?php else: ?> <div class="flex flex-col items-center justify-center py-16 text-center"> <svg class="h-16 w-16 text-gray-300 mb-4" fill="none" stroke="currentColor" stroke-width="1" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"/></svg> <h3 class="text-sm font-semibold text-gray-900 mb-1">No attendance records</h3> <p class="text-sm text-gray-500">No one has clocked in for <?php echo e(\Carbon\Carbon::parse($date)->format('F j, Y')); ?>.</p> </div> <?php endif; ?> </div> </div> </div> </div> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?> <?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?> <?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?> <?php endif; ?> <?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?> <?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?> <?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?> <?php endif; ?> <?php /**PATH /home/websparkit/public_html/clint.websparkit.com/laravel/resources/views/admin/attendance.blade.php ENDPATH**/ ?>
Save Changes
Cancel
Create New File
Create New Folder