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 (

@@ -109,16 +171,81 @@ const PrivacyPage = () => { -

+

+ Example of how your data is presented in this Tech Survey +

+

+ 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 ( +
+

+ Aggregated Results +

+ + columns={aggregateColumns} + data={Object.keys(aggregatedDataByRole[role] ?? {}).map( + (question) => { + const rowData = aggregatedDataByRole[role]?.[question]; + return { + name: rowData?.name ?? "", + email: question, + communicationPreferences: + rowData?.communicationPreferences ?? [], + "0": rowData?.counts[0] ?? 0, + "1": rowData?.counts[1] ?? 0, + "2": rowData?.counts[2] ?? 0, + "3": rowData?.counts[3] ?? 0, + }; + }, + )} + /> +
+ ); + })} + +

+ 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) => ( +
+

+ {question} +

+
+ [] + } + data={dataByRoleAndQuestion[role]?.[question] ?? []} + /> +
+
+
+ ), + ); + })} + +

Contact

- 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