TF-3591 Implement CalendarEventCounter/accept method

This commit is contained in:
DatDang
2025-04-16 09:37:42 +07:00
committed by Dat H. Pham
parent 037fcc03a1
commit 9df53ef6b9
27 changed files with 256 additions and 21 deletions
@@ -0,0 +1,15 @@
import 'package:jmap_dart_client/jmap/mail/calendar/properties/event_method.dart';
import 'package:tmail_ui_user/features/email/domain/model/event_action.dart';
extension ListEventActionsExtension on List<EventActionType> {
List<EventActionType> validActionsOfEventMethod(EventMethod? eventMethod) {
return where((action) {
if (eventMethod != EventMethod.counter) {
return action != EventActionType.acceptCounter;
}
return action == EventActionType.acceptCounter
|| action == EventActionType.mailToAttendees;
}).toList();
}
}