@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
{{-- Filter Section --}}
Dashboard
{{-- Filter Role --}} @php $role = DB::table('users') ->where('username', Session('username')) ->value('idroles'); $isAdmin = ($role === 'admins' || $role === 'admhrd'); @endphp {{-- button add --}} @if ($isAdmin)
@endif {{-- Filter Waktu --}}
{{-- Tugas Summary --}}
Tugas Planning

{{ $tugasPlanning }}

Tugas In Progress

{{ $tugasInProgress }}

Tugas Selesai

{{ $tugasSelesai }}

Total Tugas

{{ $totalTugas }}

{{-- Diagram Pie --}}
Diagram Tugas
{{-- Data Tugas Kurir/Driver --}} {{-- Data Tugas Kurir/Driver --}} @php $role = DB::table('users') ->where('username', Session('username')) ->value('idroles'); @endphp
Data Tugas
{{-- Tabs hanya untuk admin --}} @if ($role === 'admins' || $role === 'admhrd') @endif
{{-- Kurir Tab --}} @if (($role === 'kurir' && $kurir->count() > 0) || ($role === 'admins' && $kurir->count() > 0) || ($role === 'admhrd' && $kurir->count() > 0))
@foreach ($kurir as $item) @if ($item->isactive == 1) @endif @endforeach
Nama Tanggal Status Tugas
{{ $item->nama }} {{ \Carbon\Carbon::parse($item->tanggal)->format('d-m-Y') }} @php $status = strtolower($item->status); $badgeClass = match ($status) { 'planning' => 'text-dark', 'in progress', 'complete' => 'text-white', default => 'text-white', }; $bgColor = match ($status) { 'planning' => '#ffc107', 'in progress' => '#fd7e14', 'complete' => '#28a745', default => '#6c757d', }; @endphp {{ strtoupper($item->status) }}
{{ $kurir->withQueryString()->fragment('kurir')->links('pagination::bootstrap-5') }}
@endif {{-- Driver Tab --}} @if (($role === 'driver' && $driver->count() > 0) || ($role === 'admins' || $role === 'admhrd' && $driver->count() > 0))
@foreach ($driver as $item) @if ($item->isactive == 1) @endif @endforeach
Nama Tanggal Status Tugas
{{ $item->nama }} {{ \Carbon\Carbon::parse($item->tanggal)->format('d-m-Y') }} @php $status = strtolower($item->status); $badgeClass = match ($status) { 'planning' => 'text-dark', 'in progress', 'complete' => 'text-white', default => 'text-white', }; $bgColor = match ($status) { 'planning' => '#ffc107', 'in progress' => '#fd7e14', 'complete' => '#28a745', default => '#6c757d', }; @endphp {{ strtoupper($item->status) }}
{{ $driver->withQueryString()->fragment('driver')->links('pagination::bootstrap-5') }}
@endif
@endsection @push('css') @endpush @push('js') @endpush