diff --git a/src/components/nav.vue b/src/components/nav.vue
index 7842cdc..0b024b7 100644
--- a/src/components/nav.vue
+++ b/src/components/nav.vue
@@ -4,7 +4,7 @@
-
- {{ year }}
+ {{ year }}
@@ -34,20 +34,23 @@ export default {
data () {
return {
current_year: getYear(today),
- current_date: today,
+ selected_year: getYear(today),
}
},
computed: {
...mapGetters({
- years: "travail/years",
- })
+ available_years: "travail/years",
+ }),
+ years: function () {
+ return [...this.available_years, this.current_year].filter((v, i, a) => a.indexOf(v) === i)
+ }
},
methods: {
...mapActions('travail', {
'setRange': 'setRange',
}),
selectYear: function (year) {
- this.current_year=year
+ this.selected_year=year
this.setRange({
start: `${this.current_year}-01`,
end: `${this.current_year}-12`