diff --git a/src/components/user/Jobs.vue b/src/components/user/Jobs.vue index 5733292..642b1d4 100644 --- a/src/components/user/Jobs.vue +++ b/src/components/user/Jobs.vue @@ -11,12 +11,8 @@ {{ date.getDate() }}.{{ date.getMonth() + 1 }}.{{ - date.getFullYear() - }} - bis {{ toDate.getDate() }}.{{ toDate.getMonth() + 1 }}.{{ - toDate.getFullYear() - }} + >{{ monthArray[date.getMonth()] }} + {{ date.getFullYear() }} @@ -25,10 +21,25 @@ - -
- -
+ + + Woche vom {{ week.startDate.getDate() }}.{{ + week.startDate.getMonth() + 1 + }}.{{ week.startDate.getFullYear() }} bis + {{ week.endDate.getDate() }}.{{ week.endDate.getMonth() + 1 }}.{{ + week.endDate.getFullYear() + }} + + + +
+ + + +
+
+
+
@@ -43,46 +54,43 @@ export default { return { keyboard_arrow_left: mdiChevronLeft, keyboard_arrow_right: mdiChevronRight, - date: new Date() + date: new Date(), + monthArray: [ + 'Januar', + 'Februar', + 'März', + 'April', + 'Mai', + 'Juni', + 'Juli', + 'August', + 'September', + 'Oktober', + 'November', + 'Dezember' + ] } }, created() { - this.createDays(this.date) + this.createMonth(this.date) }, methods: { ...mapActions({ - createDays: 'user/createDays' + createMonth: 'jobs/createMonth' }), changeMonth(value) { if (value === -1) { - this.date = new Date( - this.date.getFullYear(), - this.date.getMonth(), - this.date.getDate() - 1 - ) + this.date = new Date(this.date.getFullYear(), this.date.getMonth() - 1) } else { - this.date = new Date( - this.date.getFullYear(), - this.date.getMonth(), - this.date.getDate() + 1 - ) + this.date = new Date(this.date.getFullYear(), this.date.getMonth() + 1) } - this.createDays(this.date) - }, - test(day) { - let index = this.days.indexOf(day) - console.log(index, index % 3) - return true + this.createMonth(this.date) } }, computed: { ...mapGetters({ - days: 'user/days', - loading: 'user/loading' - }), - toDate() { - return new Date(new Date().setDate(this.date.getDate() + 10)) - } + month: 'jobs/month' + }) } } diff --git a/src/components/user/Jobs/Day.vue b/src/components/user/Jobs/Day.vue index 59ae525..a7c8138 100644 --- a/src/components/user/Jobs/Day.vue +++ b/src/components/user/Jobs/Day.vue @@ -1,28 +1,61 @@