@extends('layouts.template.main') @section('content')

Chào mừng bạn đến với Bảng điều khiển quản lý nhân sự của bạn!

Quản lý nhân viên, hợp lý hóa quy trình làm việc và tối ưu hóa hoạt động nhân sự một cách dễ dàng bằng các công cụ và tài nguyên mạnh mẽ của chúng tôi.

{{--
--}} {{-- --}} {{--
--}}
{{-- -------------------- Announcements -------------------- --}}
Quy định
@foreach ($notices as $announcement)
{{ $announcement->created_at->diffForHumans() }}
{{ $announcement->title }} - {{ \Illuminate\Support\Str::limit($announcement->description, 200, '...') }}
@endforeach
📊 Vi phạm @if ($viewMode === 'year') năm {{ $currentYear }} @else tháng {{ $currentMonth }}/{{ $currentYear }} @endif
@if ($viewMode === 'month') @endif
@forelse ($employeeStats as $stat) @empty @endforelse
Nhân viên Nghỉ phép Đi muộn/về sớm Tổng vi phạm
{{ $stat['name'] }} @if ($stat['leave'] > 0) {{ $stat['leave'] }} ngày @else @endif @if ($stat['late'] > 0 || $stat['early_leave'] > 0) {{ $stat['late'] + $stat['early_leave'] }} lần @else @endif @php $total = $stat['leave'] + $stat['late'] + $stat['early_leave']; @endphp @if ($total >= 5) {{ $total }} @elseif($total >= 3) {{ $total }} @else {{ $total }} @endif
Không có dữ liệu vi phạm đã duyệt trong tháng này
Xem tất cả chấm công hôm nay
@foreach ($attendances as $attendance) {{-- -------------------------- Natural hour to minuite convertion -------------------------- --}} {{-- -------------------------- Natural hour to minuite convertion -------------------------- --}} @if (auth()->user()->hasRole('manager') || auth()->user()->hasRole('employee')) @else @endif @endforeach
Name Ngày Giờ vào Giờ ra Trạng thái Giờ làm việc Thao tác
{{ $attendance->employee->name ?? '' }} {{ \Carbon\Carbon::parse($attendance->date)->format('d/m/Y') ?? '' }} {{ $attendance->check_in_time ? \Carbon\Carbon::parse($attendance->check_in_time)->format('h:i A') : '' }} {{ $attendance->check_out_time ? \Carbon\Carbon::parse($attendance->check_out_time)->format('h:i A') : '' }} @if ($attendance->status == 'Late') Đi muộn @elseif($attendance->status == 'EarlyLeave') Về sớm @elseif($attendance->status == 'Present') Có mặt @elseif($attendance->status == 'MissingPunch') Quên chấm công @else {{ $attendance->status }} @endif @php $hours = floor($attendance->working_hours); $minutes = round(($attendance->working_hours - $hours) * 60); $parts = []; if ($hours > 0) { $parts[] = $hours . ' ' . ($hours === 1 ? 'hr' : 'hrs'); } if ($minutes > 0) { $parts[] = $minutes . ' ' . ($minutes === 1 ? 'min' : 'mins'); } $formattedTime = count($parts) ? implode(' ', $parts) : '0 min'; @endphp {{ $formattedTime }}
@endsection @push('scripts') @endpush