Commit Graph

14 Commits

Author SHA1 Message Date
lethemanh 43424607d4 #602 adminstrator can manage calendar resources (#703)
Co-authored-by: lethemanh <lethemanh@lethemanhs-MacBook-Pro.local>
2026-03-25 08:28:24 +01:00
lethemanh 387e64d58c #598 resource field in event (#634)
Co-authored-by: lethemanh <lethemanh@lethemanhs-MacBook-Pro.local>
2026-03-17 14:11:12 +01:00
lenhanphung 201f9c722b Use @linagora/twake-mui 1.1.6 from registry 2026-02-05 17:08:51 +07:00
Camille Moussu 2d8196fc8e [#490 & #489] Removed duplicated api call to get event data (#492)
* [#490 & #489] Removed duplicated api call to get event data

* [#490] removed arbitrary timezone fallback to UTC/ETC & updated exdate formating

* [#490] updated test and fixed eventdiff utils to properly handle dates
2026-02-04 15:01:13 +01:00
Camille Moussu 23d50f250d Refactor imports (#470) 2026-01-20 17:33:30 +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
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 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
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 942b203b0f fix: correct recurring to non-recurring event update logic
- Fix bug where updating recurring event to non-recurring created duplicate events
- Deduplicate URLs before deletion to avoid multiple delete calls on same file
- Add onCloseAll prop to close both preview and update modals after save
- Adjust smooth UI

Resolves issue where repeat->no-repeat conversion left old recurring events visible
2025-10-15 08:29:28 +02:00
lenhanphung 757060946f test: add non-regression tests for recurring to non-recurring conversion
- Add comprehensive integration test for happy path conversion flow
- Test verifies deleteEvent API called with correct URL
- Test verifies new event created without repetition and with new UID
- Test verifies store cleanup removes all old instances
- Test verifies refreshCalendars called after conversion
- Add test for error handling when API deletion fails
- Add test to verify calendar refresh mechanism
2025-10-15 08:29:28 +02:00
lenhanphung 4d346751bf style: fix prettier 2025-10-15 08:29:28 +02:00
lenhanphung 9b0e3446aa test: add timezone handling test cases as requested by chibenwa
- Add test for EventDisplay showing event in user local timezone
- Add test for EventUpdateModal displaying time in original event timezone
- Test verifies event at 2PM UTC+7 is displayed as 2PM in Asia/Bangkok when editing
- Create new test file EventUpdateModal.test.tsx for update modal specific tests
2025-10-15 08:29:28 +02:00