2026-03-18 12:45:44 +01:00
|
|
|
<app>
|
2026-03-19 14:37:08 +01:00
|
|
|
<header class="site-header">
|
|
|
|
|
<div class="header-inner">
|
|
|
|
|
<div class="logo">
|
2026-03-30 14:47:09 +02:00
|
|
|
<span class="logo-icon">🎓</span>
|
2026-03-19 14:37:08 +01:00
|
|
|
<span class="logo-text">Parcoursup <span class="logo-light">Explorer</span></span>
|
|
|
|
|
</div>
|
2026-03-30 14:47:09 +02:00
|
|
|
<div class="header-badge badge-clickable" if={ state.selectedFormations.length > 0 } onclick={ scrollToComparateur }>
|
2026-03-19 14:37:08 +01:00
|
|
|
{ state.selectedFormations.length } sélection(s)
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
2026-03-18 12:45:44 +01:00
|
|
|
|
2026-03-19 14:37:08 +01:00
|
|
|
<div class="page">
|
2026-03-18 13:54:33 +01:00
|
|
|
|
2026-03-18 13:21:19 +01:00
|
|
|
<div if={ !state.selected }>
|
|
|
|
|
<search-bar onsearch={ launchSearch }></search-bar>
|
2026-03-18 12:45:44 +01:00
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
<div class="detail-card comparateur-card" ref="comparateur" if={ state.selectedFormations.length > 0 }>
|
2026-03-18 14:03:43 +01:00
|
|
|
<h3>Comparateur</h3>
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
<p>Choisis ton profil pour estimer tes chances d'intégration.</p>
|
2026-03-18 14:03:43 +01:00
|
|
|
|
|
|
|
|
<div class="compare-controls">
|
|
|
|
|
<div>
|
2026-03-18 14:17:03 +01:00
|
|
|
<label><b>Note moyenne :</b></label><br />
|
2026-03-18 14:03:43 +01:00
|
|
|
<input
|
|
|
|
|
type="number"
|
|
|
|
|
min="0"
|
|
|
|
|
max="20"
|
|
|
|
|
step="0.1"
|
|
|
|
|
value={ state.note }
|
|
|
|
|
oninput={ updateNote }
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
2026-03-18 14:17:03 +01:00
|
|
|
<label><b>Série :</b></label><br />
|
|
|
|
|
<select onchange={ updateSerie }>
|
2026-03-18 14:03:43 +01:00
|
|
|
<option value="general" selected={ state.serie === 'general' }>Général</option>
|
|
|
|
|
<option value="techno" selected={ state.serie === 'techno' }>Technologique</option>
|
|
|
|
|
<option value="pro" selected={ state.serie === 'pro' }>Professionnel</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
2026-03-18 14:17:03 +01:00
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label><b>Trier par :</b></label><br />
|
|
|
|
|
<select onchange={ updateSort }>
|
|
|
|
|
<option value="nom" selected={ state.sortBy === 'nom' }>Nom</option>
|
|
|
|
|
<option value="ville" selected={ state.sortBy === 'ville' }>Ville</option>
|
|
|
|
|
<option value="taux" selected={ state.sortBy === 'taux' }>Taux d'accès</option>
|
2026-03-30 14:47:09 +02:00
|
|
|
<option value="estimation" selected={ state.sortBy === 'estimation' }>Estimation</option>
|
2026-03-18 14:17:03 +01:00
|
|
|
</select>
|
|
|
|
|
</div>
|
2026-03-18 14:03:43 +01:00
|
|
|
</div>
|
|
|
|
|
|
2026-03-19 14:37:08 +01:00
|
|
|
<button class="btn btn-danger" onclick={ clearSelection }>Vider la sélection</button>
|
2026-03-18 14:31:03 +01:00
|
|
|
|
2026-03-18 14:03:43 +01:00
|
|
|
<hr />
|
|
|
|
|
|
2026-03-18 13:54:33 +01:00
|
|
|
<h3>Formations sélectionnées</h3>
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
<div each={ f in getSortedSelection() } key={ f.id } class={ getCardClass(f) }>
|
2026-03-18 14:03:43 +01:00
|
|
|
<h4>{ f.nom }</h4>
|
2026-03-18 14:17:03 +01:00
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
<p><b>Établissement :</b> { f.etablissement }</p>
|
2026-03-18 14:03:43 +01:00
|
|
|
<p><b>Ville :</b> { f.ville }</p>
|
|
|
|
|
<p><b>Filière :</b> { f.filiere }</p>
|
2026-03-30 14:47:09 +02:00
|
|
|
<p><b>Capacité :</b> { f.capacite }</p>
|
2026-03-18 14:03:43 +01:00
|
|
|
<p><b>Taux d'accès :</b> { f.tauxAcces }%</p>
|
2026-03-18 14:17:03 +01:00
|
|
|
|
2026-03-18 13:54:33 +01:00
|
|
|
<p>
|
2026-03-30 14:47:09 +02:00
|
|
|
<b>Intégrés :</b>
|
2026-03-18 14:17:03 +01:00
|
|
|
Général { f.pctGeneral }% /
|
|
|
|
|
Techno { f.pctTechno }% /
|
|
|
|
|
Pro { f.pctPro }%
|
2026-03-18 13:54:33 +01:00
|
|
|
</p>
|
2026-03-18 14:17:03 +01:00
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
<p class="estimation-result">
|
2026-03-18 14:31:03 +01:00
|
|
|
<span class={ getEstimateClass(f) }>
|
|
|
|
|
{ estimateFormation(f) }
|
|
|
|
|
</span>
|
2026-03-30 14:47:09 +02:00
|
|
|
<span class="estimation-detail">{ getEstimateDetail(f) }</span>
|
2026-03-18 14:31:03 +01:00
|
|
|
</p>
|
2026-03-18 14:17:03 +01:00
|
|
|
|
2026-03-19 14:37:08 +01:00
|
|
|
<button class="btn btn-small btn-outline" onclick={ () => removeFromSelection(f.id) }>
|
2026-03-18 14:17:03 +01:00
|
|
|
Retirer
|
|
|
|
|
</button>
|
2026-03-18 13:54:33 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-19 14:37:08 +01:00
|
|
|
|
|
|
|
|
<p class="result-count" if={ state.hasSearched && !state.loading }>
|
|
|
|
|
<b>{ state.query }</b> — { state.total } résultat(s)
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<map-view results={ state.results }></map-view>
|
|
|
|
|
|
|
|
|
|
<div class="layout">
|
|
|
|
|
<div>
|
|
|
|
|
<result-list
|
|
|
|
|
results={ state.results }
|
|
|
|
|
hasSearched={ state.hasSearched }
|
|
|
|
|
loading={ state.loading }
|
|
|
|
|
ondetail={ showDetail }
|
|
|
|
|
onselect={ addToSelection }>
|
|
|
|
|
</result-list>
|
|
|
|
|
|
|
|
|
|
<div class="pagination" if={ state.total > state.limit }>
|
|
|
|
|
<button class="btn btn-outline" onclick={ previousPage } disabled={ state.page === 1 }>
|
|
|
|
|
← Précédent
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<span class="page-info">Page { state.page } / { getTotalPages() }</span>
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-outline" onclick={ nextPage } disabled={ state.page === getTotalPages() }>
|
|
|
|
|
Suivant →
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-18 13:21:19 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div if={ state.selected }>
|
|
|
|
|
<detail-view
|
|
|
|
|
formation={ state.selected }
|
|
|
|
|
onback={ backToList }>
|
|
|
|
|
</detail-view>
|
|
|
|
|
</div>
|
2026-03-18 12:45:44 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
state: {
|
|
|
|
|
loading: false,
|
|
|
|
|
hasSearched: false,
|
|
|
|
|
results: [],
|
2026-03-18 13:54:33 +01:00
|
|
|
selected: null,
|
2026-03-18 14:03:43 +01:00
|
|
|
selectedFormations: [],
|
|
|
|
|
note: 12,
|
2026-03-18 14:17:03 +01:00
|
|
|
serie: 'general',
|
2026-03-18 14:54:01 +01:00
|
|
|
sortBy: 'nom',
|
|
|
|
|
query: '',
|
2026-03-30 14:47:09 +02:00
|
|
|
filters: {},
|
2026-03-18 14:54:01 +01:00
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
total: 0
|
2026-03-18 14:17:03 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onMounted() {
|
|
|
|
|
const saved = localStorage.getItem('selectionFormations')
|
|
|
|
|
|
|
|
|
|
if (saved) {
|
|
|
|
|
try {
|
|
|
|
|
this.update({
|
|
|
|
|
selectedFormations: JSON.parse(saved)
|
|
|
|
|
})
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error(e)
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-30 14:47:09 +02:00
|
|
|
|
|
|
|
|
window.addEventListener('hashchange', () => {
|
|
|
|
|
this.handleRoute()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.handleRoute()
|
2026-03-18 12:45:44 +01:00
|
|
|
},
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
// ===== ROUTER =====
|
|
|
|
|
handleRoute() {
|
|
|
|
|
const hash = window.location.hash || '#/'
|
|
|
|
|
const path = hash.slice(1) || '/'
|
|
|
|
|
|
|
|
|
|
if (path.startsWith('/formation/')) {
|
|
|
|
|
const id = decodeURIComponent(path.replace('/formation/', ''))
|
|
|
|
|
this.loadFormationById(id)
|
|
|
|
|
} else {
|
|
|
|
|
if (this.state.selected) {
|
|
|
|
|
this.update({ selected: null })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async loadFormationById(id) {
|
|
|
|
|
for (let i = 0; i < this.state.results.length; i++) {
|
|
|
|
|
if (this.state.results[i].id === id) {
|
|
|
|
|
this.update({ selected: this.state.results[i] })
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < this.state.selectedFormations.length; i++) {
|
|
|
|
|
if (this.state.selectedFormations[i].id === id) {
|
|
|
|
|
this.update({ selected: this.state.selectedFormations[i] })
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const parts = id.split('-')
|
|
|
|
|
const searchTerm = parts.slice(1).join(' ').substring(0, 30)
|
|
|
|
|
|
|
|
|
|
if (searchTerm) {
|
|
|
|
|
const data = await window.fetchFormations(searchTerm, 10, 0)
|
|
|
|
|
|
|
|
|
|
if (data.results && data.results.length > 0) {
|
|
|
|
|
for (let i = 0; i < data.results.length; i++) {
|
|
|
|
|
const f = window.createFormation(data.results[i])
|
|
|
|
|
if (f.id === id) {
|
|
|
|
|
this.update({ selected: f })
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.update({ selected: window.createFormation(data.results[0]) })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('Erreur chargement formation:', error)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// ===== NAVIGATION =====
|
|
|
|
|
showDetail(index) {
|
|
|
|
|
const formation = this.state.results[index]
|
|
|
|
|
this.update({ selected: formation })
|
|
|
|
|
window.location.hash = '#/formation/' + encodeURIComponent(formation.id)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
backToList() {
|
|
|
|
|
this.update({ selected: null })
|
|
|
|
|
window.location.hash = '#/'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
scrollToComparateur() {
|
|
|
|
|
var el = this.$('[ref="comparateur"]')
|
|
|
|
|
if (el) {
|
|
|
|
|
el.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// ===== RECHERCHE AVEC FILTRES =====
|
|
|
|
|
async launchSearch(query, filters) {
|
2026-03-18 12:45:44 +01:00
|
|
|
this.update({
|
|
|
|
|
loading: true,
|
|
|
|
|
hasSearched: true,
|
2026-03-18 14:54:01 +01:00
|
|
|
selected: null,
|
|
|
|
|
query: query,
|
2026-03-30 14:47:09 +02:00
|
|
|
filters: filters || {},
|
2026-03-18 14:54:01 +01:00
|
|
|
page: 1
|
|
|
|
|
})
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
window.location.hash = '#/'
|
2026-03-18 14:54:01 +01:00
|
|
|
await this.loadPage(1)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async loadPage(page) {
|
2026-03-30 14:47:09 +02:00
|
|
|
this.update({ loading: true })
|
2026-03-18 12:45:44 +01:00
|
|
|
|
|
|
|
|
try {
|
2026-03-18 14:54:01 +01:00
|
|
|
const offset = (page - 1) * this.state.limit
|
|
|
|
|
|
|
|
|
|
const data = await window.fetchFormations(
|
|
|
|
|
this.state.query,
|
|
|
|
|
this.state.limit,
|
2026-03-30 14:47:09 +02:00
|
|
|
offset,
|
|
|
|
|
this.state.filters
|
2026-03-18 14:54:01 +01:00
|
|
|
)
|
|
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
const formations = []
|
|
|
|
|
|
|
|
|
|
if (data.results) {
|
|
|
|
|
for (let i = 0; i < data.results.length; i++) {
|
2026-03-18 12:49:28 +01:00
|
|
|
const raw = data.results[i]
|
2026-03-18 14:17:03 +01:00
|
|
|
formations.push(window.createFormation(raw))
|
2026-03-18 12:45:44 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.update({
|
|
|
|
|
results: formations,
|
2026-03-18 14:54:01 +01:00
|
|
|
total: data.total_count ? data.total_count : 0,
|
|
|
|
|
page: page,
|
2026-03-18 12:45:44 +01:00
|
|
|
loading: false
|
|
|
|
|
})
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(error)
|
|
|
|
|
this.update({
|
|
|
|
|
results: [],
|
2026-03-18 14:54:01 +01:00
|
|
|
total: 0,
|
2026-03-18 12:45:44 +01:00
|
|
|
loading: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2026-03-18 14:54:01 +01:00
|
|
|
getTotalPages() {
|
|
|
|
|
return Math.ceil(this.state.total / this.state.limit)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async nextPage() {
|
|
|
|
|
if (this.state.page < this.getTotalPages()) {
|
|
|
|
|
await this.loadPage(this.state.page + 1)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async previousPage() {
|
|
|
|
|
if (this.state.page > 1) {
|
|
|
|
|
await this.loadPage(this.state.page - 1)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
// ===== SÉLECTION =====
|
2026-03-18 13:44:30 +01:00
|
|
|
addToSelection(index) {
|
|
|
|
|
const formation = this.state.results[index]
|
|
|
|
|
const selection = [...this.state.selectedFormations]
|
|
|
|
|
|
|
|
|
|
let exists = false
|
|
|
|
|
|
2026-03-18 13:54:33 +01:00
|
|
|
for (let i = 0; i < selection.length; i++) {
|
|
|
|
|
if (selection[i].id === formation.id) {
|
|
|
|
|
exists = true
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-18 13:44:30 +01:00
|
|
|
|
2026-03-18 13:54:33 +01:00
|
|
|
if (!exists) {
|
|
|
|
|
selection.push(formation)
|
|
|
|
|
this.update({ selectedFormations: selection })
|
2026-03-18 14:17:03 +01:00
|
|
|
localStorage.setItem('selectionFormations', JSON.stringify(selection))
|
2026-03-18 13:54:33 +01:00
|
|
|
}
|
|
|
|
|
},
|
2026-03-18 13:44:30 +01:00
|
|
|
|
2026-03-18 14:17:03 +01:00
|
|
|
removeFromSelection(id) {
|
|
|
|
|
const newSelection = []
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < this.state.selectedFormations.length; i++) {
|
|
|
|
|
const f = this.state.selectedFormations[i]
|
|
|
|
|
|
|
|
|
|
if (f.id !== id) {
|
|
|
|
|
newSelection.push(f)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
this.update({ selectedFormations: newSelection })
|
2026-03-18 14:17:03 +01:00
|
|
|
localStorage.setItem('selectionFormations', JSON.stringify(newSelection))
|
2026-03-18 14:03:43 +01:00
|
|
|
},
|
|
|
|
|
|
2026-03-18 14:31:03 +01:00
|
|
|
clearSelection() {
|
2026-03-30 14:47:09 +02:00
|
|
|
this.update({ selectedFormations: [] })
|
2026-03-18 14:31:03 +01:00
|
|
|
localStorage.setItem('selectionFormations', JSON.stringify([]))
|
|
|
|
|
},
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
// ===== COMPARATEUR =====
|
|
|
|
|
updateNote(e) { this.update({ note: Number(e.target.value) }) },
|
|
|
|
|
updateSerie(e) { this.update({ serie: e.target.value }) },
|
|
|
|
|
updateSort(e) { this.update({ sortBy: e.target.value }) },
|
2026-03-18 14:17:03 +01:00
|
|
|
|
|
|
|
|
getSortedSelection() {
|
|
|
|
|
const selection = [...this.state.selectedFormations]
|
|
|
|
|
|
|
|
|
|
if (this.state.sortBy === 'taux') {
|
|
|
|
|
selection.sort((a, b) => b.tauxAcces - a.tauxAcces)
|
|
|
|
|
} else if (this.state.sortBy === 'ville') {
|
|
|
|
|
selection.sort((a, b) => a.ville.localeCompare(b.ville))
|
2026-03-30 14:47:09 +02:00
|
|
|
} else if (this.state.sortBy === 'estimation') {
|
|
|
|
|
selection.sort((a, b) => this.getScore(b) - this.getScore(a))
|
2026-03-18 14:17:03 +01:00
|
|
|
} else {
|
|
|
|
|
selection.sort((a, b) => a.nom.localeCompare(b.nom))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return selection
|
|
|
|
|
},
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
// ===== ESTIMATION =====
|
|
|
|
|
getSeriePercent(f) {
|
|
|
|
|
if (this.state.serie === 'general') return f.pctGeneral || 0
|
|
|
|
|
if (this.state.serie === 'techno') return f.pctTechno || 0
|
|
|
|
|
if (this.state.serie === 'pro') return f.pctPro || 0
|
|
|
|
|
return 0
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getScore(f) {
|
2026-03-18 14:03:43 +01:00
|
|
|
let score = 0
|
2026-03-30 14:47:09 +02:00
|
|
|
const note = this.state.note
|
|
|
|
|
const tauxAcces = f.tauxAcces || 0
|
|
|
|
|
const seriePct = this.getSeriePercent(f)
|
2026-03-18 14:03:43 +01:00
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
if (tauxAcces >= 80) score += 30
|
|
|
|
|
else if (tauxAcces >= 50) score += 24
|
|
|
|
|
else if (tauxAcces >= 30) score += 16
|
|
|
|
|
else if (tauxAcces >= 15) score += 8
|
|
|
|
|
else score += 2
|
2026-03-18 14:03:43 +01:00
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
if (note >= 17) score += 40
|
|
|
|
|
else if (note >= 15) score += 32
|
|
|
|
|
else if (note >= 13) score += 22
|
|
|
|
|
else if (note >= 11) score += 14
|
|
|
|
|
else if (note >= 9) score += 6
|
|
|
|
|
else score += 0
|
2026-03-18 14:03:43 +01:00
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
if (seriePct >= 60) score += 30
|
|
|
|
|
else if (seriePct >= 40) score += 24
|
|
|
|
|
else if (seriePct >= 20) score += 16
|
|
|
|
|
else if (seriePct >= 5) score += 8
|
|
|
|
|
else score += 0
|
2026-03-18 14:03:43 +01:00
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
return score
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
estimateFormation(f) {
|
|
|
|
|
const score = this.getScore(f)
|
|
|
|
|
|
|
|
|
|
if (score >= 85) return 'Très favorable'
|
|
|
|
|
if (score >= 65) return 'Favorable'
|
|
|
|
|
if (score >= 45) return 'Possible'
|
|
|
|
|
if (score >= 25) return 'Difficile'
|
|
|
|
|
return 'Très difficile'
|
2026-03-18 14:31:03 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getEstimateClass(f) {
|
|
|
|
|
const result = this.estimateFormation(f)
|
|
|
|
|
|
2026-03-30 14:47:09 +02:00
|
|
|
if (result === 'Très favorable') return 'estimate tres-favorable'
|
2026-03-18 14:31:03 +01:00
|
|
|
if (result === 'Favorable') return 'estimate favorable'
|
|
|
|
|
if (result === 'Possible') return 'estimate possible'
|
2026-03-30 14:47:09 +02:00
|
|
|
if (result === 'Difficile') return 'estimate difficile'
|
|
|
|
|
return 'estimate tres-difficile'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getCardClass(f) {
|
|
|
|
|
const result = this.estimateFormation(f)
|
|
|
|
|
|
|
|
|
|
if (result === 'Très favorable') return 'card card-tres-favorable'
|
|
|
|
|
if (result === 'Favorable') return 'card card-favorable'
|
|
|
|
|
if (result === 'Possible') return 'card card-possible'
|
|
|
|
|
if (result === 'Difficile') return 'card card-difficile'
|
|
|
|
|
return 'card card-tres-difficile'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getEstimateDetail(f) {
|
|
|
|
|
const tauxAcces = f.tauxAcces || 0
|
|
|
|
|
const seriePct = this.getSeriePercent(f)
|
|
|
|
|
const serieName = this.state.serie === 'general' ? 'Gén' : (this.state.serie === 'techno' ? 'Techno' : 'Pro')
|
|
|
|
|
|
|
|
|
|
return 'Taux ' + tauxAcces + '% · ' + serieName + ' ' + seriePct + '% · Note ' + this.state.note + '/20'
|
2026-03-18 12:45:44 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2026-03-19 14:37:08 +01:00
|
|
|
</app>
|