Commit Graph

30 Commits

Author SHA1 Message Date
Camille Moussu 23d50f250d Refactor imports (#470) 2026-01-20 17:33:30 +01:00
Camille Moussu 9ff75056c7 [#397 bis] added participation management on event from thunderbird (#432)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2026-01-07 11:45:17 +01:00
lenhanphung a935d2bc43 372 drag and drop multiple days event to use normal mode instead of extended mode (#407)
- When dragging from allday slot: open normal mode with allday checked, show start date and end date
- When dragging from week/month view grid: open normal mode with allday checked, show 4 fields (start date, start time, end date, end time)
- Update DateTimeFields logic to support displaying time fields when allday=true and hasEndDateChanged=true for multiple days events

Add setHasEndDateChanged(false) to resetAllStateToDefault function to prevent stale state when:
- User creates multi-day event from grid (sets hasEndDateChanged = true)
- Closes the modal
- Opens modal again for a single-day event

This ensures hasEndDateChanged is properly reset to false when modal is closed or reset.

Fix drag and drop logic: keep allday=false when dragging from week view

- Remove setAllDay(true) when dragging multiple days from week view grid
- Keep allday=false to show time fields for week view drag scenarios
- Add comprehensive test cases for drag and drop scenarios
- Test cases cover allday slot and week view drag scenarios
- Prevent regressions with test coverage for display logic
2025-12-17 10:28:11 +01:00
lenhanphung 9151ff5563 fix: preserve form data on API error and fix test cases (#338)
- Add temp storage utility (eventFormTempStorage.ts) to save/restore form data
- Implement error handling: close modal immediately, reopen on API failure with saved data
- Add event listeners in Calendar.tsx and EventDisplayPreview.tsx to reopen modals on error
- Fix calendar change logic in EventUpdateModal: use oldCalendar for update before move
- Update all test mocks to support .unwrap() method for Redux thunks
- Add sessionStorage.clear() in test beforeEach hooks
- Fix test timing issues with act() wrappers and increased timeouts
- Mock putEventAsync in TempUpdate test to ensure updateTempCalendar is called

- Fix update modal not reopening when API fails for recurring events (solo/all)
- Move update modal reopen logic from EventDisplayPreview to Calendar.tsx
- Use sessionStorage to persist update modal info across component unmounts
- Handle typeOfAction matching for recurring events (undefined vs solo/all)
- Fix error handling in updateEventInstanceAsync and updateSeriesAsync
- Ensure all API failures properly dispatch eventModalError event
2025-11-25 15:30:58 +01:00
lenhanphung 007266e7b0 Fix: #319 attendee role: use REQ-PARTICIPANT instead of CHAIR for nor… (#349)
- Change role from CHAIR to REQ-PARTICIPANT when adding attendees via PeopleSearch
- Keep CHAIR role only for organizers
2025-11-20 12:00:17 +01:00
Camille Moussu cb69455a9b [#239] refresh is triggered only on save (#329)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-18 10:41:58 +01:00
Camille Moussu f886846a2b [#265] prefills title + trad + test (#293)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-12 20:42:05 +01:00
Camille Moussu 36bc027d6d [#82] added cozy-ui for internationnalisation (#267)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-06 15:46:58 +01:00
lenhanphung c1f37e3ebd feat: improve date/time fields UI and logic
- Change 'Start Date' label to 'Date' when only single date field is visible in normal mode
- Fix all-day slot display: show correct start/end dates for single click and multi-day drag
- Update API save logic: add +1 day to end date for all-day events (API requirement)
- Migrate from moment to dayjs for date handling with AdapterDayjs
- Remove manual date clamping logic - MUI/dayjs handles invalid dates automatically
- Add validation guard to prevent invalid dates from clearing field values
- Update test case to match new all-day event API behavior
2025-11-05 10:25:41 +01:00
lenhanphung 41b4c41215 Event form UX improvements:
- Add long date format display (Monday, April 23, 2024)
- Use 24h time format
- Show/hide time fields based on all-day state
- Remove auto-update of end date when start date changes
- Fix validation for all-day events
- Auto-expand for multi-day events
- Set default time when toggling off all-day from all-day slot
2025-11-05 10:25:41 +01:00
lenhanphung 5078128e10 test: fix test cases for MUI DatePicker and TimePicker migration
- Add data-testid attributes to DatePicker and TimePicker components in DateTimeFields
- Update test queries from getByLabelText to getByTestId for date/time inputs
- Fix assertions to use toHaveAttribute instead of toHaveValue for MUI pickers
- Add data-testid to occurrences-input in EventRepeat component
- Update RepeatEvent test to use data-testid for occurrences input
- Fix radio button queries using getAllByLabelText with type filter
2025-11-05 10:25:41 +01:00
lenhanphung 701f2f2b71 feat: Split datetime fields
- Replace single datetime-local field with 4 separate fields:

- Add helper functions:
  * splitDateTime(): Split datetime string into date and time parts
  * combineDateTime(): Combine date and time into datetime string

- Implement internal state management:
  * startDate, startTime, endDate, endTime internal states
  * Sync effects to update internal states from start/end props
  * Change handlers for each field that combine values and call parent handlers

- Fix test cases:
  * Update EventModal.test.tsx, EventUpdateModal.test.tsx to use new field labels
  * Change from 'Start'/'End' to 'Start Date'/'Start Time'/'End Time'/'End Date'
2025-11-05 10:25:41 +01:00
Camille Moussu 2d0803090a [#278] fixed unprefilled calendar and added test (#279)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-04 14:14:29 +01:00
lenhanphung b9905cbb7a refactor(tests): use getByRole instead of getByText for interactive elements
- Refactor ~47 test cases across 7 test files to use getByRole
- Improve accessibility testing coverage following Testing Library best practices
- Make tests more robust against text changes (i18n, copy updates)
- Test elements as users (especially screen readers) interact with them
2025-10-16 10:36:28 +02:00
lenhanphung 4c18bf3a52 feat: Update event modal UI with header icons and improved actions layout
- Add expand and close icons to ResponsiveDialog header in normal mode
- Change 'Show More' button to 'More options' with Add icon
- Hide Cancel button in normal mode, show only in extended mode
- Add showHeaderActions prop to ResponsiveDialog for UI control
- Preserve EventDisplayPreview modal with old UI (no header icons)
- Update all affected test cases to match new UI behavior
2025-10-16 10:36:28 +02:00
lenhanphung ff54840ac8 fix: resolve all failing test suites
- Fix RepeatEvent.test.tsx (15/15 tests): Update selectors to match actual UI text ('Day(s)', 'Week(s)', etc.) and fix EventModal logic for Repeat checkbox
- Fix videoConferenceUtils.test.ts (1/1 test): Mock window object for Node.js environment
- Fix EventModal.test.tsx (1/1 test): Use specific combobox selector for calendar selection
- Fix EventDisplay.test.tsx (1/1 test): Remove incorrect Repeat checkbox expectation
2025-10-03 10:07:08 +07:00
lenhanphung 407290702f fix: resolve all failing test suites
- Fix RepeatEvent.test.tsx (15/15 tests): Update selectors to match actual UI text ('Day(s)', 'Week(s)', etc.) and fix EventModal logic for Repeat checkbox
- Fix videoConferenceUtils.test.ts (1/1 test): Mock window object for Node.js environment
- Fix EventModal.test.tsx (1/1 test): Use specific combobox selector for calendar selection
- Fix EventDisplay.test.tsx (1/1 test): Remove incorrect Repeat checkbox expectation
2025-10-02 18:11:55 +07:00
lenhanphung 4eb2c86771 fix: update test cases to match new UI labels
- Update RepeatEvent.test.tsx to use correct selectors and text matching
- Update EventDisplay.test.tsx to use 'Notification' instead of 'Alarm'
- Update EventModal.test.tsx to use new label names and fix description input tests
- Update Calendar.test.tsx to use new placeholder text 'Start typing a name or email'
- Fix EventDisplay.tsx to use 'Notification' label consistently
2025-10-02 14:19:05 +07:00
lenhanphung 7c6240442c feat: redesign event modal with responsive dialog and improved layout
Implemented a new ResponsiveDialog component and redesigned EventModal
with better UX for both normal and extended modes.

New Features:
- Created reusable ResponsiveDialog component (src/components/Dialog/)
  * Normal mode: 685px centered popup
  * Extended mode: fullscreen with 90px header preservation
  * Auto spacing via MUI Stack (16px normal, 24px extended)
  * Back arrow navigation in extended mode
  * No backdrop/shadow in extended mode for seamless integration
  * Configurable props for all dimensions and behaviors

EventModal Improvements:
- Replaced native checkbox with MUI Checkbox component
- Migrated from Popover to ResponsiveDialog
- Reorganized field layout

=> Comprehensive documentation in Dialog/README.md

Note: RepeatEvent integration tests need additional refactoring (tracked separately)
2025-10-02 14:19:05 +07:00
Camille Moussu 24c6788c2c [#92] added free busy and missing tests 2025-09-09 17:19:27 +02:00
Camille Moussu 2f071303de [#77] fixed delete refresh issue and added more tests 2025-09-05 16:41:05 +02:00
Camille Moussu a58373854e [#7] removed free/busy field 2025-09-03 16:09:21 +02:00
Camille Moussu b3c05e0aa5 [#7] fixed attendance update when editing event 2025-09-03 11:10:17 +02:00
Camille Moussu ee01e1d027 [#77] added complex ui for repetition, fixed broken tests due to new feature 2025-09-02 18:14:55 +02:00
Camille Moussu 6669eeb456 [#7] fixed allday implementation to prevent errors with openpaas 2025-08-27 14:55:14 +02:00
Camille Moussu d7b3d4e077 [#50] added attendee search and tests 2025-08-21 13:18:41 +02:00
Camille Moussu 2377cde057 [#3] added pretty attendee list and tests + fixed broken tests due to dates 2025-07-29 11:09:21 +02:00
Camille Moussu 46e46ca869 [tests] fixed broken test 2025-07-25 10:10:00 +02:00
Camille Moussu c38fa29244 [tests] updated tests 2025-07-24 14:16:54 +02:00
Camille Moussu 41e8d88841 [#38]added missing tests 2025-07-18 17:29:53 +02:00