wip: snapshot V2 cascade onglet 2 (sauvegarde avant chirurgie git-hygiene)

This commit is contained in:
Jules Neny
2026-05-06 15:37:13 +02:00
parent 5878c56888
commit e63d02a351
101 changed files with 188900 additions and 3959 deletions

View File

@@ -1,16 +1,18 @@
<template>
<div class="space-y-1.5">
<p class="text-xs font-bold uppercase tracking-widest" style="color: var(--nav-text-muted);">Fonction</p>
<p class="text-xs font-bold uppercase tracking-widest" style="color: var(--nav-text-muted);">Fonction (15)</p>
<div class="space-y-1">
<button
v-for="fn in FONCTIONS"
:key="fn"
@click="toggle(fn)"
:aria-pressed="modelValue.includes(fn)"
class="flex items-center gap-2.5 w-full rounded px-1 py-0.5 transition-all text-left hover:opacity-80"
:disabled="!modelValue.includes(fn) && modelValue.length >= 5"
class="flex items-center gap-2.5 w-full rounded px-1 py-0.5 transition-all text-left"
:class="!modelValue.includes(fn) && modelValue.length >= 5 ? 'cursor-not-allowed opacity-40' : 'hover:opacity-80'"
:style="modelValue.includes(fn) ? 'background: rgba(26,34,56,0.06);' : ''"
>
<!-- Case : affiche le rang de priorité si actif, sinon le nombre d'orgs -->
<!-- Case checkbox -->
<span
class="flex items-center justify-center shrink-0 text-xs font-bold transition-all"
style="width: 24px; height: 24px; border: 1.5px solid; border-radius: 4px;"
@@ -18,7 +20,7 @@
? 'background: var(--nav-primary); border-color: var(--nav-primary); color: var(--nav-text-on-primary);'
: 'background: var(--nav-bg-alt); border-color: var(--nav-bg-alt); color: var(--nav-text-muted);'"
>
{{ modelValue.includes(fn) ? (modelValue.indexOf(fn) + 1) : (counts[fn] ?? 0) }}
{{ counts[fn] ?? 0 }}
</span>
<!-- Label -->
<span
@@ -28,7 +30,7 @@
</button>
</div>
<p v-if="modelValue.length" class="text-xs pt-0.5" style="color: var(--nav-text-muted);">
{{ modelValue.length }} actif{{ modelValue.length > 1 ? 's' : '' }}
{{ modelValue.length }}/5 actif{{ modelValue.length > 1 ? 's' : '' }}
<button @click="emit('update:modelValue', [])" class="ml-2 underline hover:opacity-70">Effacer</button>
</p>
</div>
@@ -60,7 +62,7 @@ const emit = defineEmits<{
function toggle(fn: string) {
if (props.modelValue.includes(fn)) {
emit('update:modelValue', props.modelValue.filter(f => f !== fn))
} else {
} else if (props.modelValue.length < 5) {
emit('update:modelValue', [...props.modelValue, fn])
}
}