🤩 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:domains.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"> {{ __('Domain Renewal Tracking') }} </h2> <span class="inline-flex items-center rounded-full bg-white/10 px-3 py-1 text-sm font-medium text-white"> {{ $domains->count() }} {{ Str::plural('Domain', $domains->count()) }} </span> </div> </x-slot> <div class="py-8"> <div class="mx-auto max-w-7xl sm:px-6 lg:px-8 space-y-6"> {{-- 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 {{-- ============================================================ --}} {{-- Filter Links --}} {{-- ============================================================ --}} <div class="overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-900/5"> <div class="px-6 py-4"> <div class="flex items-center gap-2"> <span class="text-sm font-medium text-gray-500 mr-2">Filter:</span> <a href="{{ route('admin.domains', ['filter' => 'all']) }}" class="inline-flex items-center rounded-lg px-4 py-2 text-sm font-medium transition {{ ($filter ?? 'all') === 'all' ? 'bg-navy text-white shadow-sm' : 'bg-gray-100 text-gray-700 hover:bg-gray-200' }}"> <svg class="mr-1.5 h-4 w-4" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"/></svg> All </a> <a href="{{ route('admin.domains', ['filter' => 'expiring']) }}" class="inline-flex items-center rounded-lg px-4 py-2 text-sm font-medium transition {{ ($filter ?? 'all') === 'expiring' ? 'bg-yellow-500 text-white shadow-sm' : 'bg-yellow-50 text-yellow-700 hover:bg-yellow-100' }}"> <svg class="mr-1.5 h-4 w-4" 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> Expiring (30 days) </a> <a href="{{ route('admin.domains', ['filter' => 'next_month']) }}" class="inline-flex items-center rounded-lg px-4 py-2 text-sm font-medium transition {{ ($filter ?? 'all') === 'next_month' ? 'bg-blue-600 text-white shadow-sm' : 'bg-blue-50 text-blue-700 hover:bg-blue-100' }}"> <svg class="mr-1.5 h-4 w-4" 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.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"/></svg> Next Month </a> <a href="{{ route('admin.domains', ['filter' => 'expired']) }}" class="inline-flex items-center rounded-lg px-4 py-2 text-sm font-medium transition {{ ($filter ?? 'all') === 'expired' ? 'bg-red-600 text-white shadow-sm' : 'bg-red-50 text-red-700 hover:bg-red-100' }}"> <svg class="mr-1.5 h-4 w-4" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"/></svg> Expired </a> </div> </div> </div> {{-- ============================================================ --}} {{-- Domains Table --}} {{-- ============================================================ --}} <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"> <h3 class="text-base font-semibold text-navy"> @if(($filter ?? 'all') === 'expiring') Domains Expiring Within 30 Days @elseif(($filter ?? 'all') === 'next_month') Domains Renewing Next Month @elseif(($filter ?? 'all') === 'expired') Expired Domains @else All Domains @endif </h3> </div> <div class="overflow-x-auto"> @if($domains->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">Domain Name</th> <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">Renewal Date</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 bg-white"> @foreach($domains as $domain) @php $renewalDate = \Carbon\Carbon::parse($domain->renewal_date); $now = now(); $daysUntilRenewal = $now->diffInDays($renewalDate, false); if ($renewalDate->isPast()) { $statusLabel = 'Expired'; $statusClass = 'bg-red-100 text-red-800'; $rowHighlight = 'bg-red-50/30'; } elseif ($daysUntilRenewal <= 30) { $statusLabel = 'Expiring Soon'; $statusClass = 'bg-yellow-100 text-yellow-800'; $rowHighlight = 'bg-yellow-50/30'; } else { $statusLabel = 'Active'; $statusClass = 'bg-green-100 text-green-800'; $rowHighlight = ''; } @endphp <tr class="transition hover:bg-gray-50/50 {{ $rowHighlight }}"> <td class="whitespace-nowrap px-6 py-4"> <div class="flex items-center"> <svg class="mr-2 h-5 w-5 text-navy/40" 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> <span class="text-sm font-medium text-navy">{{ $domain->domain_name }}</span> </div> </td> <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600"> {{ $domain->project->name ?? '—' }} </td> <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600"> {{ $domain->client->name ?? '—' }} </td> <td class="whitespace-nowrap px-6 py-4 text-sm text-gray-600"> <div>{{ $renewalDate->format('M d, Y') }}</div> @if(!$renewalDate->isPast()) <div class="text-xs text-gray-400 mt-0.5"> {{ $daysUntilRenewal }} {{ Str::plural('day', $daysUntilRenewal) }} remaining </div> @else <div class="text-xs text-red-400 mt-0.5"> Expired {{ $renewalDate->diffForHumans() }} </div> @endif </td> <td class="whitespace-nowrap px-6 py-4"> <span class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold {{ $statusClass }}"> <svg class="mr-1 h-3 w-3" fill="currentColor" viewBox="0 0 8 8"><circle cx="4" cy="4" r="3"/></svg> {{ $statusLabel }} </span> </td> </tr> @endforeach </tbody> </table> @else <div class="flex flex-col items-center justify-center py-16 text-center"> <svg class="h-16 w-16 text-gray-300 mb-4" fill="none" stroke="currentColor" stroke-width="1" 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> <h3 class="text-sm font-semibold text-gray-900 mb-1">No domains found</h3> <p class="text-sm text-gray-500"> @if(($filter ?? 'all') === 'expiring') No domains are expiring within the next 30 days. @elseif(($filter ?? 'all') === 'expired') No expired domains found. All domains are up to date! @else Domain records will appear here once they are added to the system. @endif </p> </div> @endif </div> </div> </div> </div> </x-app-layout>
Save Changes
Cancel
Create New File
Create New Folder