added account info

This commit is contained in:
Xeovalyte 2022-09-22 17:10:36 +02:00
parent d5e324978c
commit 9b16bdb4dc
2 changed files with 19 additions and 3 deletions

View File

@ -133,7 +133,7 @@ const csvToJson = (csv) => {
if (groups[1] === 'Week') groups[1] = 'Vrijdag' 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() uploadLedenlijst()

View File

@ -4,7 +4,19 @@
<h1 class="text-xl ml-2 font-bold">Info</h1> <h1 class="text-xl ml-2 font-bold">Info</h1>
<div class="container"> <div class="container">
<div class="item"> <div class="item">
Username Email: <b>{{ user.email }}</b>
</div>
<div class="divider" />
<div class="item">
Personen: <b>{{ userPersons.map(a => a.fullName).join(', ')}}</b>
</div>
<div class="divider" />
<div class="item">
Groups: <b>{{ groups.join(', ') }}</b>
</div>
<div v-if="userPersons.map(a => a.diploma).filter(n => n !== '').join('')" class="divider" />
<div v-if="userPersons.map(a => a.diploma).filter(n => n !== '').join('')" class="item">
Diploma: <b>{{ userPersons.map(a => a.diploma).filter(n => n !== '').join(', ')}}</b>
</div> </div>
</div> </div>
</div> </div>
@ -43,7 +55,11 @@ definePageMeta({
title: 'Settings' 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 = () => { const logout = () => {
signOut(auth.value) signOut(auth.value)