🤩 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:projects.blade.php
<x-app-layout> <x-slot name="header"> <h2 class="font-semibold text-xl text-navy leading-tight"> {{ __('Admin: Projects & Domains') }} </h2> </x-slot> <div class="py-12"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-8"> @if(session('success')) <div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded-lg relative animate-pulse" id="flash-success"> <span class="font-medium">✓</span> {{ session('success') }} </div> @endif {{-- Create New Project --}} <div class="bg-white overflow-hidden shadow-lg sm:rounded-xl border border-gray-100"> <div class="bg-gradient-to-r from-navy to-navy-light p-4"> <h3 class="text-lg font-bold text-white">Create New Project</h3> </div> <div class="p-6"> <form action="{{ route('admin.project.store') }}" method="POST" class="space-y-4"> @csrf <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Project Name</label> <input type="text" name="name" class="block w-full border-gray-300 rounded-lg shadow-sm focus:ring-orange focus:border-orange" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Select Client</label> <select name="client_id" class="block w-full border-gray-300 rounded-lg shadow-sm focus:ring-orange focus:border-orange" required> <option value="">Choose client...</option> @foreach($clients as $client) <option value="{{ $client->id }}">{{ $client->name }} ({{ $client->email }})</option> @endforeach </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Assign Tech Lead</label> <select name="tech_lead_id" class="block w-full border-gray-300 rounded-lg shadow-sm focus:ring-orange focus:border-orange"> <option value="">Assign later...</option> @foreach($techLeads as $tl) <option value="{{ $tl->id }}">{{ $tl->name }}</option> @endforeach </select> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Budget (Rs)</label> <input type="number" step="0.01" name="budget" class="block w-full border-gray-300 rounded-lg shadow-sm focus:ring-orange focus:border-orange" placeholder="0.00"> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Domain Name</label> <input type="text" name="domain_name" placeholder="example.com" class="block w-full border-gray-300 rounded-lg shadow-sm focus:ring-orange focus:border-orange" required> </div> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Domain Renewal Date</label> <input type="date" name="renewal_date" class="block w-full border-gray-300 rounded-lg shadow-sm focus:ring-orange focus:border-orange" required> </div> </div> <button type="submit" class="bg-orange hover:bg-orange-dark text-white px-6 py-2.5 rounded-lg font-semibold transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5"> ✨ Create Project </button> </form> </div> </div> {{-- All Projects Table --}} <div class="bg-white overflow-hidden shadow-lg sm:rounded-xl border border-gray-100"> <div class="bg-gradient-to-r from-navy to-navy-light p-4 flex justify-between items-center"> <h3 class="text-lg font-bold text-white">All Projects & Domains</h3> <span class="bg-orange text-white px-3 py-1 rounded-full text-sm font-bold">{{ $projects->count() }} Projects</span> </div> <div class="p-6"> <div class="overflow-x-auto"> <table class="min-w-full divide-y divide-gray-200"> <thead class="bg-gray-50"> <tr> <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Project</th> <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th> <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tech Lead</th> <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Budget</th> <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Domains</th> <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> @forelse($projects as $project) <tr class="hover:bg-gray-50 transition-colors duration-150"> <td class="px-4 py-4 whitespace-nowrap font-semibold text-navy">{{ $project->name }}</td> <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-600">{{ $project->client->name ?? 'N/A' }}</td> <td class="px-4 py-4 whitespace-nowrap text-sm"> @if($project->techLead) <span class="text-green-700 font-medium">{{ $project->techLead->name }}</span> @else <span class="text-red-400 italic">Unassigned</span> @endif </td> <td class="px-4 py-4 whitespace-nowrap text-sm"> <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium capitalize @if($project->status == 'completed') bg-green-100 text-green-800 @elseif($project->status == 'in_progress') bg-blue-100 text-blue-800 @else bg-yellow-100 text-yellow-800 @endif"> {{ str_replace('_', ' ', $project->status) }} </span> </td> <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-700">Rs. {{ number_format($project->budget ?? 0, 2) }}</td> <td class="px-4 py-4 text-sm text-gray-500"> @foreach($project->domains as $domain) <div class="mb-1"> <span class="font-medium text-navy">{{ $domain->domain_name }}</span> <br><span class="text-xs text-orange">Renews: {{ $domain->renewal_date->format('Y-m-d') }}</span> </div> @endforeach </td> <td class="px-4 py-4 whitespace-nowrap"> @if(!$project->tech_lead_id) <form action="{{ route('admin.project.assign-techlead', $project) }}" method="POST" class="flex gap-2"> @csrf <select name="tech_lead_id" class="text-xs border-gray-300 rounded-md focus:ring-orange focus:border-orange" required> <option value="">Assign TL</option> @foreach($techLeads as $tl) <option value="{{ $tl->id }}">{{ $tl->name }}</option> @endforeach </select> <button type="submit" class="bg-navy text-white px-2 py-1 rounded text-xs hover:bg-navy-light transition-colors">Assign</button> </form> @else <span class="text-xs text-green-600">✓ Assigned</span> @endif </td> </tr> @empty <tr> <td colspan="7" class="px-4 py-8 text-center text-gray-400">No projects yet. Create one above!</td> </tr> @endforelse </tbody> </table> </div> </div> </div> </div> </div> </x-app-layout>
Save Changes
Cancel
Create New File
Create New Folder