diff --git a/frontend/app.vue b/frontend/app.vue index ef584ea..e3a7b30 100644 --- a/frontend/app.vue +++ b/frontend/app.vue @@ -31,6 +31,7 @@ const userData = ref(null) const userPersons = ref([]) const userAllPersons = ref([]) const calEvents = ref([]) +const news = ref(null) onMounted(() => { auth.value = getAuth() @@ -48,6 +49,9 @@ onMounted(() => { getPersons(userData.value.relatiecodes) } + if (!userData.value.sendNews && route.path === '/news/newmessage') navigateTo('/') + if (!userData.value.admin && route.path.startsWith('/settings/admin')) navigateTo('/') + isAuthenticated.value = true } else { @@ -76,5 +80,5 @@ const getPersons = async (persons) => { const ledenlijst = ref([]) -provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth, userAllPersons, getPersons, calEvents }) +provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth, userAllPersons, getPersons, calEvents, news }) \ No newline at end of file diff --git a/frontend/components/layout/Navbar.vue b/frontend/components/layout/Navbar.vue index fe5912e..12d5af2 100644 --- a/frontend/components/layout/Navbar.vue +++ b/frontend/components/layout/Navbar.vue @@ -5,7 +5,7 @@ Home - + News diff --git a/frontend/pages/news.vue b/frontend/pages/news.vue deleted file mode 100644 index b8ed543..0000000 --- a/frontend/pages/news.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/frontend/pages/news/index.vue b/frontend/pages/news/index.vue new file mode 100644 index 0000000..cf63ffe --- /dev/null +++ b/frontend/pages/news/index.vue @@ -0,0 +1,78 @@ + + + \ No newline at end of file diff --git a/frontend/pages/news/newmessage.vue b/frontend/pages/news/newmessage.vue new file mode 100644 index 0000000..afd7d3d --- /dev/null +++ b/frontend/pages/news/newmessage.vue @@ -0,0 +1,70 @@ +