|
|
|
|
@ -9,56 +9,59 @@ import 'package:test_sa/new_views/app_style/app_color.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/requests/request_status.dart';
|
|
|
|
|
|
|
|
|
|
class AssetDetailCardView extends StatelessWidget {
|
|
|
|
|
WorkOrderData workOrder;
|
|
|
|
|
// WorkOrderData workOrder;
|
|
|
|
|
|
|
|
|
|
AssetDetailCardView({super.key,required this.workOrder});
|
|
|
|
|
AssetDetailCardView({
|
|
|
|
|
super.key,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: workOrder.priority?.name,
|
|
|
|
|
id: workOrder.priority!.id!,
|
|
|
|
|
radius: 4,
|
|
|
|
|
textColor: AppColor.getPriorityStatusTextColor(context, workOrder.priority!.id!),
|
|
|
|
|
backgroundColor: AppColor.getPriorityStatusColor(context, workOrder.priority!.id!),
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
// StatusLabel(
|
|
|
|
|
// label: workOrder.priority?.name,
|
|
|
|
|
// id: workOrder.priority!.id!,
|
|
|
|
|
// radius: 4,
|
|
|
|
|
// textColor: AppColor.getPriorityStatusTextColor(context, workOrder.priority!.id!),
|
|
|
|
|
// backgroundColor: AppColor.getPriorityStatusColor(context, workOrder.priority!.id!),
|
|
|
|
|
// ),
|
|
|
|
|
// 8.height,
|
|
|
|
|
Text(
|
|
|
|
|
context.translation.assetInformation,
|
|
|
|
|
style: AppTextStyles.heading4.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
|
|
|
|
|
),
|
|
|
|
|
// 8.height,
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.serialNo}: ${workOrder.workOrderContactPerson[0].name ?? '-'}',
|
|
|
|
|
'${context.translation.serialNo}: ${"workOrder.workOrderContactPerson[0].name" ?? '-'}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.manufacture}: ${workOrder.workOrderContactPerson[0].name}',
|
|
|
|
|
'${context.translation.manufacture}: ${"workOrder.workOrderContactPerson[0].name"}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.model}: ${workOrder.workOrderContactPerson[0].name}',
|
|
|
|
|
'${context.translation.model}: ${"workOrder.workOrderContactPerson[0].name"}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.site}: ${workOrder.workOrderContactPerson[0].name}',
|
|
|
|
|
'${context.translation.site}: ${"workOrder.workOrderContactPerson[0].name"}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.department}: ${workOrder.workOrderContactPerson[0].name}',
|
|
|
|
|
'${context.translation.department}: ${"workOrder.workOrderContactPerson[0].name"}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
),Text(
|
|
|
|
|
'${context.translation.supplier}: ${workOrder.workOrderContactPerson[0].name}',
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.supplier}: ${"workOrder.workOrderContactPerson[0].name"}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
),Text(
|
|
|
|
|
'${'Remarks'.addTranslation}: ${workOrder.workOrderContactPerson[0].name}',
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'${'Remarks'.addTranslation}: ${"workOrder.workOrderContactPerson[0].name"}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -67,28 +70,28 @@ class AssetDetailCardView extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
'edit_icon'.toSvgAsset().onPress((){
|
|
|
|
|
//Handle edit...
|
|
|
|
|
}),
|
|
|
|
|
20.width,
|
|
|
|
|
'delete_icon'.toSvgAsset().onPress((){
|
|
|
|
|
//handle delete..
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
'edit_icon'.toSvgAsset().onPress(() {
|
|
|
|
|
//Handle edit...
|
|
|
|
|
}),
|
|
|
|
|
20.width,
|
|
|
|
|
'delete_icon'.toSvgAsset().onPress(() {
|
|
|
|
|
//handle delete..
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
20.height,
|
|
|
|
|
Container(
|
|
|
|
|
height: 100,
|
|
|
|
|
width:100,
|
|
|
|
|
width: 100,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
child: 'edit_icon'.toSvgAsset().center,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
],)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
).toShadowContainer(context);
|
|
|
|
|
}
|
|
|
|
|
|