From 550992ccf40b275e0e63b2b71f5d73cba74df628 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Sun, 28 Jul 2024 10:54:50 +0300 Subject: [PATCH] generate QR Api email parameter added. --- lib/api/worklist/worklist_api_client.dart | 5 +++-- lib/ui/work_list/itg_detail_screen.dart | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/api/worklist/worklist_api_client.dart b/lib/api/worklist/worklist_api_client.dart index 732ed06..91cd04f 100644 --- a/lib/api/worklist/worklist_api_client.dart +++ b/lib/api/worklist/worklist_api_client.dart @@ -447,14 +447,15 @@ class WorkListApiClient { }, url, postParams); } - Future requestActionITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async { + Future requestActionITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments, String email) async { String url = "${ApiConsts.cocRest}Mohemm_ITG_GenerateQR_RequestAction"; Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemIDStr":itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, "Comments": comments, + "EmailAddress": email, "RequestID": itemId, "RequestActionId": 3, "IsQRCodeGenerate": true, diff --git a/lib/ui/work_list/itg_detail_screen.dart b/lib/ui/work_list/itg_detail_screen.dart index 2aa9490..2381b70 100644 --- a/lib/ui/work_list/itg_detail_screen.dart +++ b/lib/ui/work_list/itg_detail_screen.dart @@ -211,11 +211,11 @@ class _ItgDetailScreenState extends State { Color(0xff1BB271), ], ).expanded, - if ((isApproveAvailable ||isRejectAvailable) && isGenerateAvailable) 8.width, + if ((isApproveAvailable || isRejectAvailable) && isGenerateAvailable) 8.width, if (isGenerateAvailable) DefaultButton( LocaleKeys.generate.tr(), - () => performAction("Generate"), + () => performAction("Generate"), colors: const [ Color(0xff28C884), Color(0xff1BB271), @@ -512,7 +512,8 @@ class _ItgDetailScreenState extends State { void performGenerateQrAction(String requestType, taskId, itemId, String employeeNumber, String comments) async { try { Utils.showLoading(context); - ITGRequest? itgRequest = await WorkListApiClient().requestActionITGRequest(requestType, taskId, itemId, employeeNumber, "", comments); + ITGRequest? itgRequest = + await WorkListApiClient().requestActionITGRequest(requestType, taskId, itemId, employeeNumber, "", comments, AppState().memberInformationList?.eMPLOYEEEMAILADDRESS ?? ""); Utils.hideLoading(context); Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr()); // Navigator.pop(context, "delegate_reload");