diff --git a/lib/ui/work_list/worklist_detail_screen.dart b/lib/ui/work_list/worklist_detail_screen.dart index 1fbab01..4494eb6 100644 --- a/lib/ui/work_list/worklist_detail_screen.dart +++ b/lib/ui/work_list/worklist_detail_screen.dart @@ -127,7 +127,7 @@ class _WorkListDetailScreenState extends State { getPoNotification(); } if (workListData!.iTEMTYPE == "REQAPPRV") { - getPrNotificationBody = await WorkListApiClient().getPRNotificationBody(workListData!.nOTIFICATIONID!, -999); + getPRNotification(); } notificationGetRespondAttributes(); @@ -471,9 +471,7 @@ class _WorkListDetailScreenState extends State { child: isIconAsset ? SvgPicture.asset(icon) : Image.memory( - Utils.dataFromBase64String( - icon - ), + Utils.dataFromBase64String(icon), fit: BoxFit.cover, ), ) @@ -490,7 +488,7 @@ class _WorkListDetailScreenState extends State { notificationGetRespond: notificationNoteInput, textEditingController: textEditingController, onTap: (note) { - if(note.isNotEmpty && (actionMode == "APPROVED" || actionMode == "APPROVE")) { + if (note.isNotEmpty && (actionMode == "APPROVED" || actionMode == "APPROVE")) { Map payload = { "P_ACTION_MODE": actionMode, "P_APPROVER_INDEX": null, @@ -701,6 +699,23 @@ class _WorkListDetailScreenState extends State { } } + void getPRNotification() async { + try { + if (apiCallCount == 0) Utils.showLoading(context); + apiCallCount++; + getPrNotificationBody = await WorkListApiClient().getPRNotificationBody(workListData!.nOTIFICATIONID!, -999); + apiCallCount--; + if (apiCallCount == 0) { + Utils.hideLoading(context); + setState(() {}); + } + } catch (ex) { + apiCallCount--; + Utils.hideLoading(context); + Utils.handleException(ex, context, null); + } + } + void notificationGetRespondAttributes() async { try { if (apiCallCount == 0) Utils.showLoading(context);