143 lines
7.0 KiB
PHP
143 lines
7.0 KiB
PHP
<!-- <x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
|
{{ __('Dashboard') }}
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
|
<!-- Alert Success -->
|
|
<div class="mb-4">
|
|
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert">
|
|
<span class="block sm:inline">
|
|
<i class="fas fa-check-circle me-2"></i>
|
|
Welcome back, <strong>{{ Auth::user()->name }}</strong>! You're logged in!
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Dashboard Overview Title -->
|
|
<div class="mb-6">
|
|
<h2 class="text-2xl font-bold text-gray-800">Dashboard Overview</h2>
|
|
</div>
|
|
|
|
<!-- Statistics Cards -->
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
|
|
<!-- Card 1: Total Teknisi -->
|
|
<div class="bg-blue-500 rounded-lg shadow-lg p-6 text-white">
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<p class="text-sm uppercase opacity-80 mb-1">Total Teknisi</p>
|
|
<h2 class="text-3xl font-bold">
|
|
{{ isset($totalTeknisi) ? $totalTeknisi : 0 }}
|
|
</h2>
|
|
</div>
|
|
<div>
|
|
<i class="fas fa-users text-5xl opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Card 2: Teknisi Aktif -->
|
|
<div class="bg-green-500 rounded-lg shadow-lg p-6 text-white">
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<p class="text-sm uppercase opacity-80 mb-1">Teknisi Aktif</p>
|
|
<h2 class="text-3xl font-bold">
|
|
{{ isset($teknisiAktif) ? $teknisiAktif : 0 }}
|
|
</h2>
|
|
</div>
|
|
<div>
|
|
<i class="fas fa-user-check text-5xl opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Card 3: Total Pekerjaan -->
|
|
<div class="bg-yellow-500 rounded-lg shadow-lg p-6 text-white">
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<p class="text-sm uppercase opacity-80 mb-1">Total Pekerjaan</p>
|
|
<h2 class="text-3xl font-bold">0</h2>
|
|
</div>
|
|
<div>
|
|
<i class="fas fa-briefcase text-5xl opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Card 4: Total Laporan -->
|
|
<div class="bg-cyan-500 rounded-lg shadow-lg p-6 text-white">
|
|
<div class="flex justify-between items-center">
|
|
<div>
|
|
<p class="text-sm uppercase opacity-80 mb-1">Total Laporan</p>
|
|
<h2 class="text-3xl font-bold">0</h2>
|
|
</div>
|
|
<div>
|
|
<i class="fas fa-file-alt text-5xl opacity-50"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bottom Section -->
|
|
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
|
<!-- Quick Access -->
|
|
<div class="lg:col-span-2">
|
|
<div class="bg-white rounded-lg shadow-lg overflow-hidden">
|
|
<div class="bg-blue-500 text-white px-6 py-4">
|
|
<h5 class="text-lg font-semibold">Quick Access</h5>
|
|
</div>
|
|
<div class="p-6">
|
|
<div class="space-y-3">
|
|
<a href="{{ route('teknisi.index') }}" class="block p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition">
|
|
<i class="fas fa-users text-blue-500 me-2"></i>
|
|
<strong>Data Teknisi</strong> - Kelola data teknisi perusahaan
|
|
</a>
|
|
<a href="#" class="block p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition">
|
|
<i class="fas fa-briefcase text-green-500 me-2"></i>
|
|
<strong>Kelola Pekerjaan</strong> - Manage pekerjaan teknisi
|
|
</a>
|
|
<a href="#" class="block p-4 border border-gray-200 rounded-lg hover:bg-gray-50 transition">
|
|
<i class="fas fa-file-alt text-cyan-500 me-2"></i>
|
|
<strong>Laporan</strong> - Lihat laporan kegiatan
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- User Info -->
|
|
<div class="lg:col-span-1">
|
|
<div class="bg-white rounded-lg shadow-lg overflow-hidden">
|
|
<div class="bg-green-500 text-white px-6 py-4">
|
|
<h5 class="text-lg font-semibold">User Information</h5>
|
|
</div>
|
|
<div class="p-6">
|
|
<div class="mb-4">
|
|
<strong class="text-gray-700">Name:</strong><br>
|
|
<span class="text-gray-900">{{ Auth::user()->name }}</span>
|
|
</div>
|
|
<div class="mb-4">
|
|
<strong class="text-gray-700">Email:</strong><br>
|
|
<span class="text-gray-900">{{ Auth::user()->email }}</span>
|
|
</div>
|
|
<div class="mb-4">
|
|
<strong class="text-gray-700">Registered:</strong><br>
|
|
<span class="text-gray-900">{{ Auth::user()->created_at->format('d M Y') }}</span>
|
|
</div>
|
|
<hr class="my-4">
|
|
<form method="POST" action="{{ route('logout') }}">
|
|
@csrf
|
|
<button type="submit" class="w-full bg-red-500 hover:bg-red-600 text-white font-semibold py-2 px-4 rounded transition">
|
|
<i class="fas fa-sign-out-alt me-2"></i>Logout
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout> -->
|