From d7f45fa0b9b5b0deea78ecdece8636efcea4c2d8 Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Mon, 20 Nov 2023 16:33:17 +0300 Subject: [PATCH] ITG change pushed. --- lib/api/worklist/worklist_api_client.dart | 12 ++++++------ .../itg_forms_models/request_detail_model.dart | 4 ++-- lib/ui/work_list/itg_detail_screen.dart | 14 +++++++------- lib/ui/work_list/sheets/selected_item_sheet.dart | 6 +++--- .../work_list/sheets/selected_itg_item_sheet.dart | 6 +++--- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/api/worklist/worklist_api_client.dart b/lib/api/worklist/worklist_api_client.dart index 628701f..aaf1d07 100644 --- a/lib/api/worklist/worklist_api_client.dart +++ b/lib/api/worklist/worklist_api_client.dart @@ -348,7 +348,7 @@ class WorkListApiClient { }, url, postParams); } - Future getITGFormDetails(String requestType, int taskId, int itemId, String employeeNumber) async { + Future getITGFormDetails(String requestType, taskId, itemId, String employeeNumber) async { String url = "${ApiConsts.cocRest}ITGGetFormDetials"; Map postParams = { "RequestType": requestType, @@ -363,7 +363,7 @@ class WorkListApiClient { }, url, postParams); } - Future rejectITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String comments) async { + Future rejectITGRequest(String requestType, taskId, itemId, String employeeNumber, String comments) async { String url = "${ApiConsts.cocRest}ITGRejectRequest"; Map postParams = { "RequestType": requestType, @@ -379,7 +379,7 @@ class WorkListApiClient { }, url, postParams); } - Future approveITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String comments) async { + Future approveITGRequest(String requestType, taskId, itemId, String employeeNumber, String comments) async { String url = "${ApiConsts.cocRest}ITGApproveRequest"; Map postParams = { "RequestType": requestType, @@ -395,7 +395,7 @@ class WorkListApiClient { }, url, postParams); } - Future delegateITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String newUserEMPId, String comments) async { + Future delegateITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async { String url = "${ApiConsts.cocRest}ITGDelegateRequest"; Map postParams = { "RequestType": requestType, @@ -414,7 +414,7 @@ class WorkListApiClient { // ANSWER = 'Services/COCWS.svc/REST/ITGAnswer'; - Future answerITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String newUserEMPId, String comments) async { + Future answerITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async { String url = "${ApiConsts.cocRest}ITGAnswer"; Map postParams = { "RequestType": requestType, @@ -448,7 +448,7 @@ class WorkListApiClient { }, url, postParams); } - Future informationITGRequest(String requestType, int taskId, int itemId, String employeeNumber, String newUserEMPId, String comments) async { + Future informationITGRequest(String requestType, taskId, itemId, String employeeNumber, String newUserEMPId, String comments) async { String url = "${ApiConsts.cocRest}ITGRequestInformation"; Map postParams = { "RequestType": requestType, diff --git a/lib/models/itg_forms_models/request_detail_model.dart b/lib/models/itg_forms_models/request_detail_model.dart index 1193423..e6d2ca8 100644 --- a/lib/models/itg_forms_models/request_detail_model.dart +++ b/lib/models/itg_forms_models/request_detail_model.dart @@ -1,6 +1,6 @@ class RequestDetails { - int? iD; - int? itemID; + dynamic iD; + dynamic itemID; String? listID; String? listName; String? modifiedDate; diff --git a/lib/ui/work_list/itg_detail_screen.dart b/lib/ui/work_list/itg_detail_screen.dart index 05e542e..5d48c53 100644 --- a/lib/ui/work_list/itg_detail_screen.dart +++ b/lib/ui/work_list/itg_detail_screen.dart @@ -64,7 +64,7 @@ class _ItgDetailScreenState extends State { void getItgData() async { try { Utils.showLoading(context); - itgRequest = await WorkListApiClient().getITGFormDetails(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? ""); + itgRequest = await WorkListApiClient().getITGFormDetails(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? ""); allowedActionList = itgRequest?.allowedActions ?? []; if (allowedActionList.isNotEmpty) { isCloseAvailable = allowedActionList.any((element) => element.action == "CLOSE"); @@ -467,18 +467,18 @@ class _ItgDetailScreenState extends State { actionMode: actionMode, onTap: (note) { if (actionMode == "APPROVED") { - performApproveAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note); + performApproveAction(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note); } else if (actionMode == "Answer") { - performAnswerAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note); + performAnswerAction(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note); } else { - performRejectAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note); + performRejectAction(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note); } }, ), ); } - void performAnswerAction(String requestType, int taskId, int itemId, String employeeNumber, String comments) async { + void performAnswerAction(String requestType, taskId, itemId, String employeeNumber, String comments) async { try { Utils.showLoading(context); ITGRequest? itgRequest = await WorkListApiClient().answerITGRequest(requestType, taskId, itemId, employeeNumber, "", comments); @@ -502,7 +502,7 @@ class _ItgDetailScreenState extends State { } } - void performRejectAction(String requestType, int taskId, int itemId, String employeeNumber, String comments) async { + void performRejectAction(String requestType, taskId, itemId, String employeeNumber, String comments) async { try { Utils.showLoading(context); ITGRequest? itgRequest = await WorkListApiClient().rejectITGRequest(requestType, taskId, itemId, employeeNumber, comments); @@ -526,7 +526,7 @@ class _ItgDetailScreenState extends State { } } - void performApproveAction(String requestType, int taskId, int itemId, String employeeNumber, String comments) async { + void performApproveAction(String requestType, taskId, itemId, String employeeNumber, String comments) async { try { Utils.showLoading(context); ITGRequest? itgRequest = await WorkListApiClient().approveITGRequest(requestType, taskId, itemId, employeeNumber, comments); diff --git a/lib/ui/work_list/sheets/selected_item_sheet.dart b/lib/ui/work_list/sheets/selected_item_sheet.dart index 85395a6..2efe88b 100644 --- a/lib/ui/work_list/sheets/selected_item_sheet.dart +++ b/lib/ui/work_list/sheets/selected_item_sheet.dart @@ -211,13 +211,13 @@ class SelectedItemSheet extends StatelessWidget { try { var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!]; if (apiMode == "Delegate") { - await WorkListApiClient().delegateITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", + await WorkListApiClient().delegateITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment); } else if (apiMode == "RequestInformation") { - await WorkListApiClient().informationITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", + await WorkListApiClient().informationITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment); } else if (apiMode == "Answer") { - await WorkListApiClient().answerITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", + await WorkListApiClient().answerITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment); } Utils.hideLoading(context); diff --git a/lib/ui/work_list/sheets/selected_itg_item_sheet.dart b/lib/ui/work_list/sheets/selected_itg_item_sheet.dart index e836a07..db10717 100644 --- a/lib/ui/work_list/sheets/selected_itg_item_sheet.dart +++ b/lib/ui/work_list/sheets/selected_itg_item_sheet.dart @@ -122,13 +122,13 @@ class SelectedItgItemSheet extends StatelessWidget { var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!]; if (apiMode == "Delegate") { await WorkListApiClient() - .delegateITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment); + .delegateITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment); } else if (apiMode == "RequestInformation") { await WorkListApiClient() - .informationITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment); + .informationITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment); } else if (apiMode == "Answer") { await WorkListApiClient() - .answerITGRequest(requestDetails.requestType!, requestDetails.iD!, requestDetails.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment); + .answerITGRequest(requestDetails.requestType!, requestDetails.iD, requestDetails.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", wfHistory.employeeID!, comment); } Utils.hideLoading(context); Navigator.pop(context, "delegate_reload");