|  |  |  | @ -47,7 +47,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |     _userProvider ??= Provider.of<UserProvider>(context); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     return Scaffold( | 
		
	
		
			
				|  |  |  |  |       appBar: DefaultAppBar(title: context.translation.deviceTransferDetails), | 
		
	
		
			
				|  |  |  |  |       appBar: DefaultAppBar(title: context.translation.transferDetails), | 
		
	
		
			
				|  |  |  |  |       key: _scaffoldKey, | 
		
	
		
			
				|  |  |  |  |       body: SafeArea( | 
		
	
		
			
				|  |  |  |  |         child: FutureBuilder( | 
		
	
	
		
			
				
					|  |  |  | @ -69,59 +69,17 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |                         child: SingleChildScrollView( | 
		
	
		
			
				|  |  |  |  |                           child: Column( | 
		
	
		
			
				|  |  |  |  |                             children: [ | 
		
	
		
			
				|  |  |  |  |                               Row( | 
		
	
		
			
				|  |  |  |  |                                 crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |                               Column( | 
		
	
		
			
				|  |  |  |  |                                 crossAxisAlignment: CrossAxisAlignment.stretch, | 
		
	
		
			
				|  |  |  |  |                                 children: [ | 
		
	
		
			
				|  |  |  |  |                                   Column( | 
		
	
		
			
				|  |  |  |  |                                     crossAxisAlignment: CrossAxisAlignment.stretch, | 
		
	
		
			
				|  |  |  |  |                                   Row( | 
		
	
		
			
				|  |  |  |  |                                     children: [ | 
		
	
		
			
				|  |  |  |  |                                       Text( | 
		
	
		
			
				|  |  |  |  |                                         "Transfer Details".addTranslation, | 
		
	
		
			
				|  |  |  |  |                                         style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                       ), | 
		
	
		
			
				|  |  |  |  |                                       _buildTextWidget('${context.translation.requestNo} : ${_model?.transferCode ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                       _buildTextWidget('${context.translation.transferType} : ${_model?.transferType?.name ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                       _buildTextWidget('${context.translation.createdBy} : ${_model?.name ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                       const Divider().defaultStyle(context), | 
		
	
		
			
				|  |  |  |  |                                       Text( | 
		
	
		
			
				|  |  |  |  |                                         "Asset Info".addTranslation, | 
		
	
		
			
				|  |  |  |  |                                         style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                       ), | 
		
	
		
			
				|  |  |  |  |                                       _buildTextWidget('${context.translation.assetName} : ${_model?.assetName?.cleanupWhitespace.capitalizeFirstOfEach ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                       _buildTextWidget('${context.translation.assetNumber} : ${_model?.assetNumber ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                       _buildTextWidget('${context.translation.model} : ${_model?.modelName ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                       _buildTextWidget('${context.translation.sn} : ${_model?.assetSerialNo ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                       Column( | 
		
	
		
			
				|  |  |  |  |                                         crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |                                         children: [ | 
		
	
		
			
				|  |  |  |  |                                           _contactInfo(), | 
		
	
		
			
				|  |  |  |  |                                           if ((_model?.comment ?? "").isNotEmpty) ...[ | 
		
	
		
			
				|  |  |  |  |                                             const Divider().defaultStyle(context), | 
		
	
		
			
				|  |  |  |  |                                             Text( | 
		
	
		
			
				|  |  |  |  |                                               "Comments".addTranslation, | 
		
	
		
			
				|  |  |  |  |                                               style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                             ), | 
		
	
		
			
				|  |  |  |  |                                             8.height, | 
		
	
		
			
				|  |  |  |  |                                             _buildTextWidget(_model!.comment!), | 
		
	
		
			
				|  |  |  |  |                                           ], | 
		
	
		
			
				|  |  |  |  |                                           if (_attachments.isNotEmpty) ...[ | 
		
	
		
			
				|  |  |  |  |                                             const Divider().defaultStyle(context), | 
		
	
		
			
				|  |  |  |  |                                             Text( | 
		
	
		
			
				|  |  |  |  |                                               "Attachments".addTranslation, | 
		
	
		
			
				|  |  |  |  |                                               style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                             ), | 
		
	
		
			
				|  |  |  |  |                                             8.height, | 
		
	
		
			
				|  |  |  |  |                                             FilesList(images: _model?.assetTransferAttachments?.map((e) => URLs.getFileUrl(e.attachmentName ?? '') ?? '').toList() ?? []), | 
		
	
		
			
				|  |  |  |  |                                             //attachmentWidget(), | 
		
	
		
			
				|  |  |  |  |                                           ] | 
		
	
		
			
				|  |  |  |  |                                         ], | 
		
	
		
			
				|  |  |  |  |                                       StatusLabel( | 
		
	
		
			
				|  |  |  |  |                                         label: _model?.transferType?.name, | 
		
	
		
			
				|  |  |  |  |                                         id: _model?.transferType?.id?.toInt(), | 
		
	
		
			
				|  |  |  |  |                                         textColor: AppColor.getRequestStatusTextColorByName(context, _model?.transferType?.name), | 
		
	
		
			
				|  |  |  |  |                                         backgroundColor: AppColor.getRequestStatusColorByName(context, _model?.transferType?.name), | 
		
	
		
			
				|  |  |  |  |                                       ), | 
		
	
		
			
				|  |  |  |  |                                     ], | 
		
	
		
			
				|  |  |  |  |                                   ).expanded, | 
		
	
		
			
				|  |  |  |  |                                   Column( | 
		
	
		
			
				|  |  |  |  |                                     crossAxisAlignment: CrossAxisAlignment.end, | 
		
	
		
			
				|  |  |  |  |                                     children: [ | 
		
	
		
			
				|  |  |  |  |                                       1.width, | 
		
	
		
			
				|  |  |  |  |                                       Text( | 
		
	
		
			
				|  |  |  |  |                                         _model?.createdOn != null ? _model!.createdOn!.toServiceRequestCardFormat : "", | 
		
	
		
			
				|  |  |  |  |                                         textAlign: TextAlign.end, | 
		
	
	
		
			
				
					|  |  |  | @ -129,20 +87,47 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |                                       ), | 
		
	
		
			
				|  |  |  |  |                                     ], | 
		
	
		
			
				|  |  |  |  |                                   ), | 
		
	
		
			
				|  |  |  |  |                                   8.height, | 
		
	
		
			
				|  |  |  |  |                                   context.translation.callDetails.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.trNumber} : ${_model?.transferCode ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.createdBy} : ${_model?.name ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   const Divider().defaultStyle(context), | 
		
	
		
			
				|  |  |  |  |                                   context.translation.assetInformation.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.assetName} : ${_model?.assetName?.cleanupWhitespace.capitalizeFirstOfEach ?? ""}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.assetNumber} : ${_model?.assetNumber ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.model} : ${_model?.modelName ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.sn} : ${_model?.assetSerialNo ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.site} : ${_model?.senderSiteName ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.building} : ${_model?.senderBuildingName ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.floor} : ${_model?.senderFloorName ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   _buildTextWidget('${context.translation.department} : ${_model?.senderDepartmentName ?? "-"}'), | 
		
	
		
			
				|  |  |  |  |                                   Column( | 
		
	
		
			
				|  |  |  |  |                                     crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |                                     children: [ | 
		
	
		
			
				|  |  |  |  |                                       _contactInfo(), | 
		
	
		
			
				|  |  |  |  |                                       if ((_model?.comment ?? "").isNotEmpty) ...[ | 
		
	
		
			
				|  |  |  |  |                                         const Divider().defaultStyle(context), | 
		
	
		
			
				|  |  |  |  |                                         context.translation.callComments.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                         8.height, | 
		
	
		
			
				|  |  |  |  |                                         _buildTextWidget(_model!.comment!), | 
		
	
		
			
				|  |  |  |  |                                       ], | 
		
	
		
			
				|  |  |  |  |                                       if (_attachments.isNotEmpty) ...[ | 
		
	
		
			
				|  |  |  |  |                                         const Divider().defaultStyle(context), | 
		
	
		
			
				|  |  |  |  |                                         Text( | 
		
	
		
			
				|  |  |  |  |                                           "Attachments".addTranslation, | 
		
	
		
			
				|  |  |  |  |                                           style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50), | 
		
	
		
			
				|  |  |  |  |                                         ), | 
		
	
		
			
				|  |  |  |  |                                         8.height, | 
		
	
		
			
				|  |  |  |  |                                         FilesList(images: _model?.assetTransferAttachments?.map((e) => URLs.getFileUrl(e.attachmentName ?? '') ?? '').toList() ?? []), | 
		
	
		
			
				|  |  |  |  |                                         //attachmentWidget(), | 
		
	
		
			
				|  |  |  |  |                                       ] | 
		
	
		
			
				|  |  |  |  |                                     ], | 
		
	
		
			
				|  |  |  |  |                                   ), | 
		
	
		
			
				|  |  |  |  |                                 ], | 
		
	
		
			
				|  |  |  |  |                               ).toShadowContainer(context), | 
		
	
		
			
				|  |  |  |  |                               8.height, | 
		
	
		
			
				|  |  |  |  |                               if (_model?.transferType?.value == 1) ...[ | 
		
	
		
			
				|  |  |  |  |                                 _internalRequestDetailsCard( | 
		
	
		
			
				|  |  |  |  |                                   statusLabel: _model?.senderMachineStatusName != null | 
		
	
		
			
				|  |  |  |  |                                       ? StatusLabel( | 
		
	
		
			
				|  |  |  |  |                                           label: _model!.senderMachineStatusName!, | 
		
	
		
			
				|  |  |  |  |                                           id: _model!.senderMachineStatusId!.toInt(), | 
		
	
		
			
				|  |  |  |  |                                           textColor: AppColor.getRequestStatusTextColorByName(context, _model!.senderMachineStatusName!), | 
		
	
		
			
				|  |  |  |  |                                           backgroundColor: AppColor.getRequestStatusColorByName(context, _model!.senderMachineStatusName!), | 
		
	
		
			
				|  |  |  |  |                                         ) | 
		
	
		
			
				|  |  |  |  |                                       : null, | 
		
	
		
			
				|  |  |  |  |                                 ) | 
		
	
		
			
				|  |  |  |  |                                 _internalRequestDetailsCard() | 
		
	
		
			
				|  |  |  |  |                               ] else ...[ | 
		
	
		
			
				|  |  |  |  |                                 // sender card | 
		
	
		
			
				|  |  |  |  |                                 _buildCard( | 
		
	
	
		
			
				
					|  |  |  | @ -151,6 +136,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |                                   dept: _model?.senderDepartmentName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", | 
		
	
		
			
				|  |  |  |  |                                   building: _model?.senderBuildingName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", | 
		
	
		
			
				|  |  |  |  |                                   floor: _model?.senderFloorName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", | 
		
	
		
			
				|  |  |  |  |                                   assignTo: _model?.senderAssignedEmployeeName, | 
		
	
		
			
				|  |  |  |  |                                   comment: _model?.senderComment ?? "", | 
		
	
		
			
				|  |  |  |  |                                   statusLabel: _model?.senderMachineStatusName != null | 
		
	
		
			
				|  |  |  |  |                                       ? StatusLabel( | 
		
	
	
		
			
				
					|  |  |  | @ -169,6 +155,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |                                   dept: _model?.destDepartmentName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", | 
		
	
		
			
				|  |  |  |  |                                   building: _model?.destBuildingName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", | 
		
	
		
			
				|  |  |  |  |                                   floor: _model?.destFloorName?.cleanupWhitespace.capitalizeFirstOfEach ?? "", | 
		
	
		
			
				|  |  |  |  |                                   assignTo: _model?.receiverAssignedEmployeeName, | 
		
	
		
			
				|  |  |  |  |                                   comment: _model?.receiverComment ?? "", | 
		
	
		
			
				|  |  |  |  |                                   statusLabel: _model?.receiverMachineStatusName != null | 
		
	
		
			
				|  |  |  |  |                                       ? StatusLabel( | 
		
	
	
		
			
				
					|  |  |  | @ -198,7 +185,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |     return text.bodyText(context); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   _internalRequestDetailsCard({StatusLabel? statusLabel}) { | 
		
	
		
			
				|  |  |  |  |   _internalRequestDetailsCard() { | 
		
	
		
			
				|  |  |  |  |     bool isCurrentEngineerEligibleForEdit = _model?.senderAssignedEmployeeId == _userProvider!.user?.userID; | 
		
	
		
			
				|  |  |  |  |     bool isCurrentRequestEditAble = (!(_model?.senderMachineStatusValue == 3)); | 
		
	
		
			
				|  |  |  |  |     return Column( | 
		
	
	
		
			
				
					|  |  |  | @ -210,8 +197,23 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |             Column( | 
		
	
		
			
				|  |  |  |  |               crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |               children: [ | 
		
	
		
			
				|  |  |  |  |                 statusLabel ?? Container(), | 
		
	
		
			
				|  |  |  |  |                 if (statusLabel != null) 8.height, | 
		
	
		
			
				|  |  |  |  |                 Row( | 
		
	
		
			
				|  |  |  |  |                   children: [ | 
		
	
		
			
				|  |  |  |  |                     StatusLabel( | 
		
	
		
			
				|  |  |  |  |                       label: _model!.senderMachineStatusName!, | 
		
	
		
			
				|  |  |  |  |                       id: _model!.senderMachineStatusId!.toInt(), | 
		
	
		
			
				|  |  |  |  |                       textColor: AppColor.getRequestStatusTextColorByName(context, _model!.senderMachineStatusName!), | 
		
	
		
			
				|  |  |  |  |                       backgroundColor: AppColor.getRequestStatusColorByName(context, _model!.senderMachineStatusName!), | 
		
	
		
			
				|  |  |  |  |                     ), | 
		
	
		
			
				|  |  |  |  |                     // 8.width, | 
		
	
		
			
				|  |  |  |  |                     // StatusLabel( | 
		
	
		
			
				|  |  |  |  |                     //   label: _model?.transferType?.name, | 
		
	
		
			
				|  |  |  |  |                     //   id: _model?.transferType?.id?.toInt(), | 
		
	
		
			
				|  |  |  |  |                     //   textColor: AppColor.getRequestStatusTextColorByName(context, _model?.transferType?.name), | 
		
	
		
			
				|  |  |  |  |                     //   backgroundColor: AppColor.getRequestStatusColorByName(context, _model?.transferType?.name), | 
		
	
		
			
				|  |  |  |  |                     // ) | 
		
	
		
			
				|  |  |  |  |                   ], | 
		
	
		
			
				|  |  |  |  |                 ), | 
		
	
		
			
				|  |  |  |  |               ], | 
		
	
		
			
				|  |  |  |  |             ), | 
		
	
		
			
				|  |  |  |  |             if ((_userProvider!.user?.type == UsersTypes.engineer)) | 
		
	
	
		
			
				
					|  |  |  | @ -224,14 +226,15 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |                 }), | 
		
	
		
			
				|  |  |  |  |           ], | 
		
	
		
			
				|  |  |  |  |         ), | 
		
	
		
			
				|  |  |  |  |         context.translation.details.heading5(context), | 
		
	
		
			
				|  |  |  |  |         infoText(label: context.translation.site, value: _model?.senderSiteName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Sender Building".addTranslation, value: _model?.senderBuildingName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Sender Floor".addTranslation, value: _model?.senderFloorName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Sender Department".addTranslation, value: _model?.senderDepartmentName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Receiver Building".addTranslation, value: _model?.destBuildingName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Receiver Floor".addTranslation, value: _model?.destFloorName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Receiver Department".addTranslation, value: _model?.destDepartmentName), | 
		
	
		
			
				|  |  |  |  |         8.height, | 
		
	
		
			
				|  |  |  |  |         context.translation.workOrderDetails.heading5(context), | 
		
	
		
			
				|  |  |  |  |         infoText(label: context.translation.destinationSite, value: _model?.senderSiteName), | 
		
	
		
			
				|  |  |  |  |         // infoText(label: "Sender Building".addTranslation, value: _model?.senderBuildingName), | 
		
	
		
			
				|  |  |  |  |         // infoText(label: "Sender Floor".addTranslation, value: _model?.senderFloorName), | 
		
	
		
			
				|  |  |  |  |         // infoText(label: "Sender Department".addTranslation, value: _model?.senderDepartmentName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Building".addTranslation, value: _model?.destBuildingName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Floor".addTranslation, value: _model?.destFloorName), | 
		
	
		
			
				|  |  |  |  |         infoText(label: "Department".addTranslation, value: _model?.destDepartmentName), | 
		
	
		
			
				|  |  |  |  |         if (_model!.senderComment != null && _model!.senderComment!.isNotEmpty) ...[ | 
		
	
		
			
				|  |  |  |  |           8.height, | 
		
	
		
			
				|  |  |  |  |           const Divider().defaultStyle(context), | 
		
	
	
		
			
				
					|  |  |  | @ -245,11 +248,10 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |     ).toShadowContainer(context); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   _buildCard({required String site, String? building, String? dept, String? floor, required String comment, required bool isSender, StatusLabel? statusLabel}) { | 
		
	
		
			
				|  |  |  |  |   _buildCard({required String site, String? building, String? dept, String? floor, required String comment, required bool isSender, StatusLabel? statusLabel, String? assignTo}) { | 
		
	
		
			
				|  |  |  |  |     bool isCurrentEngineerEligibleForEdit = isSender ? _model?.senderAssignedEmployeeId == _userProvider!.user?.userID : _model?.receiverAssignedEmployeeId == _userProvider!.user?.userID; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     bool isCurrentRequestClosed = isSender ? ((_model?.senderMachineStatusValue == 3)) : ((_model?.receiverMachineStatusValue == 3)); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     return Column( | 
		
	
		
			
				|  |  |  |  |       crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |       children: [ | 
		
	
	
		
			
				
					|  |  |  | @ -283,6 +285,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> { | 
		
	
		
			
				|  |  |  |  |         infoText(label: context.translation.building, value: building), | 
		
	
		
			
				|  |  |  |  |         infoText(label: context.translation.floor, value: floor), | 
		
	
		
			
				|  |  |  |  |         infoText(label: context.translation.department, value: dept), | 
		
	
		
			
				|  |  |  |  |         infoText(label: context.translation.assignedTo, value: assignTo), | 
		
	
		
			
				|  |  |  |  |         if (comment.isNotEmpty) ...[ | 
		
	
		
			
				|  |  |  |  |           8.height, | 
		
	
		
			
				|  |  |  |  |           const Divider().defaultStyle(context), | 
		
	
	
		
			
				
					|  |  |  | 
 |