From 6752a9333d876cdf3eb9640ca4a073eaee8ca9fc Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 4 Aug 2026 01:00:36 +0200 Subject: [PATCH] Porcentaje de tareas por proyecto --- app/Http/Controllers/ProjectController.php | 7 +++- resources/css/app.css | 38 +++++++++++++++++ resources/js/Pages/Projects/Index.vue | 49 ++++++++++++++++++---- 3 files changed, 84 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 086ca5c..9d5c62c 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -10,7 +10,12 @@ class ProjectController extends Controller { public function index() { - $projects = auth()->user()->projects()->latest()->get(); + $projects = auth()->user()->projects() + ->with(['tasks' => function ($query) { + $query->select('id', 'project_id', 'status'); + }]) + ->latest() + ->get(); return Inertia::render('Projects/Index', [ 'projects' => $projects, diff --git a/resources/css/app.css b/resources/css/app.css index 84f1ae3..5187303 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -111,6 +111,44 @@ .feature-icon { width: 3rem; } +.project-card { + background: rgba(255, 255, 255, 0.96); + transition: transform 0.2s ease, box-shadow 0.2s ease; +} + +.project-card:hover { + transform: translateY(-2px); + box-shadow: 0 18px 35px rgba(13, 110, 253, 0.16) !important; +} + +.project-card-top { + background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(111, 66, 193, 0.20)); + height: 7px; +} + +.project-icon-badge { + align-items: center; + background: linear-gradient(135deg, #0d6efd, #6f42c1); + border-radius: 0.85rem; + color: #fff; + display: inline-flex; + font-size: 0.95rem; + height: 2.2rem; + justify-content: center; + min-width: 2.2rem; +} + +.progress { + border-radius: 999px; + height: 0.55rem; + overflow: hidden; +} + +.progress-bar { + background: linear-gradient(135deg, #0d6efd, #6f42c1); + border-radius: 999px; +} + .offcanvas { max-width: 100vw; } diff --git a/resources/js/Pages/Projects/Index.vue b/resources/js/Pages/Projects/Index.vue index ff89cc6..b207750 100644 --- a/resources/js/Pages/Projects/Index.vue +++ b/resources/js/Pages/Projects/Index.vue @@ -1,10 +1,23 @@