From 6d669e5ae44d86d91fccce26830a7f96b9581d42 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Wed, 7 Jul 2021 15:07:46 +0200 Subject: [PATCH] Feat: structure for month and form --- src/components/CreateMonth.vue | 31 ++++++++++++++++++++ src/components/MonthForm.vue | 42 ++++++++++++++++++++++++++++ src/components/MonthPresentation.vue | 38 +++++++++++++++++++++++++ src/components/MonthsUl.vue | 31 ++++++++++++++++++++ src/components/months.vue | 29 ------------------- src/store/travail/index.js | 5 ++-- src/views/home.vue | 9 ++++-- 7 files changed, 151 insertions(+), 34 deletions(-) create mode 100644 src/components/CreateMonth.vue create mode 100644 src/components/MonthForm.vue create mode 100644 src/components/MonthPresentation.vue create mode 100644 src/components/MonthsUl.vue delete mode 100644 src/components/months.vue diff --git a/src/components/CreateMonth.vue b/src/components/CreateMonth.vue new file mode 100644 index 0000000..8a47327 --- /dev/null +++ b/src/components/CreateMonth.vue @@ -0,0 +1,31 @@ + + + + + + diff --git a/src/components/MonthForm.vue b/src/components/MonthForm.vue new file mode 100644 index 0000000..6ac19ee --- /dev/null +++ b/src/components/MonthForm.vue @@ -0,0 +1,42 @@ + + + + + + diff --git a/src/components/MonthPresentation.vue b/src/components/MonthPresentation.vue new file mode 100644 index 0000000..7445323 --- /dev/null +++ b/src/components/MonthPresentation.vue @@ -0,0 +1,38 @@ + + + + + + diff --git a/src/components/MonthsUl.vue b/src/components/MonthsUl.vue new file mode 100644 index 0000000..ae0f95c --- /dev/null +++ b/src/components/MonthsUl.vue @@ -0,0 +1,31 @@ + + + + + + diff --git a/src/components/months.vue b/src/components/months.vue deleted file mode 100644 index 49f8175..0000000 --- a/src/components/months.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - diff --git a/src/store/travail/index.js b/src/store/travail/index.js index f8a343c..b36b468 100644 --- a/src/store/travail/index.js +++ b/src/store/travail/index.js @@ -70,8 +70,9 @@ const travail = { } }, getters: { - count (state) {return state.months.length}, - months (state) { + cCount (state) {return state.months.length}, + TheEmptyMonth (state) {return state.empty}, + Months (state) { return state.months.sort((a, b) => new Date(b.date) - new Date(a.date)) }, }, diff --git a/src/views/home.vue b/src/views/home.vue index bef18ac..f4417c0 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -2,17 +2,20 @@

Home

Mois

- + +