diff --git a/lib/ui/work_list/worklist_detail_screen.dart b/lib/ui/work_list/worklist_detail_screen.dart index c80f1b4..3bb3b5d 100644 --- a/lib/ui/work_list/worklist_detail_screen.dart +++ b/lib/ui/work_list/worklist_detail_screen.dart @@ -245,7 +245,7 @@ class _WorkListDetailScreenState extends State { if ((workListData?.sUBJECT ?? "").isNotEmpty) workListData!.sUBJECT!.toText14().paddingOnly(top: 20, right: 21, left: 21), PageView( controller: controller, - onPageChanged: (pageIndex) { + onPageChanged: (int pageIndex) { setState(() { tabIndex = pageIndex; }); @@ -586,7 +586,7 @@ class _WorkListDetailScreenState extends State { Future performNetworkCall(BuildContext context, {String? email, String? userId}) async { showDialog( context: context, - builder: (cxt) => ConfirmDialog( + builder: (BuildContext cxt) => ConfirmDialog( message: LocaleKeys.wantToReject.tr(), okTitle: LocaleKeys.reject.tr(), onTap: () async { @@ -668,25 +668,28 @@ class _WorkListDetailScreenState extends State { void performAction(String actionMode, {String? title}) { showDialog( context: context, - builder: (cxt) => AcceptRejectInputDialog( + builder: (BuildContext cxt) => AcceptRejectInputDialog( message: title != null ? null : LocaleKeys.requestedItems.tr(), title: title, notificationGetRespond: notificationNoteInput, actionMode: actionMode, - onTap: (note) { + onTap: (String note) { + List> responseAttribute = []; + + for (var element in getNotificationRespondAttributes!) { + responseAttribute.add({ + "ATTRIBUTE_NAME": element!.attributeName, + if (element!.attributeType == "number") "ATTRIBUTE_NUMBER_VALUE": note else if (element!.attributeType == "VARCHAR2") "ATTRIBUTE_TEXT_VALUE": note + }); + } + Map payload = { "P_ACTION_MODE": actionMode, "P_APPROVER_INDEX": null, "P_COMMENTS": note, "P_FORWARD_TO_USER_NAME": "", "P_NOTIFICATION_ID": workListData!.nOTIFICATIONID, - "RespondAttributeList": [ - if (notificationNoteInput != null) - { - "ATTRIBUTE_NAME": notificationNoteInput!.attributeName, - if (notificationNoteInput!.attributeType == "number") "ATTRIBUTE_NUMBER_VALUE": note else if (notificationNoteInput!.attributeType == "VARCHAR2") "ATTRIBUTE_TEXT_VALUE": note - } - ], + "RespondAttributeList":responseAttribute, }; if (actionMode == "APPROVED" || actionMode == "APPROVE" || actionMode == "CLOSE" || actionMode == "ANSWER_INFO" || actionMode == "RFC") { performNotificationAction(payload); @@ -999,15 +1002,15 @@ class _WorkListDetailScreenState extends State { notificationButtonsList.clear(); notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!); if (notificationButtonsList.isNotEmpty) { - isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE"); - isApproveAvailable = notificationButtonsList.any((element) { + isCloseAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE"); + isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) { if (element.bUTTONACTION == "APPROVED" || element.bUTTONACTION == "APPROVE") { approveAction = element.bUTTONACTION!; return true; } return false; }); - isRejectAvailable = notificationButtonsList.any((element) { + isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) { if (element.bUTTONACTION == "REJECTED" || element.bUTTONACTION == "REJECT") { rejectAction = element.bUTTONACTION!; return true;