feat(codev): demo - tabs Carto/Annuaire + Solution+Alliance sans Surprise
This commit is contained in:
@@ -7,63 +7,82 @@
|
|||||||
<p class="subtitle">10 personnes fictives. Clique sur un mode pour voir les matchs.</p>
|
<p class="subtitle">10 personnes fictives. Clique sur un mode pour voir les matchs.</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<ClientOnly>
|
<div class="codev-tabs">
|
||||||
<CodevGraph
|
<button :class="{ active: tab === 'carto' }" @click="tab = 'carto'" type="button">Carto</button>
|
||||||
:fiches="fiches"
|
<button :class="{ active: tab === 'annuaire' }" @click="tab = 'annuaire'" type="button">Annuaire</button>
|
||||||
:matches="matches"
|
|
||||||
:mode="mode"
|
|
||||||
/>
|
|
||||||
<template #fallback>
|
|
||||||
<div class="graph-fallback">Chargement du graphe...</div>
|
|
||||||
</template>
|
|
||||||
</ClientOnly>
|
|
||||||
|
|
||||||
<!-- Bandeau info mode actif -->
|
|
||||||
<div v-if="mode !== 'none'" class="mode-banner">
|
|
||||||
<span>
|
|
||||||
Mode {{ MODE_LABELS[mode] }} actif -
|
|
||||||
{{ matches.length }} connexion{{ matches.length !== 1 ? 's' : '' }} trouvee{{ matches.length !== 1 ? 's' : '' }}.
|
|
||||||
</span>
|
|
||||||
<button class="banner-clear" @click="setMode('none')" type="button">Effacer</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 3 boutons matching identiques a carto.vue -->
|
<div v-if="tab === 'carto'">
|
||||||
<div class="matching-controls">
|
<ClientOnly>
|
||||||
<button
|
<CodevGraph
|
||||||
:class="{ active: mode === 'solution' }"
|
:fiches="fiches"
|
||||||
style="--mode-color: #22c55e"
|
:matches="matches"
|
||||||
@click="setMode('solution')"
|
:mode="mode"
|
||||||
type="button"
|
/>
|
||||||
>
|
<template #fallback>
|
||||||
Solution
|
<div class="graph-fallback">Chargement du graphe...</div>
|
||||||
<span class="hint">besoin - offre</span>
|
</template>
|
||||||
</button>
|
</ClientOnly>
|
||||||
<button
|
|
||||||
:class="{ active: mode === 'alliance' }"
|
<!-- Bandeau info mode actif -->
|
||||||
style="--mode-color: #f97316"
|
<div v-if="mode !== 'none'" class="mode-banner">
|
||||||
@click="setMode('alliance')"
|
<span>
|
||||||
type="button"
|
Mode {{ MODE_LABELS[mode] }} actif -
|
||||||
>
|
{{ matches.length }} connexion{{ matches.length !== 1 ? 's' : '' }} trouvee{{ matches.length !== 1 ? 's' : '' }}.
|
||||||
Alliance
|
</span>
|
||||||
<span class="hint">besoins partages</span>
|
<button class="banner-clear" @click="setMode('none')" type="button">Effacer</button>
|
||||||
</button>
|
</div>
|
||||||
<button
|
|
||||||
:class="{ active: mode === 'surprise' }"
|
<!-- Boutons matching -->
|
||||||
style="--mode-color: #3b82f6"
|
<div class="matching-controls">
|
||||||
@click="setMode('surprise')"
|
<button
|
||||||
type="button"
|
:class="{ active: mode === 'solution' }"
|
||||||
>
|
style="--mode-color: #22c55e"
|
||||||
Surprise
|
@click="setMode('solution')"
|
||||||
<span class="hint">offres partagees</span>
|
type="button"
|
||||||
</button>
|
>
|
||||||
<button
|
Solution
|
||||||
v-if="mode !== 'none'"
|
<span class="hint">besoin - offre</span>
|
||||||
class="reset"
|
</button>
|
||||||
@click="setMode('none')"
|
<button
|
||||||
type="button"
|
:class="{ active: mode === 'alliance' }"
|
||||||
>
|
style="--mode-color: #f97316"
|
||||||
Effacer
|
@click="setMode('alliance')"
|
||||||
</button>
|
type="button"
|
||||||
|
>
|
||||||
|
Alliance
|
||||||
|
<span class="hint">besoins partages</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="mode !== 'none'"
|
||||||
|
class="reset"
|
||||||
|
@click="setMode('none')"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
Effacer
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="tab === 'annuaire'" class="annuaire-wrap">
|
||||||
|
<div class="annuaire-scroll">
|
||||||
|
<table class="annuaire-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="col-nom">Prénom</th>
|
||||||
|
<th class="col-besoin">Besoin</th>
|
||||||
|
<th class="col-offre">Ce que j'offre</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="f in fiches" :key="f.id" class="annuaire-row">
|
||||||
|
<td class="col-nom">{{ f.nom }}</td>
|
||||||
|
<td class="col-besoin">{{ f.besoin }}</td>
|
||||||
|
<td class="col-offre">{{ f.offre }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -73,6 +92,8 @@
|
|||||||
import type { CodevFiche, CodevMatch } from '~/types/codev'
|
import type { CodevFiche, CodevMatch } from '~/types/codev'
|
||||||
import { computeMatches } from '~/utils/codev/matching'
|
import { computeMatches } from '~/utils/codev/matching'
|
||||||
|
|
||||||
|
const tab = ref<'carto' | 'annuaire'>('carto')
|
||||||
|
|
||||||
// 10 fiches sans hashtags — textes enrichis pour que scoreDirect discrimine bien les 3 modes :
|
// 10 fiches sans hashtags — textes enrichis pour que scoreDirect discrimine bien les 3 modes :
|
||||||
//
|
//
|
||||||
// Solution (scoreDirect besoinA vs offreB) :
|
// Solution (scoreDirect besoinA vs offreB) :
|
||||||
|
|||||||
Reference in New Issue
Block a user