From 9b16bdb4dcf99ebca8c3863e2fe98aaf91bbb7bb Mon Sep 17 00:00:00 2001 From: Xeovalyte Date: Thu, 22 Sep 2022 17:10:36 +0200 Subject: [PATCH] added account info --- frontend/pages/settings/admin/ledenlijst.vue | 2 +- frontend/pages/settings/index.vue | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/frontend/pages/settings/admin/ledenlijst.vue b/frontend/pages/settings/admin/ledenlijst.vue index 0106fb6..31db455 100644 --- a/frontend/pages/settings/admin/ledenlijst.vue +++ b/frontend/pages/settings/admin/ledenlijst.vue @@ -133,7 +133,7 @@ const csvToJson = (csv) => { if (groups[1] === 'Week') groups[1] = 'Vrijdag' } - ledenlijst.value.push({ relatiecode: result[i].Relatiecode, fullName: result[i]['Volledige naam (1)'].join(' '), email: [result[i]['E-mail'], result[i]['2e E-mail']], groups: groups, diploma: result[i]['Diploma dropdown 1'] }) + ledenlijst.value.push({ relatiecode: result[i].Relatiecode, fullName: result[i]['Volledige naam (1)'].join(' '), email: [result[i]['E-mail'], result[i]['2e E-mail']], groups: [...new Set(groups)], diploma: result[i]['Diploma dropdown 1'] }) } uploadLedenlijst() diff --git a/frontend/pages/settings/index.vue b/frontend/pages/settings/index.vue index f09d923..5087ab5 100644 --- a/frontend/pages/settings/index.vue +++ b/frontend/pages/settings/index.vue @@ -4,7 +4,19 @@

Info

- Username + Email: {{ user.email }} +
+
+
+ Personen: {{ userPersons.map(a => a.fullName).join(', ')}} +
+
+
+ Groups: {{ groups.join(', ') }} +
+
+
+ Diploma: {{ userPersons.map(a => a.diploma).filter(n => n !== '').join(', ')}}
@@ -43,7 +55,11 @@ definePageMeta({ title: 'Settings' }) -const { auth } = inject('firebase') +const { auth, userData, userPersons, user } = inject('firebase') + +const groups = computed(() => { + return [...new Set(userPersons.value.map(a => a.groups.join()).join().split(','))] +}) const logout = () => { signOut(auth.value)