working version
This commit is contained in:
16
frontend/src/views/Admin.vue
Normal file → Executable file
16
frontend/src/views/Admin.vue
Normal file → Executable file
@@ -4,8 +4,7 @@
|
||||
|
||||
<!-- Loading state -->
|
||||
<div v-if="loading" class="text-center py-12">
|
||||
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto"></div>
|
||||
<p class="mt-4 text-gray-600">Chargement du dashboard...</p>
|
||||
<LoadingLogo size="large" text="Chargement du dashboard..." />
|
||||
</div>
|
||||
|
||||
<!-- Admin content -->
|
||||
@@ -579,16 +578,14 @@
|
||||
|
||||
<!-- Loading State -->
|
||||
<div v-if="ticketsLoading" class="text-center py-12">
|
||||
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto mb-4"></div>
|
||||
<p class="text-gray-600">Chargement des tickets...</p>
|
||||
<LoadingLogo size="large" text="Chargement des tickets..." />
|
||||
</div>
|
||||
|
||||
<!-- Tickets Grid -->
|
||||
<div v-else-if="filteredTickets.length > 0" class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6">
|
||||
<div v-if="!ticketsLoading && filteredTickets.length > 0" class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6">
|
||||
<div
|
||||
v-for="ticket in filteredTickets"
|
||||
:key="ticket.id"
|
||||
v-if="ticket && ticket.id"
|
||||
class="bg-white border border-gray-200 rounded-xl shadow-sm hover:shadow-lg transition-all duration-200 cursor-pointer group ticket-card"
|
||||
@click="showTicketDetails(ticket)"
|
||||
>
|
||||
@@ -674,7 +671,7 @@
|
||||
</div>
|
||||
|
||||
<!-- No Tickets -->
|
||||
<div v-else class="text-center py-12">
|
||||
<div v-if="!ticketsLoading && filteredTickets.length === 0" class="text-center py-12">
|
||||
<div class="w-24 h-24 mx-auto mb-4 bg-gray-100 rounded-full flex items-center justify-center">
|
||||
<svg class="w-12 h-12 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||
@@ -1244,6 +1241,7 @@ import {
|
||||
} from 'lucide-vue-next'
|
||||
import { formatDistanceToNow } from 'date-fns'
|
||||
import { fr } from 'date-fns/locale'
|
||||
import LoadingLogo from '@/components/LoadingLogo.vue'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const toast = useToast()
|
||||
@@ -1852,7 +1850,7 @@ function openImageModal(imageUrl) {
|
||||
|
||||
function getMediaUrl(path) {
|
||||
if (!path) return ''
|
||||
return path.startsWith('http') ? path : `http://localhost:8000${path}`
|
||||
return path.startsWith('http') ? path : `${import.meta.env.VITE_API_URL || 'http://localhost:8002'}${path}`
|
||||
}
|
||||
|
||||
// Nouvelles fonctions pour les filtres et actions rapides
|
||||
@@ -2126,4 +2124,4 @@ watch(showTicketEditModal, (newValue) => {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user