|
|
|
|
@ -19,8 +19,9 @@ import 'package:test_sa/views/widgets/total_working_time_detail_bottomsheet.dart
|
|
|
|
|
class RecurrentTaskInfoWidget extends StatefulWidget {
|
|
|
|
|
final RecurrentWoData? model;
|
|
|
|
|
bool isClosed;
|
|
|
|
|
bool isHouseKeeper;
|
|
|
|
|
|
|
|
|
|
RecurrentTaskInfoWidget({super.key, required this.model, this.isClosed = false});
|
|
|
|
|
RecurrentTaskInfoWidget({super.key, required this.model, this.isClosed = false, this.isHouseKeeper = false});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<RecurrentTaskInfoWidget> createState() => _RecurrentTaskInfoWidgetState();
|
|
|
|
|
@ -81,6 +82,11 @@ class _RecurrentTaskInfoWidgetState extends State<RecurrentTaskInfoWidget> {
|
|
|
|
|
'${context.translation.taskNo}: ${widget.model!.taskNo!}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
'Plan Name: ${widget.model?.planRecurrent?.planName ?? "-"}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
'${context.translation.site}: ${widget.model!.site!.siteName!}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
if (widget.isHouseKeeper) ...[
|
|
|
|
|
'${context.translation.department}: ${widget.model!.department?.name ?? "-"}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
'${context.translation.floor}: ${widget.model!.floor?.name ?? "-"}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
'${context.translation.room}: ${widget.model!.room?.name ?? "-"}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
],
|
|
|
|
|
'${context.translation.assignedEmployee}: ${widget.model!.engineer!.userName ?? ""}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
'${context.translation.scheduledDate}: ${widget.model!.scheduleDate!.toMonthYearFormat}'.bodyText2(context).custom(color: AppColor.neutral120),
|
|
|
|
|
],
|
|
|
|
|
@ -91,16 +97,20 @@ class _RecurrentTaskInfoWidgetState extends State<RecurrentTaskInfoWidget> {
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
buildingInfoWidget(label: context.translation.department, value: widget.model!.department?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context)
|
|
|
|
|
.ignorePointer(widget.isClosed),
|
|
|
|
|
8.height,
|
|
|
|
|
buildingInfoWidget(label: context.translation.floor, value: widget.model!.floor?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context).ignorePointer(widget.isClosed),
|
|
|
|
|
8.height,
|
|
|
|
|
buildingInfoWidget(label: context.translation.room, value: widget.model!.room?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context).ignorePointer(widget.isClosed),
|
|
|
|
|
8.height,
|
|
|
|
|
if (!widget.isHouseKeeper) ...[
|
|
|
|
|
buildingInfoWidget(label: context.translation.department, value: widget.model!.department?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context)
|
|
|
|
|
.ignorePointer(widget.isClosed),
|
|
|
|
|
8.height,
|
|
|
|
|
buildingInfoWidget(label: context.translation.floor, value: widget.model!.floor?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context).ignorePointer(widget.isClosed),
|
|
|
|
|
8.height,
|
|
|
|
|
buildingInfoWidget(label: context.translation.room, value: widget.model!.room?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context).ignorePointer(widget.isClosed),
|
|
|
|
|
8.height,
|
|
|
|
|
],
|
|
|
|
|
_timerWidget(context, totalWorkingHours),
|
|
|
|
|
8.height,
|
|
|
|
|
_commentWidget(context: context, model: widget.model).ignorePointer(widget.isClosed),
|
|
|
|
|
if (!widget.isHouseKeeper) ...[
|
|
|
|
|
8.height,
|
|
|
|
|
_commentWidget(context: context, model: widget.model).ignorePointer(widget.isClosed),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
// ],
|
|
|
|
|
).toShadowContainer(context, padding: 12)
|
|
|
|
|
|