feat(atoms): add ListEventTypes atom to enable event type management (#25047) (#25113)

* feat: add ListEventTypes atom (#25047)

* feat: add ListEventTypes atom for Platform (#25047)

- Add EventTypeListItem component in @calcom/features
- Add ListEventTypesPlatformWrapper with delete functionality
- Implement useAtomGetAllEventTypes hook
- Update backend to include slug, description, length
- Add 11 unit tests (65% coverage)
- Add 3 i18n keys

No breaking changes. Backward compatible.

* refactor(eventtypes): improve EventTypeListItem readability

- Extract EventTypeContent and EventTypeActions sub-components
- Add formatEventTypeDuration helper (90min → '1h 30m')
- Use Badge for duration display (consistency with EventTypeDescription)
- Use polymorphic Wrapper component (DRY)
- Add comprehensive tests
- Reduce main component size

Addresses @volnei feedback

* refactor: replace window.confirm with ConfirmationDialog

- Replace native window.confirm with ConfirmationDialogContent

- Update test mocks for Dialog components

- Fix HTML nesting (div instead of p for Badge container)

- Follows Cal.com pattern from AvailabilitySettings

Addresses @ThyMinimalDev feedback

* fix: add aria-label to options button for accessibility

* test: update getBulkEventTypes test to include new fields (description, slug, length)

* refactor: move EventTypeListItem to atoms package

---------

Co-authored-by: Morgan <[email protected]>
This commit is contained in:
Pedro CastroandMorgan authored and GitHub committed 2025-12-18 12:24:41 -03:00
1 parent b20b52a1f8
commit 975fb21d86
12 files changed
+565

No files matched your search

@@ -4063,6 +4063,9 @@
"no_available_users_found_input": "No available users found",
"repeats_num_times": "Repeats {{count}} times",
"view_booking_details": "View Booking Details",
"cannot_delete_event_type": "This event type cannot be deleted",
"delete_event_type_confirmation": "Are you sure you want to delete this event type?",
"error_loading_event_types": "Error loading event types",
"recurring_booking_description": "Recurring {{frequency}} event with {{count}} occurrences",
"team_bio": "Team Bio",
"team_bio_placeholder": "Tell us about your team...",