Sistema multilingüe EN/ES: middleware SetLocale, LanguageSwitcher, campo locale en users, traducciones en dashboard/mapa/proyectos/gestores
This commit is contained in:
@@ -10,46 +10,46 @@
|
||||
{{-- Stats cards --}}
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8">
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">Proyectos activos</div>
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">{{ __('Active projects') }}</div>
|
||||
<div class="text-3xl font-bold mt-1">{{ $stats['active_projects'] }}</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">Proyectos totales</div>
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">{{ __('Total projects') }}</div>
|
||||
<div class="text-3xl font-bold mt-1">{{ $stats['total_projects'] }}</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">Fases totales</div>
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">{{ __('Total phases') }}</div>
|
||||
<div class="text-3xl font-bold mt-1">{{ $stats['total_phases'] }}</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">Elementos (features)</div>
|
||||
<div class="text-sm text-gray-500 uppercase tracking-wide">{{ __('Total features') }}</div>
|
||||
<div class="text-3xl font-bold mt-1">{{ $stats['total_features'] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Barra de progreso global --}}
|
||||
{{-- Global progress bar --}}
|
||||
<div class="bg-white rounded-lg shadow p-6 mb-8">
|
||||
<h3 class="text-lg font-semibold mb-2">Progreso global</h3>
|
||||
<h3 class="text-lg font-semibold mb-2">{{ __('Global progress') }}</h3>
|
||||
<div class="w-full bg-gray-200 rounded-full h-4">
|
||||
<div class="bg-primary h-4 rounded-full transition-all" style="width: {{ $stats['global_progress'] }}%"></div>
|
||||
</div>
|
||||
<p class="text-right text-sm text-gray-500 mt-1">{{ $stats['global_progress'] }}%</p>
|
||||
</div>
|
||||
|
||||
{{-- Proyectos recientes --}}
|
||||
{{-- Recent projects --}}
|
||||
<div class="bg-white rounded-lg shadow p-6 mb-8">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h3 class="text-lg font-semibold">Proyectos recientes</h3>
|
||||
<a href="{{ route('projects.list') }}" class="text-sm text-primary hover:underline">Ver todos</a>
|
||||
<h3 class="text-lg font-semibold">{{ __('Recent projects') }}</h3>
|
||||
<a href="{{ route('projects.list') }}" class="text-sm text-primary hover:underline">{{ __('View Map') }}</a>
|
||||
</div>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table table-zebra w-full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nombre</th>
|
||||
<th>Estado</th>
|
||||
<th>Fases</th>
|
||||
<th>Progreso</th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('Status') }}</th>
|
||||
<th>{{ __('Phases') }}</th>
|
||||
<th>{{ __('Progress') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -67,13 +67,7 @@
|
||||
default => 'badge-ghost'
|
||||
};
|
||||
@endphp
|
||||
<span class="badge {{ $badgeClass }}">{{ match($project->status) {
|
||||
'planning' => 'Planificación',
|
||||
'in_progress' => 'En obra',
|
||||
'paused' => 'Pausado',
|
||||
'completed' => 'Finalizado',
|
||||
default => $project->status
|
||||
} }}</span>
|
||||
<span class="badge {{ $badgeClass }}">{{ __(ucfirst(str_replace('_', ' ', $project->status))) }}</span>
|
||||
</td>
|
||||
<td>{{ $project->phases_count }}</td>
|
||||
<td>
|
||||
@@ -86,26 +80,26 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('projects.map', $project) }}" class="btn btn-xs btn-outline">Mapa</a>
|
||||
<a href="{{ route('projects.map', $project) }}" class="btn btn-xs btn-outline">{{ __('Map') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="text-center text-gray-400 py-4">No hay proyectos aún</td></tr>
|
||||
<tr><td colspan="5" class="text-center text-gray-400 py-4">{{ __('No results') }}</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Inspecciones recientes --}}
|
||||
{{-- Recent inspections --}}
|
||||
@if($recentInspections->isNotEmpty())
|
||||
<div class="bg-white rounded-lg shadow p-6">
|
||||
<h3 class="text-lg font-semibold mb-4">Inspecciones recientes</h3>
|
||||
<h3 class="text-lg font-semibold mb-4">{{ __('Recent inspections') }}</h3>
|
||||
<div class="space-y-2">
|
||||
@foreach($recentInspections as $inspection)
|
||||
<div class="border rounded p-3 flex justify-between items-center">
|
||||
<div>
|
||||
<span class="font-medium">{{ $inspection->template?->name ?? 'Inspección' }}</span>
|
||||
<span class="font-medium">{{ $inspection->template?->name ?? __('Inspection') }}</span>
|
||||
<span class="text-sm text-gray-500 ml-2">{{ $inspection->feature?->name }}</span>
|
||||
</div>
|
||||
<span class="text-xs text-gray-400">{{ $inspection->created_at->diffForHumans() }}</span>
|
||||
|
||||
Reference in New Issue
Block a user