generate QR Api email parameter added.

mohemm_HMG_flutter_upgrade
Sikander Saleem 1 year ago
parent 030887452d
commit 550992ccf4

@ -447,14 +447,15 @@ class WorkListApiClient {
}, url, postParams); }, url, postParams);
} }
Future<ITGRequest?> requestActionITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async { Future<ITGRequest?> requestActionITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments, String email) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GenerateQR_RequestAction"; String url = "${ApiConsts.cocRest}Mohemm_ITG_GenerateQR_RequestAction";
Map<String, dynamic> postParams = { Map<String, dynamic> postParams = {
"RequestType": requestType, "RequestType": requestType,
"TaskID": taskId, "TaskID": taskId,
"ItemIDStr":itemId, "ItemIDStr": itemId,
"EmployeeNumber": employeeNumber, "EmployeeNumber": employeeNumber,
"Comments": comments, "Comments": comments,
"EmailAddress": email,
"RequestID": itemId, "RequestID": itemId,
"RequestActionId": 3, "RequestActionId": 3,
"IsQRCodeGenerate": true, "IsQRCodeGenerate": true,

@ -211,11 +211,11 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
Color(0xff1BB271), Color(0xff1BB271),
], ],
).expanded, ).expanded,
if ((isApproveAvailable ||isRejectAvailable) && isGenerateAvailable) 8.width, if ((isApproveAvailable || isRejectAvailable) && isGenerateAvailable) 8.width,
if (isGenerateAvailable) if (isGenerateAvailable)
DefaultButton( DefaultButton(
LocaleKeys.generate.tr(), LocaleKeys.generate.tr(),
() => performAction("Generate"), () => performAction("Generate"),
colors: const [ colors: const [
Color(0xff28C884), Color(0xff28C884),
Color(0xff1BB271), Color(0xff1BB271),
@ -512,7 +512,8 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
void performGenerateQrAction(String requestType, taskId, itemId, String employeeNumber, String comments) async { void performGenerateQrAction(String requestType, taskId, itemId, String employeeNumber, String comments) async {
try { try {
Utils.showLoading(context); 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.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr()); Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
// Navigator.pop(context, "delegate_reload"); // Navigator.pop(context, "delegate_reload");

Loading…
Cancel
Save