mirror of
https://github.com/polaroi8d/cactoide.git
synced 2026-03-22 14:15:28 +00:00
fix: location missing field error
This commit is contained in:
@@ -17,7 +17,7 @@ import type { InferInsertModel, InferSelectModel } from 'drizzle-orm';
|
||||
// --- Enums (matching the SQL CHECK constraints)
|
||||
export const eventTypeEnum = pgEnum('event_type', ['limited', 'unlimited']);
|
||||
export const visibilityEnum = pgEnum('visibility', ['public', 'private']);
|
||||
export const locationTypeEnum = pgEnum('location_type', ['text', 'maps']);
|
||||
export const locationTypeEnum = pgEnum('location_type', ['none', 'text', 'maps']);
|
||||
|
||||
// --- Events table
|
||||
export const events = pgTable(
|
||||
@@ -28,7 +28,7 @@ export const events = pgTable(
|
||||
date: date('date', { mode: 'string' }).notNull(), // ISO 'YYYY-MM-DD'
|
||||
time: time('time', { withTimezone: false }).notNull(), // 'HH:MM:SS'
|
||||
location: varchar('location', { length: 200 }).notNull(),
|
||||
locationType: locationTypeEnum('location_type').notNull().default('text'),
|
||||
locationType: locationTypeEnum('location_type').notNull().default('none'),
|
||||
locationUrl: varchar('location_url', { length: 500 }),
|
||||
type: eventTypeEnum('type').notNull(),
|
||||
attendeeLimit: integer('attendee_limit'), // nullable in SQL
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
"time": "Time",
|
||||
"location": "Location",
|
||||
"locationType": "Location Type",
|
||||
"locationNone": "None",
|
||||
"locationText": "Text",
|
||||
"locationMaps": "Google Maps",
|
||||
"locationNoneDescription": "No location specified",
|
||||
"locationTextDescription": "Enter location as plain text.",
|
||||
"locationMapsDescription": "Enter Google Maps link.",
|
||||
"googleMapsUrl": "Google Maps URL",
|
||||
@@ -142,10 +144,12 @@
|
||||
"locationLabel": "Location",
|
||||
"locationPlaceholder": "Enter location",
|
||||
"locationTypeLabel": "Location Type",
|
||||
"locationNoneOption": "None",
|
||||
"locationTextOption": "Plain Text",
|
||||
"locationMapsOption": "Google Maps",
|
||||
"locationTextDescription": "Enter location as plain text",
|
||||
"locationMapsDescription": "Enter Google Maps link",
|
||||
"locationNoneDescription": "No location specified.",
|
||||
"locationTextDescription": "Enter location as plain text.",
|
||||
"locationMapsDescription": "Enter Google Maps link.",
|
||||
"googleMapsUrlLabel": "Google Maps URL",
|
||||
"googleMapsUrlPlaceholder": "https://maps.google.com/...",
|
||||
"typeLabel": "Type",
|
||||
@@ -156,8 +160,8 @@
|
||||
"visibilityLabel": "Visibility",
|
||||
"publicOption": "🌍 Public",
|
||||
"privateOption": "🔒 Private",
|
||||
"publicDescription": "Public events are visible to everyone and can be discovered by others",
|
||||
"privateDescription": "Private events are only visible to you and people you share the link with",
|
||||
"publicDescription": "Public events are visible to everyone and can be discovered by others.",
|
||||
"privateDescription": "Private events are only visible to you and people you share the link with.",
|
||||
"creatingEvent": "Creating Event...",
|
||||
"createEventButton": "Create Event"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export type EventType = 'limited' | 'unlimited';
|
||||
export type EventVisibility = 'public' | 'private';
|
||||
export type ActionType = 'add' | 'remove';
|
||||
export type LocationType = 'text' | 'maps';
|
||||
export type LocationType = 'none' | 'text' | 'maps';
|
||||
|
||||
export interface Event {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user