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

improve previsions page

parent da7e0daf
No related branches found
No related tags found
No related merge requests found
...@@ -7,16 +7,15 @@ ...@@ -7,16 +7,15 @@
}"> }">
<span v-if="isDispo">{{ $t("membre.dispo") }}</span> <span v-if="isDispo">{{ $t("membre.dispo") }}</span>
<span v-else <span v-else
>&nbsp; >&nbsp;{{
{{
dateDispo == null dateDispo == null
? "N/A" ? "N/A"
: nbPendingCertifs + : nbPendingCertifs +
" (&nbsp;" + " (&nbsp;" +
$d(new Date(dateDispo * 1000), "short") + $d(new Date(dateDispo * 1000), "short") +
")" ")"
}}</span }}
> </span>
</span> </span>
</template> </template>
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<tbody> <tbody>
<tr v-for="member in membersSorted" :key="member.uid"> <tr v-for="member in membersSorted" :key="member.uid">
<td @click="redirect(member.hash)"> <td @click="redirect(member.hash)">
<div class="d-flex uid-content"> <div class="d-flex">
<div <div
class="d-flex flex-column align-items-center justify-content-evenly flex-grow-1"> class="d-flex flex-column align-items-center justify-content-evenly flex-grow-1">
<div class="d-flex justify-content-center mw-100"> <div class="d-flex justify-content-center mw-100">
......
...@@ -59,33 +59,36 @@ ...@@ -59,33 +59,36 @@
}) })
) )
"> ">
<th scope="row"> <td class="td-uid">
<span <span class="text-truncate mw-100 d-inline-block">
v-if="$favourites.list.includes(forecast.member.uid)" <span
>&nbsp;</span v-if="
> $favourites.list.includes(forecast.member.uid)
{{ forecast.member.uid }} "
<BadgeStatus :membre="forecast.member" /> >&nbsp;</span
</th> >{{ forecast.member.uid }}
<td class="p-0"> </span>
</td>
<td>
<div <div
class="d-flex justify-content-between p-3" class="p-date d-flex justify-content-evenly gap-1 align-items-center"
v-for="date in forecast.forecasts" v-for="date in forecast.forecasts"
:key="date.date"> :key="date.date">
<div <div
class="forecast_date me-3" class="text-center"
v-if="date.date < 9999999999"> v-if="date.date < 9999999999">
{{ $d(new Date(date.date * 1000), "short") }} {{ $d(new Date(date.date * 1000), "short") }}
{{ $t("time.a") }} {{ $t("time.a") }}&nbsp;{{
{{
$d(new Date(date.date * 1000), "hour").replace( $d(new Date(date.date * 1000), "hour").replace(
" ", " ",
"&nbsp;" "&nbsp;"
) )
}} }}
</div> </div>
<div class="forecast_date me-3" v-else>N/A</div> <div class="text-center" v-else>N/A</div>
<div>{{ Math.round(date.proba * 100) }}&nbsp;%</div> <div class="badge bg-info">
{{ Math.round(date.proba * 100) }}&nbsp;%
</div>
</div> </div>
</td> </td>
</tr> </tr>
...@@ -101,35 +104,37 @@ ...@@ -101,35 +104,37 @@
<tr <tr
v-for="forecast in wwResult.forecastsByDates" v-for="forecast in wwResult.forecastsByDates"
:key="forecast.date"> :key="forecast.date">
<th <td class="text-center" v-if="forecast.date < 9999999999">
scope="row"
class="forecast_date"
v-if="forecast.date < 9999999999">
{{ $d(new Date(forecast.date * 1000), "short") }} {{ $d(new Date(forecast.date * 1000), "short") }}
{{ $t("time.a") }} {{ $t("time.a") }}&nbsp;{{
{{ $d(new Date(forecast.date * 1000), "hour") }} $d(new Date(forecast.date * 1000), "hour").replace(
</th> " ",
<th scope="row" class="forecast_date" v-else>N/A</th> "&nbsp;"
<td class="p-0"> )
<div class="list-group rounded-0"> }}
</td>
<td v-else>N/A</td>
<td class="p-0 td-uid">
<div class="list-group">
<nuxt-link <nuxt-link
class="list-group-item list-group-item-action border-0 d-flex justify-content-between p-3" class="list-group-item list-group-item-action border-0 d-flex justify-content-between align-items-center"
:to=" :to="
localePath('/membre/?hash=' + member.member.hash) localePath('/membre/?hash=' + member.member.hash)
" "
v-for="member in forecast.forecasts" v-for="member in forecast.forecasts"
:key="member.member.uid"> :key="member.member.uid">
<div class="me-3"> <div class="mw-100 text-center">
<span <span class="text-truncate d-inline-block mw-100">
v-if=" <span
$favourites.list.includes(member.member.uid) v-if="
" $favourites.list.includes(member.member.uid)
>&nbsp;</span "
> >&nbsp;</span
{{ member.member.uid }} >
<BadgeStatus :membre="member.member" /> {{ member.member.uid }}
</span>
</div> </div>
<div> <div class="badge bg-info">
{{ Math.round(member.proba * 100) }}&nbsp;% {{ Math.round(member.proba * 100) }}&nbsp;%
</div> </div>
</nuxt-link> </nuxt-link>
...@@ -271,15 +276,33 @@ export default { ...@@ -271,15 +276,33 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.p-date,
.list-group-item {
flex-direction: column;
&:not(:last-child) {
border-bottom: 1px solid var(--border-color) !important;
}
}
.list-group-item { .list-group-item {
background: transparent; background: transparent;
&:hover { &:hover {
background: var(--bg-secondary-color); background: var(--bg-secondary-color);
color: var(--txt-primary-color); color: var(--txt-primary-color);
} }
} }
.forecast_date { .td-uid {
min-width: 150px; width: 50%;
}
@media (min-width: 576px) {
.p-date,
.list-group-item {
flex-direction: row;
padding: 0.5rem;
}
} }
</style> </style>
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