venues and ui changes

This commit is contained in:
2025-07-24 09:42:57 -04:00
parent 049def6886
commit 27590f9509
24 changed files with 757 additions and 164 deletions

View File

@@ -0,0 +1,51 @@
import React from 'react'
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '../ui/card'
import { Button } from '../ui/button'
import Link from 'next/link'
import EventInfoQuickView from '../EventInfoQuickView'
interface EventsProps {
events: {
id: string
name: string
date?: Date | null
creator: {
id: string,
username: string
},
venue?: {
name: string
} | null
}[]
}
export default function DashboardEvents({events}: EventsProps) {
return (
<Card className='md:col-span-5 pb-3'>
<CardHeader>
<div className='flex justify-between items-center'>
<CardTitle>
Your Events
</CardTitle>
<Button
className='bg-brand-primary-600 hover:bg-brand-primary-400'
>
Create Event
</Button>
</div>
</CardHeader>
<CardContent>
<div className='grid md:grid-cols-3'>
{events.map((item) => (
<EventInfoQuickView key={item.id} {...item} />
))}
</div>
</CardContent>
<CardFooter>
<div className='text-right w-full text-sm'>
<Link href={'/events'}>View all</Link>
</div>
</CardFooter>
</Card>
)
}

View File

@@ -0,0 +1,41 @@
import React from 'react'
import { Card, CardContent, CardHeader, CardTitle } from '../ui/card'
import Link from 'next/link'
import AddFirstGuestBookEntryClient from '../AddFirstGuestBookEntryClient'
import GuestBookQuickView from '../GuestBookQuickView'
interface GuestBookEntryProps {
guestBookEntries: {
id: string
fName: string
lName: string
email?: string | null
phone?: string | null
address?: string | null
notes?: string | null
side: string
congratulated?: boolean | null
createdAt: Date
}[]
}
export default function DashboardGuestBook(guestBookEntries: GuestBookEntryProps) {
return (
<Card className='md:col-start-6 col-span-2 row-span-2'>
<CardHeader>
<div className='flex justify-between items-center'>
<CardTitle>
Guest Book
</CardTitle>
<Link href={'/guest-book'}>View All</Link>
</div>
</CardHeader>
<CardContent className='space-y-2'>
{!guestBookEntries.guestBookEntries.length && <AddFirstGuestBookEntryClient />}
{guestBookEntries.guestBookEntries.map(entry => (
<GuestBookQuickView key={entry.id} {...entry} />
))}
</CardContent>
</Card>
)
}