Skip to content
Snippets Groups Projects
Commit 6ac13f8b authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

improve forecasts vue

parent fb6cd07d
No related branches found
No related tags found
No related merge requests found
......@@ -30,17 +30,15 @@
<div v-if="display=='forecastsByNames'">
<h3>Prévisions par membres</h3>
<div class="table-responsive">
<table class="table previsions">
<table class="table table-striped">
<tbody>
<tr v-for="forecast in wwResult.forecastsByNames" :key="forecast.member.uid">
<th scope="row">{{ forecast.member.uid }}</th>
<td class="p-0">
<table class="table table-borderless mb-0">
<tr class="d-flex justify-content-between" v-for="date in forecast.forecasts" :key="date.date">
<td>{{ date.date | formatDateHeure }}</td>
<td>{{ date.proba * 100 }} %</td>
</tr>
</table>
<div class="d-flex justify-content-between p-3" v-for="date in forecast.forecasts" :key="date.date">
<div>{{ date.date | formatDateHeure }}</div>
<div>{{ date.proba * 100 }} %</div>
</div>
</td>
</tr>
</tbody>
......@@ -50,17 +48,15 @@
<div v-if="display=='forecastsByDates'">
<h3>Prévisions par dates</h3>
<div class="table-responsive">
<table class="table previsions">
<table class="table table-striped">
<tbody>
<tr v-for="forecast in wwResult.forecastsByDates" :key="forecast.date">
<th scope="row">{{ forecast.date | formatDateHeure }}</th>
<td class="p-0">
<table class="table table-borderless mb-0">
<tr class="d-flex justify-content-between" v-for="member in forecast.forecasts" :key="member.member.uid">
<td>{{ member.member.uid }}</td>
<td>{{ member.proba * 100 }} %</td>
</tr>
</table>
<div class="d-flex justify-content-between p-3" v-for="member in forecast.forecasts" :key="member.member.uid">
<div>{{ member.member.uid }}</div>
<div>{{ member.proba * 100 }} %</div>
</div>
</td>
</tr>
</tbody>
......@@ -167,9 +163,7 @@ export default {
}
}
// On tri les résultats pour être sûr
// result['byName'].sort((a, b) => (a.member.uid.toLowerCase() > b.member.uid.toLowerCase()) ? 1 : -1)
// result['byDate'].sort((a, b) => (a.date > b.date) ? 1 : -1)
result['byDate'].sort((a, b) => (a.date > b.date) ? 1 : -1)
return {
permutations_nb: data.wwResult.permutations_nb,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment