diff --git a/frontend/pages/settings/about.vue b/frontend/pages/settings/about.vue deleted file mode 100644 index 382e776..0000000 --- a/frontend/pages/settings/about.vue +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/frontend/pages/settings/admin/ledenlijst.vue b/frontend/pages/settings/admin/ledenlijst.vue index e711633..ad80ebd 100644 --- a/frontend/pages/settings/admin/ledenlijst.vue +++ b/frontend/pages/settings/admin/ledenlijst.vue @@ -79,6 +79,20 @@ const submitLedenlijst = () => { } const csvToJson = (csv) => { + let arr = csv.split('\n'); + + var result = []; + var headers = arr[0].split(';'); + for(var i = 1; i < arr.length; i++) { + var data = arr[i].split(';'); + var obj = {}; + for(var j = 0; j < data.length; j++) { + obj[headers[j].trim()] = data[j].trim(); + } + result.push(obj); + } + + /* let array = csv.split("\n") let result = []; @@ -109,10 +123,10 @@ const csvToJson = (csv) => { } else obj[headers[j]] = properties[j] } - result.push(obj) } - if (!Object.hasOwn(result[0], 'Relatiecode') || !Object.hasOwn(result[0], 'Volledige naam (1)') || !Object.hasOwn(result[0], 'E-mail') || !Object.hasOwn(result[0], '2e E-mail') || !Object.hasOwn(result[0], 'Verenigingssporten') || !Object.hasOwn(result[0], 'Diploma dropdown 1\r')) return toast.error('Missing properties') + */ + if (!Object.hasOwn(result[0], 'Relatiecode') || !Object.hasOwn(result[0], 'Volledige naam (1)') || !Object.hasOwn(result[0], 'E-mail') || !Object.hasOwn(result[0], '2e E-mail') || !Object.hasOwn(result[0], 'Verenigingssporten') || !Object.hasOwn(result[0], 'Diploma dropdown 1')) return toast.error('Missing properties') ledenlijst.value = [] @@ -130,8 +144,7 @@ const csvToJson = (csv) => { groups.shift() 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: [...new Set(groups)], diploma: result[i]['Diploma dropdown 1\r'] }) + ledenlijst.value.push({ relatiecode: result[i].Relatiecode, fullName: result[i]['Volledige naam (1)'], 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 987120b..8799e27 100644 --- a/frontend/pages/settings/index.vue +++ b/frontend/pages/settings/index.vue @@ -18,6 +18,11 @@
Diploma: {{ userPersons.map(a => a.diploma).filter(n => n !== '').join(', ')}}
+
+ + Privacy Policy + +
@@ -82,4 +87,4 @@ const logout = () => { console.log(error) }) } - \ No newline at end of file + diff --git a/frontend/pages/settings/privacypolicy.vue b/frontend/pages/settings/privacypolicy.vue new file mode 100644 index 0000000..68c9aea --- /dev/null +++ b/frontend/pages/settings/privacypolicy.vue @@ -0,0 +1,23 @@ + + +