Merge remote-tracking branch 'origin/demo_branch' into demo_branch

design_3.0_task_module_new
WaseemAbbasi22 7 months ago
commit 5963a27213

@ -534,7 +534,7 @@ class AssetTransfer {
map['destRoomId'] = destRoomId;
map['comment'] = comment;
if (attachments != null) {
map['attachment'] = attachments!.map((v) => v.toJson()).toList();
map['attachments'] = attachments!.map((v) => v.toJson()).toList();
}
return map;
}
@ -554,7 +554,11 @@ class AssetTransfer {
map['assetTransferEngineerTimers'] = assetTransferEngineerTimers!.map((v) => v.toJson()).toList();
}
if (modelAssistantEmployees != null) {
map['assetTransferAssistantEmployees'] = [modelAssistantEmployees!.toJson()];
if(modelAssistantEmployees!.employeeId!=null) {
map['assetTransferAssistantEmployees'] = [modelAssistantEmployees!.toJson()];
}else {
map['assetTransferAssistantEmployees'] =[];
}
}
return map;
}

@ -129,27 +129,27 @@ class _CreateAssetTransferRequestState extends State<CreateAssetTransferRequest>
backgroundColor: AppColor.white936,
onPick: (asset) async {
_pickedAsset = asset;
await checkAssetForPendingServiceRequest(asset.id!.toInt());
if (_pickedAsset != null && pendingAssetServiceRequest != null && pendingAssetServiceRequest!.details!.isNotEmpty) {
showPendingRequestBottomSheet();
}
// await checkAssetForPendingServiceRequest(asset.id!.toInt());
// if (_pickedAsset != null && pendingAssetServiceRequest != null && pendingAssetServiceRequest!.details!.isNotEmpty) {
// showPendingRequestBottomSheet();
// }
setState(() {});
}),
if (pendingAssetServiceRequest != null && pendingAssetServiceRequest!.details!.isNotEmpty) ...[
8.height,
Row(
children: [
const Icon(Icons.warning, color: Color(0xffEE404C), size: 14),
8.width,
Text(
"This asset already have ${pendingAssetServiceRequest!.details!.length} request pending",
style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Color(0xff7D859A), decoration: TextDecoration.underline),
).expanded,
],
).onPress(() {
showPendingRequests();
}),
],
// if (pendingAssetServiceRequest != null && pendingAssetServiceRequest!.details!.isNotEmpty) ...[
// 8.height,
// Row(
// children: [
// const Icon(Icons.warning, color: Color(0xffEE404C), size: 14),
// 8.width,
// Text(
// "This asset already have ${pendingAssetServiceRequest!.details!.length} request pending",
// style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500, color: Color(0xff7D859A), decoration: TextDecoration.underline),
// ).expanded,
// ],
// ).onPress(() {
// showPendingRequests();
// }),
// ],
21.height,
requestTypeWidget(context),
12.height,
@ -177,6 +177,7 @@ class _CreateAssetTransferRequestState extends State<CreateAssetTransferRequest>
title: context.translation.building,
initialValue: _assetDestination.building,
showShadow: false,
showAsBottomSheet: true,
backgroundColor: AppColor.neutral100,
enabled: _assetDestination.site?.buildings?.isNotEmpty ?? false,
staticData: _assetDestination.site?.buildings ?? [],
@ -197,6 +198,7 @@ class _CreateAssetTransferRequestState extends State<CreateAssetTransferRequest>
context: context,
title: context.translation.floor,
showShadow: false,
showAsBottomSheet: true,
initialValue: _assetDestination.floor,
backgroundColor: AppColor.neutral100,
enabled: _assetDestination.building?.floors?.isNotEmpty ?? false,
@ -212,6 +214,7 @@ class _CreateAssetTransferRequestState extends State<CreateAssetTransferRequest>
context: context,
title: context.translation.department,
showShadow: false,
showAsBottomSheet: true,
initialValue: _assetDestination.department,
backgroundColor: AppColor.neutral100,
enabled: _assetDestination.floor?.departments?.isNotEmpty ?? false,

Loading…
Cancel
Save