🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:dashboard.blade.php
<x-app-layout> <x-slot name="header"> <div class="flex items-center justify-between"> <h2 class="text-xl font-semibold leading-tight text-white"> {{ __('Admin Dashboard') }} </h2> <span class="text-sm text-navy-light/70">{{ now()->format('l, F j, Y') }}</span> </div> </x-slot> <div class="py-8"> <div class="mx-auto max-w-7xl sm:px-6 lg:px-8 space-y-8"> {{-- Flash Messages --}} @if (session('success')) <div class="rounded-lg border border-green-200 bg-green-50 p-4"> <div class="flex items-center"> <svg class="h-5 w-5 text-green-500 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg> <p class="text-sm font-medium text-green-800">{{ session('success') }}</p> </div> </div> @endif @if (session('error')) <div class="rounded-lg border border-red-200 bg-red-50 p-4"> <div class="flex items-center"> <svg class="h-5 w-5 text-red-500 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg> <p class="text-sm font-medium text-red-800">{{ session('error') }}</p> </div> </div> @endif {{-- ============================================================ --}} {{-- Stats Cards Grid --}} {{-- ============================================================ --}} <div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3"> {{-- Total Projects --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-navy p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Total Projects</p> <p class="text-2xl font-bold text-navy">{{ $stats['total_projects'] ?? 0 }}</p> </div> </div> </div> {{-- Active Projects --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-green-600 p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Active Projects</p> <p class="text-2xl font-bold text-green-700">{{ $stats['active_projects'] ?? 0 }}</p> </div> </div> </div> {{-- Pending Projects --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-yellow-500 p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Pending Projects</p> <p class="text-2xl font-bold text-yellow-600">{{ $stats['pending_projects'] ?? 0 }}</p> </div> </div> </div> {{-- Total Revenue --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-orange p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Total Revenue</p> <p class="text-2xl font-bold text-orange">Rs{{ number_format($stats['total_revenue'] ?? 0, 2) }}</p> </div> </div> </div> {{-- Total Expenses --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-red-600 p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Total Expenses</p> <p class="text-2xl font-bold text-red-600">Rs{{ number_format($stats['total_expenses'] ?? 0, 2) }}</p> </div> </div> </div> {{-- Total Leads --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-navy p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Total Leads</p> <p class="text-2xl font-bold text-navy">{{ $stats['total_leads'] ?? 0 }}</p> </div> </div> </div> {{-- Contacted Leads --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-green-600 p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Contacted Leads</p> <p class="text-2xl font-bold text-green-700">{{ $stats['contacted_leads'] ?? 0 }}</p> </div> </div> </div> {{-- Total Domains --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-navy p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Total Domains</p> <p class="text-2xl font-bold text-navy">{{ $stats['total_domains'] ?? 0 }}</p> </div> </div> </div> {{-- Expiring Domains --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="flex items-center p-5"> <div class="flex-shrink-0 rounded-lg bg-yellow-500 p-3"> <svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"/></svg> </div> <div class="ml-4"> <p class="text-sm font-medium text-gray-500">Expiring Domains</p> <p class="text-2xl font-bold text-yellow-600">{{ $stats['expiring_domains'] ?? 0 }}</p> </div> </div> </div> </div> {{-- ============================================================ --}} {{-- Quick Navigation --}} {{-- ============================================================ --}} <div class="overflow-hidden rounded-lg bg-gradient-to-r from-navy to-navy-dark shadow-sm"> <div class="p-6"> <h3 class="text-lg font-semibold text-white mb-4">Quick Navigation</h3> <div class="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4"> <a href="{{ route('admin.leads') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"/></svg> Leads </a> <a href="{{ route('admin.quotations') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"/></svg> Quotations </a> <a href="{{ route('admin.agreements') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15a2.25 2.25 0 012.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"/></svg> Agreements </a> <a href="{{ route('admin.financials') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> Financials </a> <a href="{{ route('admin.payments') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z"/></svg> Payments </a> <a href="{{ route('admin.domains') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"/></svg> Domains </a> <a href="{{ route('admin.attendance') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"/></svg> Attendance </a> <a href="{{ route('admin.projects') }}" class="flex items-center gap-2 rounded-lg bg-white/10 px-4 py-3 text-sm font-medium text-white transition hover:bg-white/20"> <svg class="h-5 w-5 text-orange" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"/></svg> Projects </a> </div> </div> </div> {{-- ============================================================ --}} {{-- Pending Requirements Banner --}} {{-- ============================================================ --}} @if(($pendingRequirements ?? 0) > 0) <div class="rounded-lg border border-orange/30 bg-orange-light/10 p-4"> <div class="flex items-center"> <svg class="h-5 w-5 text-orange mr-3 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg> <p class="text-sm font-medium text-navy"> You have <span class="font-bold text-orange">{{ $pendingRequirements }}</span> pending requirement{{ $pendingRequirements > 1 ? 's' : '' }} awaiting review. </p> </div> </div> @endif {{-- ============================================================ --}} {{-- Two-Column: Recent Projects + Recent Leads --}} {{-- ============================================================ --}} <div class="grid grid-cols-1 gap-8 lg:grid-cols-2"> {{-- Recent Projects --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="border-b border-gray-100 bg-gray-50/50 px-6 py-4"> <div class="flex items-center justify-between"> <h3 class="text-base font-semibold text-navy">Recent Projects</h3> <a href="{{ route('admin.projects') }}" class="text-sm font-medium text-orange hover:text-orange-dark transition">View All →</a> </div> </div> <div class="overflow-x-auto"> @if($recentProjects->count() > 0) <table class="min-w-full divide-y divide-gray-200"> <thead> <tr class="bg-gray-50"> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Project</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Client</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Tech Lead</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Status</th> </tr> </thead> <tbody class="divide-y divide-gray-100"> @foreach($recentProjects as $project) <tr class="transition hover:bg-gray-50/50"> <td class="whitespace-nowrap px-6 py-4 text-sm font-medium text-navy">{{ $project->name }}</td> <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600">{{ $project->client->name ?? '—' }}</td> <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600">{{ $project->techLead->name ?? '—' }}</td> <td class="whitespace-nowrap px-6 py-4"> @php $statusColors = [ 'active' => 'bg-green-100 text-green-800', 'pending' => 'bg-yellow-100 text-yellow-800', 'completed' => 'bg-blue-100 text-blue-800', 'on_hold' => 'bg-gray-100 text-gray-800', ]; $color = $statusColors[$project->status] ?? 'bg-gray-100 text-gray-800'; @endphp <span class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold {{ $color }}"> {{ ucfirst(str_replace('_', ' ', $project->status)) }} </span> </td> </tr> @endforeach </tbody> </table> @else <div class="flex flex-col items-center justify-center py-12 text-center"> <svg class="h-12 w-12 text-gray-300 mb-3" fill="none" stroke="currentColor" stroke-width="1" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"/></svg> <p class="text-sm text-gray-500">No recent projects found.</p> </div> @endif </div> </div> {{-- Recent Leads --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="border-b border-gray-100 bg-gray-50/50 px-6 py-4"> <div class="flex items-center justify-between"> <h3 class="text-base font-semibold text-navy">Recent Leads</h3> <a href="{{ route('admin.leads') }}" class="text-sm font-medium text-orange hover:text-orange-dark transition">View All →</a> </div> </div> <div class="overflow-x-auto"> @if($recentLeads->count() > 0) <table class="min-w-full divide-y divide-gray-200"> <thead> <tr class="bg-gray-50"> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Name</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Salesperson</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Status</th> <th class="px-6 py-3 text-left text-xs font-semibold uppercase tracking-wider text-gray-500">Priority</th> </tr> </thead> <tbody class="divide-y divide-gray-100"> @foreach($recentLeads as $lead) <tr class="transition hover:bg-gray-50/50"> <td class="whitespace-nowrap px-6 py-4"> <div class="text-sm font-medium text-navy">{{ $lead->name }}</div> <div class="text-xs text-gray-400">{{ $lead->email }}</div> </td> <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600">{{ $lead->salesPerson->name ?? '—' }}</td> <td class="whitespace-nowrap px-6 py-4"> @if($lead->status === 'contacted') <span class="inline-flex items-center rounded-full bg-green-100 px-2.5 py-0.5 text-xs font-semibold text-green-800">Contacted</span> @else <span class="inline-flex items-center rounded-full bg-yellow-100 px-2.5 py-0.5 text-xs font-semibold text-yellow-800">Not Contacted</span> @endif </td> <td class="whitespace-nowrap px-6 py-4"> @php $priorityColors = [ 'urgent' => 'bg-red-100 text-red-800', 'high' => 'bg-orange-100 text-orange-800', 'medium' => 'bg-blue-100 text-blue-800', 'low' => 'bg-gray-100 text-gray-800', ]; $pColor = $priorityColors[$lead->priority] ?? 'bg-gray-100 text-gray-800'; @endphp <span class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold {{ $pColor }}"> {{ ucfirst($lead->priority) }} </span> </td> </tr> @endforeach </tbody> </table> @else <div class="flex flex-col items-center justify-center py-12 text-center"> <svg class="h-12 w-12 text-gray-300 mb-3" fill="none" stroke="currentColor" stroke-width="1" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"/></svg> <p class="text-sm text-gray-500">No recent leads found.</p> </div> @endif </div> </div> </div> </div> </div> </x-app-layout>
Save Changes
Cancel
Create New File
Create New Folder