Add "opening" timeline event type

This commit is contained in:
gpt-engineer-app[bot]
2025-10-15 19:31:48 +00:00
parent 444634dc85
commit dfc89bd43b
3 changed files with 38 additions and 14 deletions

View File

@@ -48,6 +48,7 @@ const timelineEventSchema = z.object({
'owner_change', 'owner_change',
'location_change', 'location_change',
'status_change', 'status_change',
'opening',
'closure', 'closure',
'reopening', 'reopening',
'renovation', 'renovation',
@@ -205,20 +206,21 @@ export function TimelineEventEditorDialog({
<SelectValue placeholder="Select event type" /> <SelectValue placeholder="Select event type" />
</SelectTrigger> </SelectTrigger>
</FormControl> </FormControl>
<SelectContent> <SelectContent>
<SelectItem value="name_change">Name Change</SelectItem> <SelectItem value="name_change">Name Change</SelectItem>
<SelectItem value="operator_change">Operator Change</SelectItem> <SelectItem value="operator_change">Operator Change</SelectItem>
<SelectItem value="owner_change">Ownership Change</SelectItem> <SelectItem value="owner_change">Ownership Change</SelectItem>
<SelectItem value="location_change">Relocation</SelectItem> <SelectItem value="location_change">Relocation</SelectItem>
<SelectItem value="status_change">Status Change</SelectItem> <SelectItem value="status_change">Status Change</SelectItem>
<SelectItem value="closure">Closure</SelectItem> <SelectItem value="opening">Opening</SelectItem>
<SelectItem value="reopening">Reopening</SelectItem> <SelectItem value="closure">Closure</SelectItem>
<SelectItem value="renovation">Renovation</SelectItem> <SelectItem value="reopening">Reopening</SelectItem>
<SelectItem value="expansion">Expansion</SelectItem> <SelectItem value="renovation">Renovation</SelectItem>
<SelectItem value="acquisition">Acquisition</SelectItem> <SelectItem value="expansion">Expansion</SelectItem>
<SelectItem value="milestone">Milestone</SelectItem> <SelectItem value="acquisition">Acquisition</SelectItem>
<SelectItem value="other">Other</SelectItem> <SelectItem value="milestone">Milestone</SelectItem>
</SelectContent> <SelectItem value="other">Other</SelectItem>
</SelectContent>
</Select> </Select>
<FormMessage /> <FormMessage />
</FormItem> </FormItem>

View File

@@ -11,6 +11,7 @@ export type TimelineEventType =
| 'owner_change' | 'owner_change'
| 'location_change' | 'location_change'
| 'status_change' | 'status_change'
| 'opening'
| 'closure' | 'closure'
| 'reopening' | 'reopening'
| 'renovation' | 'renovation'

View File

@@ -0,0 +1,21 @@
-- Add 'opening' to timeline event types
ALTER TABLE public.entity_timeline_events
DROP CONSTRAINT entity_timeline_events_event_type_check;
ALTER TABLE public.entity_timeline_events
ADD CONSTRAINT entity_timeline_events_event_type_check
CHECK (event_type IN (
'name_change',
'operator_change',
'owner_change',
'location_change',
'status_change',
'opening',
'closure',
'reopening',
'renovation',
'expansion',
'acquisition',
'milestone',
'other'
));