diff --git a/resources/js/Pages/Dashboard.vue b/resources/js/Pages/Dashboard.vue index 970a4d3..3846810 100644 --- a/resources/js/Pages/Dashboard.vue +++ b/resources/js/Pages/Dashboard.vue @@ -6,12 +6,23 @@ import { computed } from 'vue'; const props = defineProps({ stats: Object, - quizzes: Array + quizzes: Array, + top_candidates: Array }); const page = usePage(); const user = computed(() => page.props.auth.user); -const layout = computed(() => user.value.role === 'admin' ? AdminLayout : AuthenticatedLayout); +const layout = computed(() => user.value?.role === 'admin' ? AdminLayout : AuthenticatedLayout); + +const getStatusColor = (status) => { + const colors = { + 'en_attente': 'bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-400', + 'en_cours': 'bg-indigo-100 text-indigo-700 dark:bg-indigo-900/30 dark:text-indigo-400', + 'termine': 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400', + 'refuse': 'bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400' + }; + return colors[status] || colors['en_attente']; +}; @@ -24,29 +35,85 @@ const layout = computed(() => user.value.role === 'admin' ? AdminLayout : Authen -
Bienvenue dans votre espace d'administration.
+ +| Candidat | +Score Pondéré | +Statut | +Actions | +
|---|---|---|---|
|
+ {{ candidate.name }}
+ {{ candidate.email }}
+ |
+
+
+ {{ candidate.weighted_score }} / 20
+
+ |
+ + + {{ candidate.status }} + + | ++ + + + | +
| + Aucun candidat pour le moment. + | +|||