From 240d6741d520e3dc0df00a7ca219b82ad19d40ac Mon Sep 17 00:00:00 2001 From: JurreBrandsenInfoSupport <149962077+JurreBrandsenInfoSupport@users.noreply.github.com> Date: Wed, 22 May 2024 14:53:29 +0200 Subject: [PATCH] Privacy (#123) * Add examples in privacy statement * Add link to privacy in homepage --- .vscode/settings.json | 1 + src/app/page.tsx | 8 ++- src/app/privacy/page.tsx | 133 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 138 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 19c78ed..a140ddc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,6 +12,7 @@ "datasource", "datasources", "hookform", + "infosupport", "ISKA", "lucide", "nextjs", diff --git a/src/app/page.tsx b/src/app/page.tsx index c34b928..25492b8 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -6,6 +6,7 @@ import { type Session } from "next-auth"; import { db } from "~/server/db"; import RoleSelectionSkeleton from "~/components/loading/role-selection-loader"; import Buttons from "~/components/additional-buttons-homepage"; +import Link from "next/link"; const Home: React.FC = async () => { const session = await getServerAuthSession(); @@ -69,7 +70,12 @@ const Home: React.FC = async () => { We appreciate your willingness to share your expertise with us. Please be aware that the information you provide regarding your technical skills will be visible to colleagues{" "} - for the three goals described above. + for the three goals described above. For more details, please + refer to our{" "} + + {" "} + privacy policy. +
{/* If the user is logged in, show the SelectRole component */} diff --git a/src/app/privacy/page.tsx b/src/app/privacy/page.tsx index d0544cc..62e84b7 100644 --- a/src/app/privacy/page.tsx +++ b/src/app/privacy/page.tsx @@ -1,4 +1,11 @@ +import type { ColumnDef } from "@tanstack/react-table"; import Link from "next/link"; +import { + aggregateColumns, + columns, + type AggregatedSurveyResult, +} from "~/components/columns"; +import { DataTable } from "~/components/data-table"; import { Accordion, AccordionContent, @@ -7,6 +14,61 @@ import { } from "~/components/ui/accordion"; const PrivacyPage = () => { + const aggregatedDataByRole: Record< + string, + Record< + string, + { + name: string; + communicationPreferences: string[]; + counts: number[]; + } + > + > = { + role1: { + question1: { + name: "John Doe", + communicationPreferences: ["SLACK", "EMAIL", "WHATSAPP"], + counts: [1, 2, 3, 4], + }, + question2: { + name: "Jane Doe", + communicationPreferences: ["SIGNAL", "PHONE", "TEAMS"], + counts: [2, 3, 4, 5], + }, + }, + }; + + const dataByRoleAndQuestion: Record< + string, + Record< + string, + { + name: string; + email: string; + communicationPreferences: string[]; + answer: string; + }[] + > + > = { + role1: { + question1: [ + { + name: "Jane Doe", + email: "jane.doe@example.com", + communicationPreferences: ["SIGNAL", "PHONE", "TEAMS"], + answer: "0", + }, + { + name: "John Doe", + email: "john.doe@example.com", + communicationPreferences: ["SLACK", "EMAIL", "WHATSAPP"], + answer: "3", + }, + ], + }, + }; + return (+ In the 'find the expert' feature, we display an aggregate table + sorted by how many times a person indicated 'expert' for a + technique. This is to help you find the right person to ask for help +
+ {Object.keys(aggregatedDataByRole).map((role) => { + return ( ++ Furthermore, we list who is an expert in that technique. If several + participants have indicated for a technique that they are an expert + in that field, the order in which this table is sorted along will be + random. +
+ {Object.keys(dataByRoleAndQuestion).map((role) => { + return Object.keys(dataByRoleAndQuestion[role] ?? {}).map( + (question) => ( +- For questions regarding this privacy statement, please refer to the + For questions regarding this privacy statement, please refer to the{" "} - {" "} infosupport.com contact page . Here you will also find information who our data protection