🤩 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:project_show.blade.php
<x-app-layout> <x-slot name="header"> <h2 class="font-semibold text-xl text-navy leading-tight"> {{ __('Project Details: ') }} {{ $project->name }} </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"> <span class="text-green-700 font-medium">{{ session('success') }}</span> </div> @endif <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 flex justify-between items-center"> <h3 class="text-lg font-bold text-white">Project Overview</h3> <span class="px-3 py-1 rounded-full text-xs font-bold bg-white text-navy capitalize">{{ str_replace('_', ' ', $project->status) }}</span> </div> <div class="p-6 grid grid-cols-1 md:grid-cols-2 gap-6"> <div> <p class="text-sm font-semibold text-gray-500 uppercase">Client</p> <p class="text-lg text-gray-900">{{ $project->client->name ?? 'N/A' }}</p> </div> <div> <p class="text-sm font-semibold text-gray-500 uppercase">Budget</p> <p class="text-lg text-gray-900">Rs. {{ number_format($project->budget, 2) }}</p> </div> <div> <p class="text-sm font-semibold text-gray-500 uppercase">Domains</p> <div class="flex flex-wrap gap-2 mt-1"> @forelse($project->domains as $domain) <span class="bg-orange/10 text-orange border border-orange/20 px-2 py-1 rounded text-sm font-medium"> {{ $domain->domain_name }} </span> @empty <span class="text-gray-500">None</span> @endforelse </div> </div> </div> </div> {{-- Project Resources Link --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="border-b border-gray-200 bg-gradient-to-r from-teal-600 to-teal-800 px-6 py-4"> <h3 class="text-lg font-bold text-white flex items-center gap-2"> <svg class="h-5 w-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776"/> </svg> Project Resources </h3> </div> <div class="p-6 text-center"> <p class="text-gray-500 mb-4">Upload and manage resources (files, documents, assets) for developers working on this project.</p> <a href="{{ route('techlead.project.resources', $project) }}" class="inline-flex items-center gap-2 bg-teal-600 hover:bg-teal-700 text-white font-semibold px-6 py-3 rounded-lg transition-colors"> <svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"/> </svg> Manage Resources </a> </div> </div> {{-- Credentials Section --}} <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg"> <div class="border-b border-gray-200 bg-gradient-to-r from-blue-600 to-blue-800 px-6 py-4"> <h3 class="text-lg font-bold text-white">Project Credentials</h3> </div> <div class="p-6"> @if($project->credentials->isEmpty()) <p class="text-gray-500 mb-4">No credentials added yet.</p> @else <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> @foreach($project->credentials as $cred) <div class="border rounded-lg p-4 bg-gray-50 relative"> <h4 class="font-bold text-navy">{{ $cred->title }}</h4> @if($cred->url) <p class="text-sm text-gray-600 mt-1"><span class="font-semibold">URL:</span> <a href="{{ $cred->url }}" target="_blank" class="text-blue-600 hover:underline">{{ $cred->url }}</a></p> @endif @if($cred->username) <p class="text-sm text-gray-600"><span class="font-semibold">Username:</span> {{ $cred->username }}</p> @endif @if($cred->password) <p class="text-sm text-gray-600"><span class="font-semibold">Password:</span> {{ $cred->password }}</p> @endif @if($cred->notes) <p class="text-sm text-gray-500 mt-2 italic">{{ $cred->notes }}</p> @endif <div class="mt-4 pt-3 border-t"> <p class="text-xs font-semibold text-gray-500 uppercase mb-2">Assigned To:</p> <div class="flex flex-wrap gap-1 mb-3"> @forelse($cred->users as $u) <span class="bg-gray-200 text-gray-700 text-xs px-2 py-1 rounded">{{ $u->name }}</span> @empty <span class="text-xs text-gray-400">Not assigned</span> @endforelse </div> <form action="{{ route('techlead.credential.assign', $cred) }}" method="POST" class="flex gap-2"> @csrf <select name="user_id" class="text-sm border-gray-300 rounded-md shadow-sm flex-1" required> <option value="">Assign to...</option> <option value="{{ $project->client_id }}">Client ({{ $project->client->name ?? 'Unknown' }})</option> @foreach($developers as $dev) <option value="{{ $dev->id }}">{{ $dev->name }} (Developer)</option> @endforeach </select> <button type="submit" class="bg-navy hover:bg-navy-dark text-white px-3 py-1 rounded text-sm transition-colors">Assign</button> </form> </div> </div> @endforeach </div> @endif <h4 class="font-bold text-gray-800 border-b pb-2 mb-4">Add New Credential</h4> <form action="{{ route('techlead.project.credential.store', $project) }}" method="POST" class="space-y-4 max-w-xl"> @csrf <div> <label class="block text-sm font-medium text-gray-700">Title</label> <input type="text" name="title" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-navy focus:border-navy" required placeholder="e.g. cPanel, WordPress Admin"> </div> <div class="grid grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700">Username</label> <input type="text" name="username" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-navy focus:border-navy"> </div> <div> <label class="block text-sm font-medium text-gray-700">Password</label> <input type="text" name="password" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-navy focus:border-navy"> </div> </div> <div> <label class="block text-sm font-medium text-gray-700">URL / Link</label> <input type="url" name="url" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-navy focus:border-navy"> </div> <div> <label class="block text-sm font-medium text-gray-700">Notes</label> <textarea name="notes" rows="2" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-navy focus:border-navy"></textarea> </div> <button type="submit" class="bg-orange hover:bg-orange-dark text-white font-bold py-2 px-4 rounded transition-colors"> Save Credential </button> </form> </div> </div> </div> </div> </x-app-layout>
Save Changes
Cancel
Create New File
Create New Folder