|
|
|
|
@ -37,10 +37,10 @@ class WorkOrderListPage extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
print("serviceRequest.statusValue:${serviceRequest.statusValue}");
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: DefaultAppBar(title: context.translation.workOrders),
|
|
|
|
|
//backgroundColor: const Color(0xfff8f9fb),
|
|
|
|
|
body: SafeArea(
|
|
|
|
|
child: FutureBuilder(
|
|
|
|
|
appBar: DefaultAppBar(title: context.translation.workOrders),
|
|
|
|
|
//backgroundColor: const Color(0xfff8f9fb),
|
|
|
|
|
body: SafeArea(
|
|
|
|
|
child: FutureBuilder(
|
|
|
|
|
future: serviceRequestsProvider.searchWorkOrders(callId: serviceRequest.requestCode),
|
|
|
|
|
builder: (context, snap) {
|
|
|
|
|
workOrders = snap.data as List<SearchWorkOrder>;
|
|
|
|
|
@ -72,7 +72,7 @@ class WorkOrderListPage extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
StatusLabel(label: workOrders[index].currentSituation.name, textColor: AppColor.orange60, backgroundColor: AppColor.orange40),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(serviceRequest.requestCode, style: AppTextStyles.heading5.copyWith(color: context.isDark?AppColor.neutral30:const Color(0xFF3B3D4A))),
|
|
|
|
|
Text(serviceRequest.requestCode, style: AppTextStyles.heading5.copyWith(color: context.isDark ? AppColor.neutral30 : const Color(0xFF3B3D4A))),
|
|
|
|
|
],
|
|
|
|
|
).expanded,
|
|
|
|
|
if (_userProvider.user.type == UsersTypes.engineer && serviceRequest.statusValue != 5 && serviceRequest.statusValue != 3)
|
|
|
|
|
@ -93,15 +93,16 @@ class WorkOrderListPage extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.assetName}: ${workOrders[index].callRequest.asset.modelDefinition.assetName}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark?AppColor.neutral10:const Color(0xFF757575)),
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : const Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.status}: ${workOrders[index].currentSituation.name}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark?AppColor.neutral10:const Color(0xFF757575)),
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : const Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).expanded,
|
|
|
|
|
Text(workOrders[index].visitDate?.toServiceRequestCardFormat ?? "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark?AppColor.neutral30:const Color(0xFF3B3D4A))),
|
|
|
|
|
Text(workOrders[index].visitDate?.toServiceRequestCardFormat ?? "",
|
|
|
|
|
textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral30 : const Color(0xFF3B3D4A))),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
16.height,
|
|
|
|
|
@ -122,7 +123,7 @@ class WorkOrderListPage extends StatelessWidget {
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
).paddingAll(16).onPress(() {
|
|
|
|
|
).onPress(() {
|
|
|
|
|
// onPressed(request);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
@ -140,6 +141,8 @@ class WorkOrderListPage extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
)));
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|