Enhance candidates management: add city field, drag-and-drop ranking persistence, AI analysis popover, and CV preview

This commit is contained in:
mrKamoo
2026-04-22 15:26:15 +02:00
parent 174f229b5d
commit 6f00da6d10
13 changed files with 480 additions and 116 deletions

View File

@@ -29,7 +29,7 @@ const navItems = [
},
{
route: 'admin.candidates.index',
match: 'admin.candidates.*',
match: ['admin.candidates.index', 'admin.candidates.show'],
label: 'Candidats',
icon: 'M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2 M9 11a4 4 0 100-8 4 4 0 000 8z M23 21v-2a4 4 0 00-3-3.87 M16 3.13a4 4 0 010 7.75',
},
@@ -50,6 +50,11 @@ const navItems = [
label: 'Comparateur',
icon: 'M18 20V10 M12 20V4 M6 20v-6',
},
{
route: 'admin.candidates.selected',
label: 'Selection',
icon: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z',
},
];
const superAdminItems = [
@@ -74,8 +79,13 @@ const superAdminItems = [
];
const isActive = (item) => {
if (item.match) return route().current(item.match);
return route().current(item.route);
if (!item.match) return route().current(item.route);
if (Array.isArray(item.match)) {
return item.match.some(m => route().current(m));
}
return route().current(item.match);
};
</script>
@@ -165,20 +175,22 @@ const isActive = (item) => {
<!-- Footer sidebar : user + collapse -->
<div class="px-3 py-3 border-t border-white/[0.07] shrink-0">
<!-- User info (sidebar ouverte) -->
<div v-if="isSidebarOpen" class="flex items-center gap-2.5 mb-3">
<div class="w-8 h-8 rounded-full bg-highlight flex items-center justify-center text-[12px] font-black text-highlight-dark shrink-0">
{{ $page.props.auth.user.name.charAt(0) }}
</div>
<div class="overflow-hidden flex-1 min-w-0">
<div class="text-[12px] font-bold text-white truncate">{{ $page.props.auth.user.name }}</div>
<div class="text-[10px] text-white/40 truncate">{{ $page.props.auth.user.role }}</div>
</div>
<Dropdown align="right" width="48">
<div v-if="isSidebarOpen" class="mb-3 w-full">
<Dropdown align="top-right" width="48">
<template #trigger>
<button class="p-1.5 rounded-lg text-white/40 hover:text-white hover:bg-white/10 transition-colors">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/>
</svg>
<button class="w-full flex items-center gap-2.5 text-left p-1.5 -ml-1.5 rounded-xl hover:bg-white/5 transition-colors">
<div class="w-8 h-8 rounded-full bg-highlight flex items-center justify-center text-[12px] font-black text-highlight-dark shrink-0">
{{ $page.props.auth.user.name.charAt(0) }}
</div>
<div class="overflow-hidden flex-1 min-w-0">
<div class="text-[12px] font-bold text-white truncate">{{ $page.props.auth.user.name }}</div>
<div class="text-[10px] text-white/40 truncate">{{ $page.props.auth.user.role }}</div>
</div>
<div class="text-white/40">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/>
</svg>
</div>
</button>
</template>
<template #content>