@ -76,10 +76,10 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
_buildTextWidget ( ' ${ context . translation . assetName } : ${ _model . assetName } ' ) ,
_buildTextWidget ( ' ${ context . translation . assetNumber } : ${ _model . assetNumber } ' ) ,
_buildTextWidget ( ' ${ context . translation . model } : ${ _model . modelName } ' ) ,
_buildTextWidget ( ' ${ context . translation . sn } : ${ _model . assetSerialNo } ' ) ,
_buildTextWidget ( ' ${ context . translation . assetName } : ${ _model ? . assetName ? ? " " } ' ) ,
_buildTextWidget ( ' ${ context . translation . assetNumber } : ${ _model ? . assetNumber ? ? " " } ' ) ,
_buildTextWidget ( ' ${ context . translation . model } : ${ _model ? . modelName ? ? " " } ' ) ,
_buildTextWidget ( ' ${ context . translation . sn } : ${ _model ? . assetSerialNo ? ? " " } ' ) ,
] ,
) ,
8. height ,
@ -104,7 +104,7 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
/ / ] ,
/ / ) ,
1. width ,
Text ( _model . createdOn ! = null ? _model . createdOn . toServiceRequestCardFormat : " " ,
Text ( _model ? . createdOn ! = null ? _model . createdOn . toServiceRequestCardFormat : " " ,
textAlign: TextAlign . end , style: AppTextStyles . tinyFont . copyWith ( color: context . isDark ? AppColor . neutral10 : Color ( 0xFF3B3D4A ) ) ) ,
] ,
) ,
@ -114,17 +114,17 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
/ / sender card
_buildCard (
isSender: true ,
site: _model . senderSiteName ? ? " " ,
site: _model ? . senderSiteName ? ? " " ,
/ / / TBD
unit: _model . senderDepartmentName ? ? " " ,
comment: _model . senderComment ? ? " " ,
unit: _model ? . senderDepartmentName ? ? " " ,
comment: _model ? . senderComment ? ? " " ,
/ / / TBD
statusLabel: _model . senderMachineStatusName ! = null
statusLabel: _model ? . senderMachineStatusName ! = null
? StatusLabel (
label: _model . senderMachineStatusName ,
id: _model . senderMachineStatusId ,
label: _model ? . senderMachineStatusName ,
id: _model ? . senderMachineStatusId ,
textColor: AColors . getRequestStatusTextColor ( getIdstatus ( _model . senderMachineStatusName ) ) ,
backgroundColor: AColors . getRequestStatusColor ( getIdstatus ( _model . senderMachineStatusName ) ) )
: null ,
@ -132,17 +132,17 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
/ / receiver card
_buildCard (
isSender: false ,
site: _model . destSiteName ? ? " " ,
site: _model ? . destSiteName ? ? " " ,
/ / / TBD
unit: _model . destDepartmentName ? ? " " ,
comment: _model . receiverComment ? ? " " ,
unit: _model ? . destDepartmentName ? ? " " ,
comment: _model ? . receiverComment ? ? " " ,
/ / / TBD
statusLabel: _model . receiverMachineStatusName ! = null
statusLabel: _model ? . receiverMachineStatusName ! = null
? StatusLabel (
label: _model . receiverMachineStatusName ? ? " " ,
id: _model . receiverMachineStatusId ,
label: _model ? . receiverMachineStatusName ? ? " " ,
id: _model ? . receiverMachineStatusId ,
textColor: AColors . getRequestStatusTextColor ( getIdstatus ( _model . receiverMachineStatusName ) ) ,
backgroundColor: AColors . getRequestStatusColor ( getIdstatus ( _model . receiverMachineStatusName ) ) )
: null ,
@ -181,8 +181,10 @@ class _DeviceTransferDetailsState extends State<DeviceTransferDetails> {
isSender ? context . translation . senderDetails . heading5 ( context ) : context . translation . receiverDetails . heading5 ( context ) ,
] ,
) ,
if ( ( _userProvider . user ? . type = = UsersTypes . engineer ) & & ( isSender ? _model . senderMachineStatusName ! = " Closed " : _model . receiverMachineStatusName ! = " Closed " ) )
CircleAvatar (
if ( ( _userProvider . user ? . type = = UsersTypes . engineer ) )
if ( isSender ? ( _model ? . senderMachineStatusName ? . toLowerCase ( ) ! = " closed " & & _model ? . senderMachineStatusName ? . toLowerCase ( ) ! = " completed " )
: ( _model ? . receiverMachineStatusName ? . toLowerCase ( ) ! = " closed " & & _model ? . receiverMachineStatusName ? . toLowerCase ( ) ! = " completed " ) )
CircleAvatar (
radius: 25 ,
backgroundColor: AppColor . neutral30 ,
child: CircleAvatar (