Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Fix update options bug (#1116)

Luke Vellab55ebebda751
diff --git a/apps/web/src/components/poll-context.tsx b/apps/web/src/components/poll-context.tsx
index 5ed1d3e17..fe6837c44 100644
--- a/apps/web/src/components/poll-context.tsx
+++ b/apps/web/src/components/poll-context.tsx
@@ -172,6 +172,12 @@ function createOptionsContextValue(
targetTimeZone: string,
sourceTimeZone: string | null,
): OptionsContextValue {
+ if (pollOptions.length === 0) {
+ return {
+ pollType: "date",
+ options: [],
+ };
+ }
if (pollOptions[0].duration > 0) {
return {
pollType: "timeSlot",
diff --git a/apps/web/src/components/poll/desktop-poll.tsx b/apps/web/src/components/poll/desktop-poll.tsx
index b36e17994..bf7c5685c 100644
--- a/apps/web/src/components/poll/desktop-poll.tsx
+++ b/apps/web/src/components/poll/desktop-poll.tsx
@@ -272,7 +272,7 @@ const DesktopPoll: React.FunctionComponent = () => {
"scrollbar-thin hover:scrollbar-thumb-gray-400 scrollbar-thumb-gray-300 scrollbar-track-gray-100 relative z-10 flex-grow overflow-auto scroll-smooth",
)}
>
- <table className="w-full table-auto border-separate border-spacing-0 ">
+ <table className="w-full table-auto border-separate border-spacing-0 ">
<thead>
<PollHeader />
</thead>
diff --git a/apps/web/src/components/poll/desktop-poll/participant-row-form.tsx b/apps/web/src/components/poll/desktop-poll/participant-row-form.tsx
index 63dc5ab64..e2b3addd4 100644
--- a/apps/web/src/components/poll/desktop-poll/participant-row-form.tsx
+++ b/apps/web/src/components/poll/desktop-poll/participant-row-form.tsx
@@ -54,7 +54,7 @@ const ParticipantRowForm = ({
<tr className={cn("group", className)}>
<td
style={{ minWidth: 240, maxWidth: 240 }}
- className="sticky left-0 z-10 bg-white px-4"
+ className="sticky left-0 z-10 h-12 bg-white px-4"
>
<div className="flex items-center justify-between gap-x-2.5">
{name ? (
diff --git a/apps/web/src/components/poll/desktop-poll/participant-row.tsx b/apps/web/src/components/poll/desktop-poll/participant-row.tsx
index 2db0d22b1..371b07a19 100644
--- a/apps/web/src/components/poll/desktop-poll/participant-row.tsx
+++ b/apps/web/src/components/poll/desktop-poll/participant-row.tsx
@@ -38,7 +38,7 @@ export const ParticipantRowView: React.FunctionComponent<{
>
<td
style={{ minWidth: 240, maxWidth: 240 }}
- className="sticky left-0 z-10 bg-white px-4"
+ className="sticky left-0 z-10 h-12 bg-white px-4"
>
<div className="flex max-w-full items-center justify-between gap-x-4">
<UserAvatar name={name} showName={true} isYou={isYou} />
diff --git a/packages/backend/trpc/routers/polls.ts b/packages/backend/trpc/routers/polls.ts
index 6c91efc0d..e54f2fadb 100644
--- a/packages/backend/trpc/routers/polls.ts
+++ b/packages/backend/trpc/routers/polls.ts
@@ -193,7 +193,6 @@ export const polls = router({
if (end) {
return {
- start: new Date(`${start}Z`),
startTime: input.timeZone
? dayjs(start).tz(input.timeZone, true).toDate()
: dayjs(start).utc(true).toDate(),
@@ -202,7 +201,6 @@ export const polls = router({
};
} else {
return {
- start: new Date(start.substring(0, 10) + "T00:00:00Z"),
startTime: dayjs(start).utc(true).toDate(),
pollId,
};