@extends('dashboard.layouts.app') @section('content')
Authentication Events
{{--
--}} {{-- --}} {{--
--}}
@if (isHumanResource()) @else
{{ auth()->user()?->staff?->staff_no }} - {{ auth()->user()?->full_name ?? (auth()->user()?->staff?->first_name . ' ' . auth()->user()?->staff?->last_name) }}
@endif
@php $idleTimes = [ 10 => '10 minutes', 20 => '20 minutes', 30 => '30 minutes', 60 => '1 hour', 120 => '2 hours', ]; @endphp
{{-- Submit --}}
@if(request()->hasAny(['type', 'staff_id', 'from_date', 'to_date'])) @endif
@include('components.alert')
{{-- --}} @forelse($events as $event) {{-- --}} @php $date = \Carbon\Carbon::parse($event->created_at); $dayName = $date->format('l'); // Thursday, Sunday, ... @endphp @empty @endforelse
# Event TypeUserIdle Time Created at Date & Time (Weekend Marks)
{{ $loop->iteration }} @if($event->event_type == 'login') Login @else Logout @endif {{ $event->user?->full_name ?? 'N/A' }} {{ $event->idle_seconds ? floor($event->idle_seconds / 60) . ' mins' : '--' }} {{\Carbon\Carbon::parse( $event->created_at)->diffForHumans() . ' -- ' . \Carbon\Carbon::parse($event->created_at)->format('l H:i:s') }} {{ $date->diffForHumans() }} -- {{ $date->format('l H:i:s') }} @if ($dayName === 'Thursday') Weekend Start @elseif ($dayName === 'Sunday') Weekend End @endif
No events found
{{ $events->appends(request()->except('page'))->links('pagination::bootstrap-5') }}
@endsection @push('scripts') @endpush