From 2b5c66fbdf254a607cf557ff6ead9a0fa62b15ae Mon Sep 17 00:00:00 2001 From: swsrkty Date: Tue, 19 Sep 2023 20:07:33 +0530 Subject: [PATCH 1/6] feat: Limit participation in a poll --- pages/index.tsx | 18 +++++++- pages/poll/[id]/[secret].tsx | 1 + src/components/copyText/CopyTextMain.tsx | 3 +- src/components/copyText/index.tsx | 4 +- src/components/poll/AdminPollInfo.tsx | 9 ++++ src/components/poll/MarkTimes.tsx | 5 +- src/components/poll/MarkTimesOneOnOne.tsx | 56 +++++++++++++++++++++++ src/components/poll/PollTableAdmin.tsx | 2 +- src/components/poll/PollTableVoter.tsx | 34 ++++++++++++-- src/components/poll/SubmitFinalTime.tsx | 14 ++++-- src/models/poll.ts | 4 ++ src/styles/poll.scss | 52 +++++++++++++++------ 12 files changed, 174 insertions(+), 28 deletions(-) create mode 100644 src/components/poll/MarkTimesOneOnOne.tsx diff --git a/pages/index.tsx b/pages/index.tsx index 0cc809b..1750ec7 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -24,13 +24,15 @@ const Home = (): JSX.Element => { pollTitle: string; pollLocation: string; pollDescription: string; + pollType: string; }>({ pollTitle: "", pollLocation: "", pollDescription: "", + pollType: "Group-poll", }); - const { pollTitle, pollLocation, pollDescription } = pollDetails; + const { pollTitle, pollLocation, pollDescription, pollType } = pollDetails; const [pollTimes, setTimes] = useState([]); const [disabled, setDisabled] = useState(false); @@ -63,6 +65,7 @@ const Home = (): JSX.Element => { title: pollTitle, description: pollDescription, location: pollLocation, + type: pollType, secret: encryptedSecret, times: pollTimes, }; @@ -194,6 +197,19 @@ const Home = (): JSX.Element => { onChange={handlePollDetailsChange} /> + + + + + + + +