TF-3578 Calendar event show free busy status
This commit is contained in:
+6
-1
@@ -32,6 +32,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
final PresentationEmail? presentationEmail;
|
||||
final OnMailtoAttendeesAction? onMailtoAttendeesAction;
|
||||
final OnOpenEmailAddressDetailAction? openEmailAddressDetailAction;
|
||||
final bool isFree;
|
||||
|
||||
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
|
||||
@@ -40,6 +41,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
required this.calendarEvent,
|
||||
required this.onCalendarEventReplyActionClick,
|
||||
required this.calendarEventReplying,
|
||||
required this.isFree,
|
||||
this.onOpenNewTabAction,
|
||||
this.onOpenComposerAction,
|
||||
this.presentationEmail,
|
||||
@@ -250,7 +252,10 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
if (dateTimeEvent.isNotEmpty) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: CalendarEventInformationWidgetStyles.fieldTopPadding),
|
||||
child: EventTimeInformationWidget(timeEvent: dateTimeEvent),
|
||||
child: EventTimeInformationWidget(
|
||||
timeEvent: dateTimeEvent,
|
||||
isFree: isFree,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const SizedBox.shrink();
|
||||
|
||||
+25
-4
@@ -1,7 +1,10 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/style_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/styles/event_time_information_widget_styles.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
@@ -9,17 +12,21 @@ import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
class EventTimeInformationWidget extends StatelessWidget {
|
||||
|
||||
final String timeEvent;
|
||||
final bool isFree;
|
||||
|
||||
const EventTimeInformationWidget({
|
||||
super.key,
|
||||
required this.timeEvent
|
||||
required this.timeEvent,
|
||||
required this.isFree,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
final imagePaths = Get.find<ImagePaths>();
|
||||
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: EventTimeInformationWidgetStyles.maxWidth,
|
||||
@@ -32,7 +39,7 @@ class EventTimeInformationWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(child: Text(
|
||||
Flexible(child: Text(
|
||||
timeEvent,
|
||||
overflow: responsiveUtils.isPortraitMobile(context) ? null : CommonTextStyle.defaultTextOverFlow,
|
||||
softWrap: responsiveUtils.isPortraitMobile(context) ? null : CommonTextStyle.defaultSoftWrap,
|
||||
@@ -42,7 +49,21 @@ class EventTimeInformationWidget extends StatelessWidget {
|
||||
fontWeight: FontWeight.w500,
|
||||
color: EventTimeInformationWidgetStyles.valueColor
|
||||
),
|
||||
))
|
||||
)),
|
||||
if (!isFree)
|
||||
...[
|
||||
const SizedBox(width: EventTimeInformationWidgetStyles.horizontalSpacing),
|
||||
Tooltip(
|
||||
message: AppLocalizations.of(context).youHaveAnotherEventAtThatSameTime,
|
||||
child: SvgPicture.asset(
|
||||
imagePaths.icError,
|
||||
width: 20,
|
||||
height: 20,
|
||||
fit: BoxFit.fill,
|
||||
colorFilter: EventTimeInformationWidgetStyles.conflictColor.asFilter(),
|
||||
),
|
||||
),
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user