Merge branch 'main' of https://homehud.duckdns.org/javier/Nexora
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
2025-05-07 00:21:14 +02:00
11 changed files with 378 additions and 0 deletions

View File

@@ -6,8 +6,14 @@
<!-- User Info Left -->
<div class="flex items-center space-x-6">
<!-- User Photo -->
<<<<<<< HEAD
<img src="{{ $user->profile_photo_path ? asset('storage/' . $user->profile_photo_path) : 'https://via.placeholder.com/150' }}"
class="w-24 h-24 rounded-full object-cover border-2 border-blue-100">
=======
<img src="{{ $user->photo_url ?? 'https://via.placeholder.com/150' }}"
class="w-24 h-24 rounded-full object-cover border-4 border-blue-100">
>>>>>>> f97a7a84985ea300216ba3ea2ab4c31306e1659a
<!-- User Details -->
<div>
<h1 class="text-2xl font-bold text-gray-700">
@@ -127,9 +133,15 @@
</div>
<!-- Action Buttons -->
<<<<<<< HEAD
<div class="mt-6 flex justify-end space-x-4">
<a href="{{ route('users.edit', $user) }}"
class="w-[150px] px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg flex items-center justify-center">
=======
<div class="mt-6 flex space-x-4">
<a href="{{ route('users.edit', $user) }}"
class="px-4 py-2 w-[150px] bg-blue-600 hover:bg-blue-700 text-white rounded-lg flex items-center">
>>>>>>> f97a7a84985ea300216ba3ea2ab4c31306e1659a
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"/>
</svg>
@@ -141,7 +153,11 @@
@csrf
@method('PUT') <!-- Important! -->
<button type="submit"
<<<<<<< HEAD
class="w-[150px] px-4 py-2 bg-yellow-500 hover:bg-yellow-600 text-white rounded-lg flex items-center justify-center">
=======
class="px-4 py-2 w-[150px] {{ $user->is_active ? 'bg-red-600 hover:bg-red-700' : 'bg-green-600 hover:bg-green-700' }} text-white rounded-lg flex items-center">
>>>>>>> f97a7a84985ea300216ba3ea2ab4c31306e1659a
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"/>
</svg>
@@ -155,7 +171,11 @@
@method('DELETE') <!-- Important! -->
<button type="submit"
onclick="return confirm('¿Estás seguro de querer eliminar este usuario?')"
<<<<<<< HEAD
class="px-4 py-2 w-[150px] bg-red-600 hover:bg-red-700 text-white rounded-lg flex items-center justify-center">
=======
class="px-4 py-2 w-[150px] bg-red-600 hover:bg-red-700 text-white rounded-lg flex items-center">
>>>>>>> f97a7a84985ea300216ba3ea2ab4c31306e1659a
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/>
</svg>
@@ -166,6 +186,7 @@
</div>
<!-- Permissions Tab -->
<<<<<<< HEAD
<div class="space-y-4">
@foreach($permissionGroups as $groupName => $group)
<div class="border rounded-lg overflow-hidden">
@@ -225,6 +246,22 @@
wire:change="togglePermission('{{ $permission['name'] }}')"
class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
=======
<div x-show="activeTab === 'permissions'" x-cloak>
<div class="space-y-6">
@foreach($permissionGroups as $group => $permissions)
<div class="border rounded-lg p-4">
<h3 class="text-lg font-semibold mb-4">{{ ucfirst($group) }}</h3>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
@foreach($permissions as $permission)
<div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
<span class="text-sm">{{ $permission->name }}</span>
<label class="switch">
<input type="checkbox"
@if($user->hasPermissionTo($permission)) checked @endif
wire:change="togglePermission('{{ $permission->name }}')">
<span class="slider round"></span>
>>>>>>> f97a7a84985ea300216ba3ea2ab4c31306e1659a
</label>
</div>
@endforeach
@@ -234,7 +271,11 @@
</div>
</div>
<<<<<<< HEAD
<!-- Pestaña de Proyectos -->
=======
<!-- Nueva Pestaña de Proyectos -->
>>>>>>> f97a7a84985ea300216ba3ea2ab4c31306e1659a
<div x-show="activeTab === 'projects'" x-cloak>
<div class="space-y-6">
<!-- Proyectos Actuales -->
@@ -300,6 +341,7 @@
transform: translateX(26px);
}
</style>
<<<<<<< HEAD
<script>
document.addEventListener('alpine:init', () => {
@@ -318,4 +360,6 @@
});
</script>
=======
>>>>>>> f97a7a84985ea300216ba3ea2ab4c31306e1659a
</x-layouts.app>