From 7e26b4d7de3f6de81ba1cf7f1eb4f5caa2b7380e Mon Sep 17 00:00:00 2001 From: Xeovalyte Date: Mon, 26 Sep 2022 16:23:45 +0200 Subject: [PATCH] completed mangerelatiecodes --- backend/index.js | 5 +- frontend/app.vue | 3 +- .../pages/settings/config/changeemail.vue | 12 +++ .../pages/settings/config/changepassword.vue | 12 +++ .../settings/config/managerelatiecodes.vue | 94 ++++++++++++++++++- frontend/pages/settings/index.vue | 17 +++- 6 files changed, 138 insertions(+), 5 deletions(-) create mode 100644 frontend/pages/settings/config/changeemail.vue create mode 100644 frontend/pages/settings/config/changepassword.vue diff --git a/backend/index.js b/backend/index.js index dfb7c94..03c1c07 100644 --- a/backend/index.js +++ b/backend/index.js @@ -69,12 +69,15 @@ app.post('/getrelatiecodes', async (req, res) => { } let relatiecodes = []; + let persons = []; snapshot.forEach(doc => { relatiecodes.push(doc.id) + const data = doc.data() + persons.push({ fullName: data.fullName, relatiecode: doc.id }) }); - res.status(200).send({ code: 'success', relatiecodes: relatiecodes }) + res.status(200).send({ code: 'success', relatiecodes: relatiecodes, persons: persons }) } catch (e) { diff --git a/frontend/app.vue b/frontend/app.vue index 39a64d2..6f9e090 100644 --- a/frontend/app.vue +++ b/frontend/app.vue @@ -29,6 +29,7 @@ const auth = ref(null) const userLoaded = ref(false) const userData = ref(null) const userPersons = ref([]) +const userAllPersons = ref([]) onMounted(() => { auth.value = getAuth() @@ -74,5 +75,5 @@ const getPersons = async (persons) => { const ledenlijst = ref([]) -provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth }) +provide('firebase', { db, ledenlijst, isAuthenticated, user, userData, userPersons, auth, userAllPersons, getPersons }) \ No newline at end of file diff --git a/frontend/pages/settings/config/changeemail.vue b/frontend/pages/settings/config/changeemail.vue new file mode 100644 index 0000000..2f8edb6 --- /dev/null +++ b/frontend/pages/settings/config/changeemail.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/frontend/pages/settings/config/changepassword.vue b/frontend/pages/settings/config/changepassword.vue new file mode 100644 index 0000000..bced0f4 --- /dev/null +++ b/frontend/pages/settings/config/changepassword.vue @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/frontend/pages/settings/config/managerelatiecodes.vue b/frontend/pages/settings/config/managerelatiecodes.vue index 33eb0f1..5df6562 100644 --- a/frontend/pages/settings/config/managerelatiecodes.vue +++ b/frontend/pages/settings/config/managerelatiecodes.vue @@ -1,12 +1,102 @@ \ No newline at end of file diff --git a/frontend/pages/settings/index.vue b/frontend/pages/settings/index.vue index 5087ab5..e896629 100644 --- a/frontend/pages/settings/index.vue +++ b/frontend/pages/settings/index.vue @@ -23,7 +23,22 @@

Account

-
+ + Beheer Personen + + +
+ + Change Password + + +
+ + Change Email + + +
+
Logout