|
|
|
|
@ -32,6 +32,7 @@ import 'package:test_sa/providers/ppm_task_status_provider.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/bottom_sheets/asset_detail_bottom_sheet.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/date_and_time/date_picker.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/date_and_time/time_picker.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/equipment/asset_detail_page.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/images/multi_image_picker.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/item_views/info_header_widget.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/item_views/info_text_widget.dart';
|
|
|
|
|
@ -61,7 +62,10 @@ class _WoInfoFormState extends State<WoInfoForm> {
|
|
|
|
|
calculateWorkingTime();
|
|
|
|
|
if (widget.planPreventiveVisit.preventiveVisitAttachments != null && widget.planPreventiveVisit.preventiveVisitAttachments!.isNotEmpty) {
|
|
|
|
|
ppmProvider.ppmPlanAttachments = [];
|
|
|
|
|
ppmProvider.ppmPlanAttachments.addAll(widget.planPreventiveVisit.preventiveVisitAttachments!.whereType<GenericAttachmentModel>().map((e) => GenericAttachmentModel(id: e.id, name: e.name ?? '',documentType: e.documentType)).toList());
|
|
|
|
|
ppmProvider.ppmPlanAttachments.addAll(widget.planPreventiveVisit.preventiveVisitAttachments!
|
|
|
|
|
.whereType<GenericAttachmentModel>()
|
|
|
|
|
.map((e) => GenericAttachmentModel(id: e.id, name: e.name ?? '', documentType: e.documentType))
|
|
|
|
|
.toList());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -156,23 +160,9 @@ class _WoInfoFormState extends State<WoInfoForm> {
|
|
|
|
|
children: [
|
|
|
|
|
InfoHeader16Widget(widget.planPreventiveVisit.assetName ?? '').expanded,
|
|
|
|
|
// widget.planPreventiveVisit.assetName!.bodyText(context).custom(color: AppColor.headingTextColor(context)).expanded,
|
|
|
|
|
"info_icon".toSvgAsset(height: 17, width: 17).onPress(
|
|
|
|
|
() {
|
|
|
|
|
// There is only limited information for asset is returned from backend to show all info need to return the whole model from backend...
|
|
|
|
|
showModalBottomSheet(
|
|
|
|
|
context: context,
|
|
|
|
|
backgroundColor: AppColor.bottomSheetColor(context),
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
// shape: const RoundedRectangleBorder(
|
|
|
|
|
// borderRadius: BorderRadius.vertical(
|
|
|
|
|
// top: Radius.circular(20),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
clipBehavior: Clip.antiAliasWithSaveLayer,
|
|
|
|
|
builder: (BuildContext context) => _buildAssetDetailBottomSheet(context),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
const Icon(Icons.open_in_new_rounded, color: AppColor.primary10, size: 20).onPress(() {
|
|
|
|
|
Navigator.of(context).pushNamed(AssetDetailPage.id, arguments: widget.planPreventiveVisit.asset!.id);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// 2.height,
|
|
|
|
|
|