mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 18:26:34 +02:00
uncommit
This commit is contained in:
parent
d203ca7b6b
commit
00df1a2e40
5 changed files with 78 additions and 42 deletions
|
@ -40,7 +40,7 @@ import {
|
|||
InviteCard,
|
||||
InviteCardForm,
|
||||
InviteCardGeneral,
|
||||
} from "@/app/[locale]/create/invite-card";
|
||||
} from "@/app/[locale]/(admin)/create/invite-card";
|
||||
import {
|
||||
PageContainer,
|
||||
PageContent,
|
||||
|
@ -426,8 +426,8 @@ export function CreateForm() {
|
|||
<div className="max-w-xl grow">
|
||||
<CreateFormInput />
|
||||
</div>
|
||||
<div className="rounded-md border bg-gray-100 px-5 py-4">
|
||||
<h2 className="text-muted-foreground mb-1 text-sm">Preview</h2>
|
||||
<div className="hidden rounded-md border bg-gray-100 px-5 py-4 lg:block">
|
||||
<div className="text-muted-foreground mb-1 text-sm">Preview</div>
|
||||
<CreateFormPreview />
|
||||
</div>
|
||||
</form>
|
|
@ -1,18 +1,14 @@
|
|||
import { Button } from "@rallly/ui/button";
|
||||
import { ArrowLeftIcon, ChevronRightIcon, XIcon } from "lucide-react";
|
||||
import { ChevronRightIcon, XIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
|
||||
import { CreateForm } from "@/app/[locale]/create/create-form";
|
||||
import {
|
||||
PageContainer,
|
||||
PageContent,
|
||||
PageHeader,
|
||||
} from "@/app/components/page-layout";
|
||||
import { CreateForm } from "@/app/[locale]/(admin)/create/create-form";
|
||||
import { PageContainer, PageContent } from "@/app/components/page-layout";
|
||||
import { getTranslation } from "@/app/i18n";
|
||||
|
||||
export default async function Page({ params }: { params: { locale: string } }) {
|
||||
return (
|
||||
<PageContainer className="flex flex-col bg-white">
|
||||
<PageContainer className="flex flex-col bg-gray-50">
|
||||
<PageContent className="grow">
|
||||
<div className="mb-4 flex items-center justify-between">
|
||||
<div className="text-muted-foreground flex items-center gap-x-4 text-sm">
|
|
@ -52,12 +52,13 @@ model User {
|
|||
customerId String? @map("customer_id")
|
||||
subscriptionId String? @unique @map("subscription_id")
|
||||
|
||||
comments Comment[]
|
||||
polls Poll[]
|
||||
watcher Watcher[]
|
||||
events Event[]
|
||||
subscription Subscription? @relation(fields: [subscriptionId], references: [id])
|
||||
accounts Account[]
|
||||
comments Comment[]
|
||||
polls Poll[]
|
||||
watcher Watcher[]
|
||||
events Event[]
|
||||
subscription Subscription? @relation(fields: [subscriptionId], references: [id])
|
||||
accounts Account[]
|
||||
schedulingPolls SchedulingPoll[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
|
@ -127,35 +128,35 @@ enum PollStatus {
|
|||
}
|
||||
|
||||
model Poll {
|
||||
id String @id @unique @map("id")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
id String @id @unique @map("id")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
deadline DateTime?
|
||||
title String
|
||||
description String?
|
||||
location String?
|
||||
userId String @map("user_id")
|
||||
timeZone String? @map("time_zone")
|
||||
closed Boolean @default(false) // @deprecated
|
||||
status PollStatus @default(live)
|
||||
deleted Boolean @default(false)
|
||||
deletedAt DateTime? @map("deleted_at")
|
||||
touchedAt DateTime @default(now()) @map("touched_at")
|
||||
participantUrlId String @unique @map("participant_url_id")
|
||||
adminUrlId String @unique @map("admin_url_id")
|
||||
eventId String? @unique @map("event_id")
|
||||
hideParticipants Boolean @default(false) @map("hide_participants")
|
||||
hideScores Boolean @default(false) @map("hide_scores")
|
||||
disableComments Boolean @default(false) @map("disable_comments")
|
||||
requireParticipantEmail Boolean @default(false) @map("require_participant_email")
|
||||
userId String @map("user_id")
|
||||
timeZone String? @map("time_zone")
|
||||
closed Boolean @default(false) // @deprecated
|
||||
status PollStatus @default(live)
|
||||
deleted Boolean @default(false)
|
||||
deletedAt DateTime? @map("deleted_at")
|
||||
touchedAt DateTime @default(now()) @map("touched_at")
|
||||
participantUrlId String @unique @map("participant_url_id")
|
||||
adminUrlId String @unique @map("admin_url_id")
|
||||
eventId String? @unique @map("event_id")
|
||||
hideParticipants Boolean @default(false) @map("hide_participants")
|
||||
hideScores Boolean @default(false) @map("hide_scores")
|
||||
disableComments Boolean @default(false) @map("disable_comments")
|
||||
requireParticipantEmail Boolean @default(false) @map("require_participant_email")
|
||||
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
event Event? @relation(fields: [eventId], references: [id])
|
||||
options Option[]
|
||||
participants Participant[]
|
||||
watchers Watcher[]
|
||||
comments Comment[]
|
||||
votes Vote[]
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
event Event? @relation(fields: [eventId], references: [id])
|
||||
options Option[]
|
||||
participants Participant[]
|
||||
watchers Watcher[]
|
||||
comments Comment[]
|
||||
votes Vote[]
|
||||
|
||||
@@index([userId], type: Hash)
|
||||
@@map("polls")
|
||||
|
@ -171,7 +172,7 @@ model Event {
|
|||
duration Int @default(0) @map("duration_minutes")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
Poll Poll?
|
||||
Poll Poll?
|
||||
|
||||
@@index([userId], type: Hash)
|
||||
@@map("events")
|
||||
|
@ -205,6 +206,45 @@ model Participant {
|
|||
@@map("participants")
|
||||
}
|
||||
|
||||
model SchedulingPoll {
|
||||
id String @id @default(cuid())
|
||||
userId String @map("user_id")
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
prompt String?
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
eventTitle String @map("event_title")
|
||||
eventDescription String? @map("event_description")
|
||||
eventLocation String? @map("event_location")
|
||||
eventTimeZone String? @map("time_zone")
|
||||
eventDuration Int? @map("event_duration_minutes")
|
||||
pollOptions DateTime[] @map("poll_options")
|
||||
|
||||
responses SchedulingPollResponse[]
|
||||
|
||||
@@index([userId], type: Hash)
|
||||
@@map("scheduling_polls")
|
||||
}
|
||||
|
||||
model SchedulingPollResponse {
|
||||
id String @id @default(cuid())
|
||||
userId String @map("user_id")
|
||||
name String
|
||||
email String
|
||||
timeZone String @map("time_zone")
|
||||
locale String
|
||||
notificationsEnabled Boolean @map("notifications_enabled")
|
||||
schedulingPollId String @map("scheduling_poll_id")
|
||||
votes Json
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
schedulingPoll SchedulingPoll @relation(fields: [schedulingPollId], references: [id])
|
||||
availabilityHeatmapId String?
|
||||
|
||||
@@index([schedulingPollId], type: Hash)
|
||||
@@map("scheduling_poll_responses")
|
||||
}
|
||||
|
||||
model Option {
|
||||
id String @id @default(cuid())
|
||||
start DateTime @db.Timestamp(0)
|
||||
|
|
Loading…
Add table
Reference in a new issue