@extends('layouts.main') @section('title', 'Dashboard Andalan') @section('css') @php $dashboardCssPath = public_path('assets/css/dashboard.css'); $dashboardCssVersion = file_exists($dashboardCssPath) ? filemtime($dashboardCssPath) : time(); @endphp @endsection @section('navbarTitle', 'Attendances') @section('content') @php $overtimeSummary = $overtimeSummary ?? []; $overtimeStatusFilterValue = $overtimeStatusFilter ?? 'all'; $overtimeTimeframeFilterValue = $overtimeTimeframeFilter ?? 'year_to_date'; $activeOvertimeFilterCount = (int) ($overtimeStatusFilterValue !== 'all') + (int) ($overtimeTimeframeFilterValue !== 'year_to_date'); $overtimeSummaryCards = [ [ 'label' => 'Total Logged Hours ('.($overtimeSummary['current_month_label'] ?? now('Asia/Jakarta')->format('M')).')', 'value' => $overtimeSummary['total_logged_hours_label'] ?? '0 Hours', 'avatar_class' => 'avatar-info', 'icon_color' => '#a02cfa', 'progress_class' => 'bg-info', 'effect_class' => 'bg-secondary', 'progress' => $overtimeSummary['overtime_cap_progress'] ?? 0, 'icon' => 'fa-solid fa-clock', ], [ 'label' => 'Overtime Cap (40 Hours)', 'value' => $overtimeSummary['overtime_cap_label'] ?? '0 H (0%)', 'avatar_class' => 'avatar-success', 'icon_color' => '#27bc48', 'progress_class' => 'bg-success', 'effect_class' => 'bg-success', 'progress' => $overtimeSummary['overtime_cap_progress'] ?? 0, 'icon' => 'fa-solid fa-gauge-high', ], [ 'label' => 'Average Extra Hours', 'value' => $overtimeSummary['average_extra_hours_label'] ?? '0 H / Week', 'avatar_class' => 'avatar-danger', 'icon_color' => '#ff3282', 'progress_class' => 'bg-danger', 'effect_class' => 'bg-danger', 'progress' => 10, 'icon' => 'fa-solid fa-chart-line', ], [ 'label' => 'Tasks Finalized', 'value' => $overtimeSummary['tasks_finalized_label'] ?? '0 Tasks', 'avatar_class' => 'avatar-secondary', 'icon_color' => '#a02cfa', 'progress_class' => 'bg-secondary', 'effect_class' => 'bg-secondary', 'progress' => 10, 'icon' => 'fa-solid fa-list-check', ], [ 'label' => 'Pending SPV Approval', 'value' => $overtimeSummary['pending_spv_approval_hours_label'] ?? '0 Hours', 'avatar_class' => 'avatar-info', 'icon_color' => '#a02cfa', 'progress_class' => 'bg-info', 'effect_class' => 'bg-secondary', 'progress' => $overtimeSummary['pending_spv_approval_hours_progress'] ?? 0, 'icon' => 'fa-solid fa-user-clock', 'sr_label' => ($overtimeSummary['pending_spv_approval_hours_progress'] ?? 0).'% Pending SPV Approval', ], [ 'label' => 'Completed & Locked', 'value' => $overtimeSummary['completed_locked_hours_label'] ?? '0 Hours', 'avatar_class' => 'avatar-success', 'icon_color' => '#27bc48', 'progress_class' => 'bg-success', 'effect_class' => 'bg-success', 'progress' => $overtimeSummary['completed_locked_progress'] ?? 0, 'icon' => 'fa-solid fa-lock', ], [ 'label' => 'Estimated Extra Earnings', 'value' => $overtimeSummary['estimated_extra_earnings_label'] ?? 'Rp 0', 'avatar_class' => 'avatar-danger', 'icon_color' => '#ff3282', 'progress_class' => 'bg-danger', 'effect_class' => 'bg-danger', 'progress' => 10, 'icon' => 'fa-solid fa-coins', ], [ 'label' => 'Disputed Hours', 'value' => $overtimeSummary['disputed_hours_label'] ?? '0 Hours', 'avatar_class' => 'avatar-secondary', 'icon_color' => '#a02cfa', 'progress_class' => 'bg-secondary', 'effect_class' => 'bg-secondary', 'progress' => 10, 'icon' => 'fa-solid fa-triangle-exclamation', ], ]; @endphp @include('layouts.breadcrumb', [ 'title' => 'Attendances', 'current' => 'Overtime', 'homeRoute' => 'dashboard', ]) @include('staff_attendance.layouts.profile-index')
@foreach ($overtimeSummaryCards as $summaryCard)

{{ $summaryCard['label'] }}

{{ $summaryCard['value'] }}
{{ $summaryCard['sr_label'] ?? $summaryCard['progress'].'% Complete' }}
@endforeach
Overtime List
@forelse (($overtimeList ?? collect()) as $overtimeItem) @php $overtimeItemDateLabel = $overtimeItem['overtime_date'] ?? '-'; $overtimeItemTimeRange = $overtimeItem['time_range'] ?? '-'; $overtimeItemDuration = $overtimeItem['duration'] ?? '-'; $overtimeItemDateTimeLabel = $overtimeItemDateLabel; if ($overtimeItemTimeRange !== '-' || $overtimeItemDuration !== '-') { $overtimeItemDateTimeLabel .= ', '.$overtimeItemTimeRange.' ('.$overtimeItemDuration.')'; } @endphp
O
{{ $overtimeItem['reference'] ?? '#OVT' }}
{{ $overtimeItemDateTimeLabel }}

{{ $overtimeItem['instruction'] ?? '-' }}

{{ $overtimeItem['progress_label'] ?? 'Complete' }} {{ $overtimeItem['progress_percent'] ?? 0 }}%
@empty
No overtime records found

Data overtime belum tersedia untuk filter saat ini.

@endforelse
@endsection @section('script') @php $dashboardJsPath = public_path('assets/js/dashboard.js'); $dashboardJsVersion = file_exists($dashboardJsPath) ? filemtime($dashboardJsPath) : time(); @endphp @endsection