fixed date

This commit is contained in:
Vito0912 2024-12-14 18:06:07 +01:00
parent 578b877c0c
commit 4a32807417
No known key found for this signature in database
GPG Key ID: 29A3D509FE70B237

View File

@ -105,6 +105,9 @@ export default {
computed: { computed: {
isAdminOrUp() { isAdminOrUp() {
return this.$store.getters['user/getIsAdminOrUp'] return this.$store.getters['user/getIsAdminOrUp']
},
user() {
return this.$store.state.user.user
} }
}, },
methods: { methods: {
@ -132,8 +135,8 @@ export default {
this.showYearInReview = !this.showYearInReview this.showYearInReview = !this.showYearInReview
}, },
eventOptions() { eventOptions() {
if(this.$store.getters['libraries/getCurrentLibrary']) { if(this.user) {
const oldestDate = this.$store.getters['libraries/getCurrentLibrary'].createdAt const oldestDate = this.user.createdAt
if (oldestDate) { if (oldestDate) {
const date = new Date(oldestDate) const date = new Date(oldestDate)
const oldestYear = date.getFullYear() const oldestYear = date.getFullYear()