added vendor to schema, have not migrated

This commit is contained in:
2026-01-23 13:28:58 -05:00
parent 3e916c9d3b
commit 50b0f20592
5 changed files with 1422 additions and 3 deletions

1330
bun.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -79,12 +79,12 @@ export default function EventNotesEditor({ eventId, initialNotes, canEdit }: Pro
onChange={(e) => setNotes(e.target.value)} onChange={(e) => setNotes(e.target.value)}
onBlur={handleBlur} onBlur={handleBlur}
rows={6} rows={6}
className="textarea textarea-bordered w-full resize-none" className="textarea w-full resize-none"
/> />
) : notes.trim() ? ( ) : notes.trim() ? (
<ReactMarkdown remarkPlugins={[remarkGfm]}>{notes}</ReactMarkdown> <ReactMarkdown remarkPlugins={[remarkGfm]}>{notes}</ReactMarkdown>
) : ( ) : (
<p className="text-gray-500 italic textarea-bordered rounded-lg min-h-32 p-4">Click to add notes...</p> <p className="text-gray-500 italic rounded-lg min-h-32 p-4">Click to add notes...</p>
)} )}
{saving && <p className="text-xs text-gray-400">Saving...</p>} {saving && <p className="text-xs text-gray-400">Saving...</p>}

View File

@@ -45,7 +45,10 @@ export default function EventInfo({ event }: EventProps) {
<p className='text-sm'>Venue: {event.venue ? event.venue.name : 'No location yet'}</p> <p className='text-sm'>Venue: {event.venue ? event.venue.name : 'No location yet'}</p>
{daysLeft !== null && ( {daysLeft !== null && (
<p className='text-sm mt-2 font-medium text-brand-primary-400'> <p className='text-sm mt-2 font-medium text-brand-primary-400'>
{daysLeft} days until this event! {daysLeft > 0
? `${daysLeft} days until this event!`
: daysLeft < 0 && 'This event has passed'
}
</p> </p>
)} )}
<Button <Button

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Venue" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

View File

@@ -141,3 +141,87 @@ model FileUpload {
@@unique([filename, uploadedById]) @@unique([filename, uploadedById])
} }
model Vendor {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String
type VendorType
description String?
website String?
contactPerson String?
email String?
phone String?
address Address @relation(fields: [addressId], references: [id])
addressId String
status VendorStatus @default(CONTACTING)
isBooked Boolean @default(false)
bookedDate DateTime?
quotedPrice Float?
finalCost Float?
depositPaid Float?
depositDueDate DateTime?
finalPaymentDue DateTime?
paymentNotes String?
contactUrl String?
proposalUrl String?
notes String?
events Event[]
categories Category[]
}
model Address {
id String @id @default(cuid())
street String
city String
state String
zip Int
Vendor Vendor[]
}
model Category {
id String @id @default(cuid())
name String @unique
description String?
color String? @default("#3B82F6") // For UI purposes
vendors Vendor[]
}
enum VendorType {
VENUE
CATERER
PHOTOGRAPHER
VIDEOGRAPHER
FLORIST
BAKERY
DJ
BAND
OFFICIANT
HAIR_MAKEUP
TRANSPORTATION
RENTALS
DECOR
PLANNER
STATIONERY
OTHER
}
enum VendorStatus {
RESEARCHING // Just found them
CONTACTING // Reached out but no response yet
RESPONDED // They responded
PROPOSAL_RECEIVED // Got their quote/proposal
NEGOTIATING // Discussing terms/price
CONTRACT_SENT // Sent contract for review
CONTRACT_SIGNED // Officially booked!
DECLINED // Not using them
BACKUP // Keeping as backup option
}