venues and ui changes
This commit is contained in:
51
components/dashboard/DashboardEvents.tsx
Normal file
51
components/dashboard/DashboardEvents.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
41
components/dashboard/DashboardGuestBook.tsx
Normal file
41
components/dashboard/DashboardGuestBook.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user