|
|
|
|
@ -15,6 +15,7 @@ import 'package:test_sa/new_views/common_widgets/app_filled_button.dart';
|
|
|
|
|
import 'package:test_sa/new_views/common_widgets/default_app_bar.dart';
|
|
|
|
|
import 'package:test_sa/views/app_style/colors.dart';
|
|
|
|
|
import 'package:test_sa/views/app_style/sizing.dart';
|
|
|
|
|
import 'package:test_sa/views/pages/user/requests/update_service_request_page.dart';
|
|
|
|
|
import 'package:test_sa/views/pages/user/requests/work_order/work_orders_list_page.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/images/files_list.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/loaders/app_loading.dart';
|
|
|
|
|
@ -54,45 +55,55 @@ class ServiceRequestDetailsPage extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: serviceRequest.priority.name,
|
|
|
|
|
id: serviceRequest.priority.id,
|
|
|
|
|
textColor: AColors.getPriorityStatusTextColor(serviceRequest.priority.id),
|
|
|
|
|
backgroundColor: AColors.getPriorityStatusColor(serviceRequest.priority.id)),
|
|
|
|
|
8.width,
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: serviceRequest.statusLabel,
|
|
|
|
|
textColor: AColors.getRequestStatusTextColor(serviceRequest.statusValue),
|
|
|
|
|
backgroundColor: AColors.getRequestStatusColor(serviceRequest.statusValue)),
|
|
|
|
|
1.width.expanded,
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: serviceRequest.priority.name,
|
|
|
|
|
id: serviceRequest.priority.id,
|
|
|
|
|
textColor: AColors.getPriorityStatusTextColor(serviceRequest.priority.id),
|
|
|
|
|
backgroundColor: AColors.getPriorityStatusColor(serviceRequest.priority.id)),
|
|
|
|
|
8.width,
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: serviceRequest.statusLabel,
|
|
|
|
|
textColor: AColors.getRequestStatusTextColor(serviceRequest.statusValue),
|
|
|
|
|
backgroundColor: AColors.getRequestStatusColor(serviceRequest.statusValue)),
|
|
|
|
|
1.width.expanded,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(serviceRequest.deviceEnName, style: AppTextStyles.heading5.copyWith(color: const Color(0xFF3B3D4A))),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.assetNumber}: ${serviceRequest.device.assetNumber}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'Request Type: ${serviceRequest.type.name}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'Request No: ${serviceRequest.requestCode}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).expanded,
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
if (_userProvider.user.type == UsersTypes.engineer)
|
|
|
|
|
"edit".toSvgAsset(width: 48).onPress(() {
|
|
|
|
|
/// todo [zaid] : update service request
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => const UpdateServiceRequestPage()));
|
|
|
|
|
}),
|
|
|
|
|
if (_userProvider.user.type == UsersTypes.engineer) 16.height,
|
|
|
|
|
Text(serviceRequest.date.toServiceRequestCardFormat, textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: const Color(0xFF3B3D4A))),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(serviceRequest.deviceEnName, style: AppTextStyles.heading5.copyWith(color: const Color(0xFF3B3D4A))),
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.assetNumber}: ${serviceRequest.device.assetNumber}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'Request Type: ${serviceRequest.type.name}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'Request No: ${serviceRequest.requestCode}',
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(color: Color(0xFF757575)),
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
const Divider(color: Color(0xFFEAF1F4), height: 1, thickness: 1),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(
|
|
|
|
|
|