Feat: reverse month order

This commit is contained in:
Bertrand Benjamin 2021-08-03 08:05:33 +02:00
parent 6a0b0b9c6e
commit 820bf435e8
2 changed files with 25 additions and 6 deletions

View File

@ -66,7 +66,7 @@ const travail = {
Count (state) {return state.months.length}, Count (state) {return state.months.length},
TheEmptyMonth (state) {return {...state.empty}}, TheEmptyMonth (state) {return {...state.empty}},
MonthsDate (state) { MonthsDate (state) {
return Object.keys(state.months).sort() return Object.keys(state.months).sort().reverse()
//return state.months.sort((a, b) => new Date(b.date) - new Date(a.date)) //return state.months.sort((a, b) => new Date(b.date) - new Date(a.date))
}, },
getMonth: (state) => (date) => { getMonth: (state) => (date) => {

View File

@ -1,10 +1,20 @@
<template> <template>
<h1>Home</h1> <h1>Home</h1>
<section id="months"> <section id="selector">
</section>
<div id="content">
<section id="months">
<h2> Mois </h2> <h2> Mois </h2>
<create-month></create-month> <create-month></create-month>
<months-list></months-list> <months-list></months-list>
</section> </section>
<section id="stats">
<h2>Résumé</h2>
</section>
</div>
</template> </template>
<script> <script>
@ -33,7 +43,16 @@ export default {
</script> </script>
<style scoped> <style scoped>
#content {
display: inline-flex;
flex-direction: row;
background-color: red;
margin: 0;
}
#content > * {
margin: 10px;
}
#months { #months {
width: 70%; flex-basis: 60%;
} }
</style> </style>