Story 5.1: Event Type Configuration - Wireframe
Story: Epic 5, Story 5.1 - Event Type Definition
Implementation Status & Scope
CURRENT STATE (Story 2.5.3):
- β Event Type selector exists in EventForm.tsx (lines 570-603)
- β Basic dropdown with 3 options: Full Day, Afternoon, Evening
- β Values stored in event metadata as JSON
- β NO backend event_types table yet
- β NO slot configuration details shown
- β NO preview component
- β NO admin configuration screen
STORY 5.1 WILL ADD:
- Backend: event_types table, REST API endpoints, EventType entity
- Frontend Enhancement: Fetch slot details from API, show in dropdown
- New Component: SlotTemplatePreview below selector
- Admin Screen: Configure event type templates (ORGANIZER only)
- Caching: Caffeine cache for event type configurations
Integration Point: Story 5.1 enhances the existing EventForm component (lines 570-603) by:
- Replacing hardcoded MenuItem values with API-fetched data
- Adding slot configuration details to each MenuItem
- Adding SlotTemplatePreview component below the selector
Screen 0: Quick Actions Sidebar - Event Management Dashboard
Context: Quick Actions sidebar on Event Management Dashboard (right column) provides access to Event Type Configuration
Implementation: web-frontend/src/components/organizer/EventManagement/EventManagementDashboard.tsx
New Component: QuickActions.tsx in sidebar (lines 151-172 area)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Event Management Dashboard β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββββ ACTIVE EVENTS βββββββββββββββ¬ββββ QUICK ACTIONS βββββββββββββ β
β β β β β
β β Spring Conference 2025 β [+ New Event] β β
β β ββββββββββββββββ 65% β β β
β β β [βοΈ Event Types] β β
β β Summer Workshop 2025 β β β
β β βββββββββββββββ 15% β βΉοΈ Configure event type β β
β β β templates (Admin) β β
β β β β β
β β β [π Analytics] (Future) β β
β β β [π₯ Speakers] (Future) β β
β β β [π’ Partners] (Future) β β
β ββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββ CRITICAL TASKS ββββββββββββββββββ¬ββββ TEAM ACTIVITY ββββββββββββββ β
β β β οΈ 3 pending tasks... β Recent activity... β β
β ββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Quick Actions Section Details:
- Located in sidebar (Grid size={{ xs: 12, md: 4 }})
- First card above Critical Tasks
- [+ New Event] button: Opens EventForm modal
- [βοΈ Event Types] button: Navigates to
/organizer/event-typesroute - Helper text shown below Event Types button for admin-only context
- Future buttons grayed out with β(Future)β label
Material-UI Components:
Paperwrapper withsx={{ p: 3 }}Typography variant="h6"for section headerStack spacing={1}for button listButton fullWidth startIcon={<SettingsIcon />}for Event TypesTypography variant="caption" color="text.secondary"for helper text
Access Control:
- All organizers can see [+ New Event]
- [βοΈ Event Types] visible to all organizers, but only ORGANIZER role can modify configurations
- Non-organizer roles (SPEAKER, PARTNER, ATTENDEE) donβt see Quick Actions sidebar
Screen 1: Event Type Selector in Event Form Modal (CURRENT IMPLEMENTATION)
Context: Organizer clicks βCreate Eventβ or βEdit Eventβ which opens a modal dialog with the EventForm component. The event type selector is integrated into this form.
Implementation: web-frontend/src/components/organizer/EventManagement/EventForm.tsx (lines 448-721)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Create Event β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π Auto-save enabled [β] Saved at 14:32:15 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββ BASIC INFORMATION βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Event #: [54 ] Title: [Spring Conference 2025 ] * β β
β β β β
β β Description: * β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β A comprehensive Spring conference covering advanced β β β
β β β microservices architecture patterns, cloud-native β β β
β β β development, and lessons learned from production deployments. β β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ DATES & TIMING ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Event Date: * [2025-03-15 π
] Reg. Deadline: [2025-03-10 π
] β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ EVENT TYPE & CAPACITY βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Event Type: [Full Day Event βΌ] * β β
β β Capacity: [200 ] β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ STATUS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Status: [Planning βΌ] β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ VENUE βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Venue Name: * [Kornhausforum Bern ] β β
β β β β
β β Address: * [Kornhausplatz 18, 3011 Bern ] β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ THEME (OPTIONAL) ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Theme: [Cloud-Native Architecture ] β β
β β β β
β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Theme Image β β
β β Upload a banner image for this event (PNG, JPG, SVG - max 5MB) β β
β β β β
β β [Choose File] No file chosen β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β β οΈ Validation errors shown inline below each field β
β β
β [Cancel] [Save as Draft] [Create Event] β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Key Implementation Details (from EventForm.tsx):
- Lines 570-603: Event Type selector implementation
- Lines 484-514: Event Number and Title side-by-side
- Lines 534-567: Event Date and Registration Deadline side-by-side
- Lines 570-603: Event Type and Venue Capacity side-by-side
- Lines 605-632: Status dropdown
- Lines 634-660: Venue Name and Address
- Lines 662-668: Theme text field
- Lines 670-690: Theme Image Upload (FileUpload component)
Actual Material-UI Components Used:
DialogwithmaxWidth="md"andfullWidthDialogTitle,DialogContent,DialogActionsTextFieldwithtype="date"for date pickersSelect+MenuItemfor dropdowns (event type, status)FormControl,InputLabel,FormHelperTextfor form fieldsAlertfor error messagesChipfor auto-save statusBoxwithdisplay: 'flex', gap: 2for side-by-side layouts
Component: EventTypeSelector
Material-UI Components: Select, MenuItem, FormControl, InputLabel
Props:
interface EventTypeSelectorProps {
value: EventType;
onChange: (type: EventType) => void;
disabled?: boolean;
}
Behavior:
- Displays 3 options: Full Day Event, Afternoon Event, Evening Event
- Each option shows event type name in dropdown
- When user hovers over option, shows brief description
- On selection, triggers SlotTemplatePreview update below
Screen 2: Event Type Selector - Dropdown Expanded (CURRENT IMPLEMENTATION)
Implementation: Lines 577-581 in EventForm.tsx show simple MenuItem text values
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Event Type: [Full Day Event βΌ] β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β Full Day Event β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β Afternoon Event β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β Evening Event β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
Current Implementation (lines 577-581):
<Select {...field} label={t('form.eventType')}>
<MenuItem value="full_day">{t('form.eventTypes.fullDay')}</MenuItem>
<MenuItem value="afternoon">{t('form.eventTypes.afternoon')}</MenuItem>
<MenuItem value="evening">{t('form.eventTypes.evening')}</MenuItem>
</Select>
Translation Keys (from i18n):
form.eventTypes.fullDayβ βFull Day Eventβform.eventTypes.afternoonβ βAfternoon Eventβform.eventTypes.eveningβ βEvening Eventβ
Material-UI Components: Standard MenuItem with text-only content
Story 5.1 Enhancement Opportunity: Add detailed slot information to MenuItem (secondary text) showing:
- Slot count range (e.g., β6-8 slotsβ)
- Duration (e.g., β45 min eachβ)
- Typical timing (e.g., β09:00-17:00β)
Enhanced MenuItem Example (Story 5.1 implementation):
<MenuItem value="full_day">
<Box>
<Typography variant="body1">Full Day Event</Typography>
<Typography variant="caption" color="textSecondary">
6-8 slots β’ 45 min each β’ 09:00-17:00
</Typography>
</Box>
</MenuItem>
Screen 3: Slot Template Preview Component
Context: Shown below event type selector, updates dynamically when event type changes
ββ SLOT CONFIGURATION PREVIEW ββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β π Afternoon Event β
β β
β ββββββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββ β
β β π― Slots β β±οΈ Duration β π₯ Capacity β π Timing β β
β ββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββ€ β
β β 6-8 sessions β 30 min each β 150 people β 13:00 - 18:00 β β
β ββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββ β
β β
β π
Example Timeline: β
β 13:00 - 13:30 Session 1 (Theoretical) β
β 13:30 - 14:00 Session 2 (Theoretical) β
β 14:00 - 14:30 Session 3 (Theoretical) β
β 14:30 - 15:00 β Break β
β 15:00 - 15:30 Session 4 (Practical) β
β 15:30 - 16:00 Session 5 (Practical) β
β 16:00 - 16:30 Session 6 (Practical) β
β 16:30 - 17:00 Session 7 (Practical) [Optional] β
β 17:00 - 17:30 Session 8 (Practical) [Optional] β
β 17:30 - 18:00 π€ Networking β
β β
β βΉοΈ Shorter sessions allow more topic diversity β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Component: SlotTemplatePreview
Material-UI Components: Card, CardContent, Typography, Chip, Stack, Table
Props:
interface SlotTemplatePreviewProps {
eventType: EventType;
slotConfiguration: EventSlotConfiguration;
}
Visual Elements:
- Header with event type icon and name
- 4-column info grid: Slots, Duration, Capacity, Timing
- Example timeline with session breakdown
- Footer info message explaining key characteristics
Screen 4: Event Type Configuration Admin Screen
Context: Admin-only screen for configuring event type templates (accessed via Quick Actions sidebar on Event Management Dashboard)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β Back to Dashboard Event Type Configuration [ADMIN ONLY] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π Event Type Templates β
β β
β ββ FULL DAY EVENT βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Status: β Active [Edit] [βοΈ] β β
β β β β
β β ββββββββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββ β β
β β β Min Slots β Max Slots β Duration β Default Capacity β β β
β β ββββββββββββββββΌββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββ€ β β
β β β 6 β 8 β 45 min β 200 β β β
β β ββββββββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββ β β
β β β β
β β π Typical Timing: 09:00 - 17:00 β β
β β β Break Slots: 2 π½οΈ Lunch Slots: 1 π¬ Theoretical AM: β Yes β β
β β β β
β β Last Modified: 2025-01-15 by admin@batbern.ch β β
β β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ AFTERNOON EVENT ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Status: β Active [Edit] [βοΈ] β β
β β β β
β β ββββββββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββ β β
β β β Min Slots β Max Slots β Duration β Default Capacity β β β
β β ββββββββββββββββΌββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββ€ β β
β β β 6 β 8 β 30 min β 150 β β β
β β ββββββββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββ β β
β β β β
β β π Typical Timing: 13:00 - 18:00 β β
β β β Break Slots: 1 π½οΈ Lunch Slots: 0 π¬ Theoretical AM: β No β β
β β β β
β β Last Modified: 2025-01-15 by admin@batbern.ch β β
β β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ EVENING EVENT ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Status: β Active [Edit] [βοΈ] β β
β β β β
β β ββββββββββββββββ¬ββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββ β β
β β β Min Slots β Max Slots β Duration β Default Capacity β β β
β β ββββββββββββββββΌββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββ€ β β
β β β 3 β 4 β 45 min β 100 β β β
β β ββββββββββββββββ΄ββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββ β β
β β β β
β β π Typical Timing: 18:00 - 21:00 β β
β β β Break Slots: 1 π½οΈ Lunch Slots: 0 π¬ Theoretical AM: β No β β
β β β β
β β Last Modified: 2025-01-10 by admin@batbern.ch β β
β β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β β οΈ Changes to event type templates will affect future events only. β
β Existing events retain their original configuration. β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Access Control: ORGANIZER role only (admin organizers)
Material-UI Components: Card, CardHeader, CardContent, IconButton, Chip, Typography
Features:
- Read-only view showing all 3 event types
- Each type displayed in expandable card
- [Edit] button opens modal for configuration
- Warning message about changes affecting future events only
Screen 5: Edit Event Type Configuration Modal
Context: Admin clicks [Edit] button on an event type card
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Edit Event Type Configuration β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Event Type: Full Day Event β
β β
β ββ SLOT CONFIGURATION ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Minimum Slots: [6 ] β Minimum sessions required β β
β β β β
β β Maximum Slots: [8 ] β Maximum sessions allowed β β
β β β β
β β Slot Duration: [45 ] minutes β β
β β β β
β β β οΈ Validation: Min slots (6) must be β€ Max slots (8) β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ TIMING TEMPLATE βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Typical Start Time: [09:00 π] Typical End Time: [17:00 π] β β
β β β β
β β Break Slots: [2 ] β Coffee/networking breaks β β
β β β β
β β Lunch Slots: [1 ] β Lunch break periods β β
β β β β
β β β Theoretical Presentations in Morning β β
β β When enabled, theoretical sessions scheduled before lunch β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ CAPACITY PLANNING βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Default Capacity: [200 ] β Default attendee limit β β
β β β β
β β Note: Organizers can override capacity when creating events β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββ PREVIEW βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β π
Example Timeline with Current Settings: β β
β β 09:00 - 09:45 Session 1 (45 min) β β
β β 09:45 - 10:30 Session 2 (45 min) β β
β β 10:30 - 11:00 β Break β β
β β 11:00 - 11:45 Session 3 (45 min) β β
β β 11:45 - 12:30 Session 4 (45 min) β β
β β 12:30 - 13:30 π½οΈ Lunch β β
β β 13:30 - 14:15 Session 5 (45 min) β β
β β 14:15 - 15:00 Session 6 (45 min) β β
β β 15:00 - 15:30 β Break β β
β β 15:30 - 16:15 Session 7 (45 min) [Optional] β β
β β 16:15 - 17:00 Session 8 (45 min) [Optional] β β
β β β β
β β Total: 6 required + 2 optional = 6-8 slots β β β
β β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β β οΈ Warning: Changes will apply to future events only. β
β 54 existing events use the current configuration. β
β β
β [Cancel] [Save Changes] β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Component: EventTypeConfigurationForm
Material-UI Components: Dialog, DialogTitle, DialogContent, DialogActions, TextField, Switch, Button, Alert
Props:
interface EventTypeConfigurationFormProps {
eventType: EventType;
initialConfig?: EventSlotConfiguration;
open: boolean;
onClose: () => void;
onSave: (config: EventSlotConfiguration) => Promise<void>;
}
Validation Rules:
- Min Slots > 0
- Max Slots β₯ Min Slots
- Slot Duration β₯ 15 minutes
- Default Capacity > 0
- Start Time < End Time
Behavior:
- Real-time preview updates as user changes values
- Validation errors shown inline with red text
- [Save Changes] disabled until all validation passes
- Warning shows count of existing events using current config
Responsive Behavior
Mobile (< 768px)
βββββββββββββββββββββββββββββββ
β Event Type β
β [Full Day Event βΌ] β
β β
β ββ PREVIEW βββββββββββββββββ
β β π Full Day Event ββ
β β ββ
β β π― 6-8 slots ββ
β β β±οΈ 45 min each ββ
β β π₯ 200 capacity ββ
β β π 09:00-17:00 ββ
β β ββ
β β [View Timeline] ββ
β ββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββ
- Preview cards stack vertically
- Timeline collapsed behind [View Timeline] button
- Configuration form becomes full-screen modal
Tablet (768px - 1024px)
- Two-column layout: Selector left, Preview right
- Timeline visible but scrollable
- Configuration form as centered modal
Desktop (> 1024px)
- Side-by-side layout as shown in wireframes
- Full timeline visible without scrolling
- Configuration form as wide modal
Accessibility (WCAG 2.1 AA)
Keyboard Navigation:
- Tab through: Event Type dropdown β each form field β buttons
- Enter/Space: Opens dropdown, activates buttons
- Arrow keys: Navigate dropdown options
- Escape: Closes dropdown or modal
Screen Reader:
aria-labelon event type selector: βSelect event type formatβaria-describedbylinking to preview section- Live region announces when preview updates
- Form fields have proper labels and error messages
Visual:
- Color contrast ratio β₯ 4.5:1 for all text
- Focus indicators visible on all interactive elements
- Icons supplemented with text labels
- Error messages not conveyed by color alone
State Management
React Query Hooks:
// Fetch all event types (cached 1 hour)
const { data: eventTypes } = useEventTypes();
// Fetch specific event type
const { data: eventType } = useEventType(EventType.FULL_DAY);
// Update event type configuration (ORGANIZER only)
const updateMutation = useUpdateEventType();
Local State (Zustand):
interface EventCreationStore {
selectedEventType: EventType;
setEventType: (type: EventType) => void;
slotConfiguration: EventSlotConfiguration | null;
}
API Integration
GET /api/events/types - List all event types
- Used by: EventTypeSelector on load
- Caching: 1 hour (types rarely change)
- Response: Array of EventSlotConfiguration
GET /api/events/types/{type} - Get specific type
- Used by: SlotTemplatePreview for detailed info
- Caching: 1 hour
- Response: EventSlotConfiguration
PUT /api/events/types/{type} - Update configuration
- Used by: EventTypeConfigurationForm on save
- Auth: ORGANIZER role required
- Cache invalidation: Clears eventTypes cache
- Response: Updated EventSlotConfiguration
Component Hierarchy
EventManagementDashboard
βββ QuickActions (NEW - Story 5.1)
β βββ Paper (Material-UI)
β βββ Typography (header)
β βββ Stack (button list)
β βββ Button [+ New Event]
β βββ Button [βοΈ Event Types] β Navigate to /organizer/event-types
β βββ Typography (helper text)
β βββ Button [Future actions] (disabled)
β
βββ [Rest of dashboard components]
EventCreationForm
βββ EventTypeSelector
β βββ FormControl (Material-UI)
β βββ Select (Material-UI)
β βββ MenuItem (Material-UI) x3
β
βββ SlotTemplatePreview
βββ Card (Material-UI)
βββ CardContent
β βββ Typography (header)
β βββ Stack (info chips)
β β βββ Chip x4
β βββ Divider
β βββ Typography (timeline header)
β βββ List (timeline items)
β β βββ ListItem x10
β βββ Alert (info message)
βββ CardActions (optional)
EventTypeConfigurationAdmin (Route: /organizer/event-types)
βββ Card x3 (one per event type)
β βββ CardHeader
β βββ CardContent
β βββ CardActions
β βββ IconButton [Edit]
β
βββ EventTypeConfigurationModal
βββ Dialog (Material-UI)
βββ DialogTitle
βββ DialogContent
β βββ TextField x6 (form fields)
β βββ Switch x1 (theoretical AM)
β βββ SlotTemplatePreview (live preview)
βββ DialogActions
βββ Button [Cancel]
βββ Button [Save Changes]
Testing Scenarios
EventTypeSelector Tests:
- β Displays 3 event type options
- β Shows slot details in each option
- β Calls onChange when type selected
- β Disables when disabled prop is true
- β Pre-selects current value
SlotTemplatePreview Tests:
- β Displays correct info for each event type
- β Shows timeline with correct slot count
- β Updates when eventType prop changes
- β Calculates correct timing based on duration
- β Shows optional slots in gray
EventTypeConfigurationForm Tests:
- β Validates min slots β€ max slots
- β Prevents saving with invalid data
- β Updates preview in real-time
- β Shows warning about existing events
- β Calls onSave with correct data
E2E Test:
- β Organizer creates event and selects type
- β Preview updates to match selection
- β Event saves with correct slot configuration
- β Admin edits event type configuration
- β Changes apply to new events only
Implementation Notes
- Event Type Selector goes in Event Creation/Edit form (Story 1.16)
- Slot Template Preview appears immediately below selector
- Admin Configuration accessible via System Settings β Event Types
- All components use Material-UI for consistency
- Real-time preview uses React state (no API calls during editing)
- Configuration changes invalidate React Query cache
- Cache strategy: Aggressive (1 hour) because event types rarely change