🤩 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"> <h2 class="font-semibold text-xl text-navy leading-tight"> {{ __('Tech Lead Dashboard') }} </h2> </x-slot> <div class="py-12"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-8"> {{-- Flash Messages --}} @if(session('success')) <div class="bg-green-50 border-l-4 border-green-400 p-4 rounded-r-lg shadow-sm"> <div class="flex items-center"> <svg class="h-5 w-5 text-green-400 mr-3" 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> <span class="text-green-700 font-medium">{{ session('success') }}</span> </div> </div> @endif @if(session('error')) <div class="bg-red-50 border-l-4 border-red-400 p-4 rounded-r-lg shadow-sm"> <div class="flex items-center"> <svg class="h-5 w-5 text-red-400 mr-3" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a1 1 0 10-2 0v4a1 1 0 002 0V5zm-1 8a1 1 0 100 2 1 1 0 000-2z" clip-rule="evenodd"/></svg> <span class="text-red-700 font-medium">{{ session('error') }}</span> </div> </div> @endif {{-- ============================================================ --}} {{-- STATS ROW --}} {{-- ============================================================ --}} <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6"> {{-- Total Assigned Projects --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg border-t-4 border-navy"> <div class="p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500 uppercase tracking-wider">Assigned Projects</p> <p class="mt-2 text-3xl font-extrabold text-navy">{{ $projects->count() }}</p> </div> <div class="flex-shrink-0 bg-navy bg-opacity-10 rounded-full p-3"> <svg class="h-8 w-8 text-navy" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg> </div> </div> </div> </div> {{-- Pending Requirements --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg border-t-4 border-orange"> <div class="p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500 uppercase tracking-wider">Pending Requirements</p> <p class="mt-2 text-3xl font-extrabold text-orange">{{ $pendingRequirements->count() }}</p> </div> <div class="flex-shrink-0 bg-orange bg-opacity-10 rounded-full p-3"> <svg class="h-8 w-8 text-orange" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> </div> </div> </div> </div> {{-- Total Tasks --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg border-t-4 border-blue-500"> <div class="p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500 uppercase tracking-wider">Total Tasks</p> <p class="mt-2 text-3xl font-extrabold text-blue-600">{{ $allTasks->count() }}</p> </div> <div class="flex-shrink-0 bg-blue-100 rounded-full p-3"> <svg class="h-8 w-8 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/></svg> </div> </div> </div> </div> {{-- Completed Tasks --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg border-t-4 border-green-500"> <div class="p-6"> <div class="flex items-center justify-between"> <div> <p class="text-sm font-medium text-gray-500 uppercase tracking-wider">Completed Tasks</p> <p class="mt-2 text-3xl font-extrabold text-green-600">{{ $allTasks->where('status', 'done')->count() }}</p> </div> <div class="flex-shrink-0 bg-green-100 rounded-full p-3"> <svg class="h-8 w-8 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> </div> </div> </div> </div> </div> {{-- ============================================================ --}} {{-- MY PROJECTS SECTION --}} {{-- ============================================================ --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="border-b border-gray-200 bg-gradient-to-r from-navy to-navy-dark px-6 py-4"> <h3 class="text-lg font-bold text-white flex items-center"> <svg class="h-5 w-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg> My Projects </h3> </div> <div class="p-6"> @if($projects->isEmpty()) <div class="text-center py-12"> <svg class="mx-auto h-12 w-12 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg> <p class="mt-4 text-sm text-gray-500">No projects assigned to you yet.</p> </div> @else <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> @foreach($projects as $project) <div class="border border-gray-200 rounded-lg hover:shadow-md transition-shadow duration-200 overflow-hidden"> {{-- Project Card Header --}} <div class="bg-gray-50 px-5 py-4 border-b border-gray-200"> <a href="{{ route('techlead.project.show', $project) }}"> <h4 class="font-bold text-navy text-lg truncate hover:text-orange transition-colors" title="{{ $project->name }}">{{ $project->name }}</h4> </a> <p class="text-sm text-gray-500 mt-1 flex items-center"> <svg class="h-4 w-4 mr-1 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg> {{ $project->client->name ?? 'N/A' }} </p> </div> {{-- Project Card Body --}} <div class="px-5 py-4 space-y-3"> <div class="flex items-center justify-between"> <span class="text-xs font-semibold text-gray-500 uppercase">Status</span> <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold capitalize @if($project->status == 'completed') bg-green-100 text-green-800 @elseif($project->status == 'in_progress') bg-blue-100 text-blue-800 @elseif($project->status == 'on_hold') bg-red-100 text-red-800 @else bg-yellow-100 text-yellow-800 @endif"> {{ str_replace('_', ' ', $project->status) }} </span> </div> <div class="flex items-center justify-between"> <span class="text-xs font-semibold text-gray-500 uppercase">Budget</span> <span class="text-sm font-bold text-navy">Rs. {{ number_format($project->budget ?? 0, 2) }}</span> </div> @if($project->domains && $project->domains->count()) <div> <span class="text-xs font-semibold text-gray-500 uppercase">Domains</span> <div class="mt-1 flex flex-wrap gap-1.5"> @foreach($project->domains as $domain) <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-orange bg-opacity-10 text-orange border border-orange border-opacity-20"> {{ $domain->domain_name }} </span> @endforeach </div> </div> @endif </div> {{-- Project Card Footer --}} <div class="bg-gray-50 px-5 py-3 border-t border-gray-200 flex items-center justify-between text-xs text-gray-400"> <span>{{ $project->requirements->count() ?? 0 }} requirements</span> <span>{{ $project->tasks->count() ?? 0 }} tasks</span> </div> </div> @endforeach </div> @endif </div> </div> {{-- ============================================================ --}} {{-- PENDING REQUIREMENTS SECTION (MOST IMPORTANT) --}} {{-- ============================================================ --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="border-b border-gray-200 bg-gradient-to-r from-orange to-orange-dark px-6 py-4"> <h3 class="text-lg font-bold text-white flex items-center"> <svg class="h-5 w-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> Pending Requirements @if($pendingRequirements->count()) <span class="ml-2 inline-flex items-center justify-center px-2.5 py-0.5 rounded-full text-xs font-bold bg-white text-orange"> {{ $pendingRequirements->count() }} </span> @endif </h3> </div> <div class="p-6"> @if($pendingRequirements->isEmpty()) <div class="text-center py-12"> <svg class="mx-auto h-12 w-12 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> <p class="mt-4 text-sm text-gray-500">All requirements have been reviewed. Great job!</p> </div> @else <div class="space-y-6"> @foreach($pendingRequirements as $req) <div class="border border-gray-200 rounded-lg overflow-hidden hover:shadow-md transition-shadow duration-200"> {{-- Requirement Header --}} <div class="bg-gray-50 px-6 py-4 border-b border-gray-200"> <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2"> <div> <h4 class="font-bold text-navy text-lg">{{ $req->title }}</h4> <div class="mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-gray-500"> <span class="flex items-center"> <svg class="h-4 w-4 mr-1 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg> {{ $req->client->name ?? 'N/A' }} </span> <span class="flex items-center"> <svg class="h-4 w-4 mr-1 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg> {{ $req->project->name ?? 'N/A' }} </span> </div> </div> <span class="inline-flex items-center px-3 py-1 rounded-full text-xs font-bold bg-yellow-100 text-yellow-800 uppercase tracking-wide"> Pending Review </span> </div> </div> {{-- Requirement Body --}} <div class="px-6 py-4"> @if($req->description) <p class="text-sm text-gray-700 leading-relaxed">{{ $req->description }}</p> @else <p class="text-sm text-gray-400 italic">No description provided.</p> @endif @if($req->file_path) <div class="mt-3"> <a href="{{ Storage::url($req->file_path) }}" target="_blank" class="inline-flex items-center text-sm font-medium text-orange hover:text-orange-dark transition-colors duration-150"> <svg class="h-4 w-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"/></svg> View Attached File </a> </div> @endif </div> {{-- Requirement Actions --}} <div class="bg-gray-50 px-6 py-4 border-t border-gray-200"> <form action="{{ route('techlead.requirement.approve', $req) }}" method="POST"> @csrf <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 items-end"> {{-- Developer Select --}} <div> <label class="block text-xs font-semibold text-gray-600 uppercase tracking-wider mb-1">Assign Developer</label> <select name="developer_id" class="block w-full border-gray-300 rounded-md shadow-sm text-sm focus:ring-orange focus:border-orange" required> <option value="">Select Developer...</option> @foreach($developers as $dev) <option value="{{ $dev->id }}">{{ $dev->name }}</option> @endforeach </select> </div> {{-- Priority Select --}} <div> <label class="block text-xs font-semibold text-gray-600 uppercase tracking-wider mb-1">Priority</label> <select name="priority" class="block w-full border-gray-300 rounded-md shadow-sm text-sm focus:ring-orange focus:border-orange" required> <option value="low">Low</option> <option value="normal" selected>Normal</option> <option value="high">High</option> <option value="urgent">Urgent</option> </select> </div> {{-- Approve Button --}} <div> <button type="submit" class="w-full inline-flex items-center justify-center px-4 py-2 bg-green-600 hover:bg-green-700 text-white text-sm font-semibold rounded-md shadow-sm transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"> <svg class="h-4 w-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg> Approve </button> </div> {{-- Reject Button --}} <div> </form> <form action="{{ route('techlead.requirement.reject', $req) }}" method="POST"> @csrf <button type="submit" class="w-full inline-flex items-center justify-center px-4 py-2 bg-red-600 hover:bg-red-700 text-white text-sm font-semibold rounded-md shadow-sm transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" onclick="return confirm('Are you sure you want to reject this requirement?')"> <svg class="h-4 w-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg> Reject </button> </form> </div> </div> </div> </div> @endforeach </div> @endif </div> </div> {{-- ============================================================ --}} {{-- ALL TASKS TABLE --}} {{-- ============================================================ --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="border-b border-gray-200 bg-gradient-to-r from-navy to-navy-dark px-6 py-4"> <h3 class="text-lg font-bold text-white flex items-center"> <svg class="h-5 w-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/></svg> All Tasks </h3> </div> <div class="p-6"> @if($allTasks->isEmpty()) <div class="text-center py-12"> <svg class="mx-auto h-12 w-12 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/></svg> <p class="mt-4 text-sm text-gray-500">No tasks have been created yet.</p> </div> @else <div class="overflow-x-auto"> <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 text-gray-500 uppercase tracking-wider">Title</th> <th class="px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Project</th> <th class="px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Developer</th> <th class="px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Status</th> <th class="px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Start Time</th> <th class="px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">End Time</th> <th class="px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Duration</th> </tr> </thead> <tbody class="bg-white divide-y divide-gray-200"> @foreach($allTasks as $task) <tr class="hover:bg-gray-50 transition-colors duration-150"> <td class="px-6 py-4 whitespace-nowrap"> <div class="text-sm font-semibold text-gray-900">{{ $task->title }}</div> @if($task->requirement) <div class="text-xs text-gray-400 mt-0.5">Req: {{ Str::limit($task->requirement->title, 30) }}</div> @endif </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-600">{{ $task->project->name ?? 'N/A' }}</td> <td class="px-6 py-4 whitespace-nowrap"> <div class="flex items-center text-sm"> <div class="h-7 w-7 rounded-full bg-navy bg-opacity-10 flex items-center justify-center mr-2"> <span class="text-xs font-bold text-navy">{{ strtoupper(substr($task->developer->name ?? '?', 0, 1)) }}</span> </div> <span class="text-gray-700">{{ $task->developer->name ?? 'Unassigned' }}</span> </div> </td> <td class="px-6 py-4 whitespace-nowrap"> <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold capitalize @if($task->status == 'done') bg-green-100 text-green-800 @elseif($task->status == 'in_progress') bg-blue-100 text-blue-800 @elseif($task->status == 'assigned') bg-yellow-100 text-yellow-800 @else bg-gray-100 text-gray-800 @endif"> @if($task->status == 'done') <svg class="h-3 w-3 mr-1" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/></svg> @elseif($task->status == 'in_progress') <svg class="h-3 w-3 mr-1 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/></svg> @endif {{ str_replace('_', ' ', $task->status) }} </span> </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> {{ $task->start_time ? \Carbon\Carbon::parse($task->start_time)->format('M d, Y H:i') : '—' }} </td> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> {{ $task->end_time ? \Carbon\Carbon::parse($task->end_time)->format('M d, Y H:i') : '—' }} </td> <td class="px-6 py-4 whitespace-nowrap text-sm"> @if($task->duration) <span class="inline-flex items-center px-2 py-0.5 rounded bg-navy bg-opacity-5 text-navy font-medium"> <svg class="h-3.5 w-3.5 mr-1 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> {{ $task->duration }} </span> @else <span class="text-gray-400">—</span> @endif </td> </tr> @endforeach </tbody> </table> </div> @endif </div> </div> </div> </div> </x-app-layout>
Save Changes
Cancel
Create New File
Create New Folder