From 692068bc5d12dfe2c24fa8870ee56b80969eaee3 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Fri, 27 Oct 2023 12:03:23 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Include=20email=20address=20and=20y?= =?UTF-8?q?ear=20in=20csv=20exporter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/poll/manage-poll/use-csv-exporter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts b/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts index 45b75c5a6..db73156db 100644 --- a/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts +++ b/apps/web/src/components/poll/manage-poll/use-csv-exporter.ts @@ -14,11 +14,10 @@ export const useCsvExporter = () => { return { exportToCsv: () => { const header = [ - t("participantCount", { - count: participants.length, - }), + t("name"), + t("email"), ...options.map((decodedOption) => { - const day = `${decodedOption.dow} ${decodedOption.day} ${decodedOption.month}`; + const day = `${decodedOption.dow} ${decodedOption.day} ${decodedOption.month} ${decodedOption.year}`; return decodedOption.type === "date" ? day : `${day} ${decodedOption.startTime} - ${decodedOption.endTime}`; @@ -27,6 +26,7 @@ export const useCsvExporter = () => { const rows = participants.map((participant) => { return [ participant.name, + participant.email, ...poll.options.map((option) => { const vote = participant.votes.find((vote) => { return vote.optionId === option.id;