From c56c9533b266bc480f08cc319e59dcb12c640e0f Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Sun, 19 Nov 2023 10:09:05 +0300 Subject: [PATCH 1/3] date format issue fixed. --- .../dynamic_screens/dynamic_input_screen.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart b/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart index ea9d0a4..814ee99 100644 --- a/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart +++ b/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart @@ -356,8 +356,8 @@ class _DynamicInputScreenState extends State { // // change date format on 31/05/2023 - DateTime date = DateFormat('dd-MM-yyyy').parse(idColName!); - idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date); + DateTime date = DateFormat('dd-MM-yyyy',"en_US").parse(idColName!); + idColName = DateFormat('yyyy-MM-dd HH:mm:ss',"en_US").format(date); } } @@ -558,14 +558,14 @@ class _DynamicInputScreenState extends State { pRETURNMSG: "null", pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE, pVALUECOLUMNNAME: - getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); + getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s',"en_US").format(date)); } else { eservicesdv = ESERVICESDV( pIDCOLUMNNAME: dateString, pRETURNMSG: "null", pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE, pVALUECOLUMNNAME: - getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); + getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s',"en_US").format(date)); } getEitDffStructureList![index].eSERVICESDV = eservicesdv; setState(() {}); @@ -619,14 +619,14 @@ class _DynamicInputScreenState extends State { pRETURNMSG: "null", pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE, pVALUECOLUMNNAME: - getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); + getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s',"en_US").format(date)); } else { eservicesdv = ESERVICESDV( pIDCOLUMNNAME: dateString, pRETURNMSG: "null", pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE, pVALUECOLUMNNAME: - getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); + getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s',"en_US").format(date)); } getEitDffStructureList![index].eSERVICESDV = eservicesdv; @@ -736,7 +736,7 @@ class _DynamicInputScreenState extends State { onTap: () async { if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) { if (getEitDffStructureList![index].isDefaultTypeIsCDPS) { - selectedDate = DateFormat("yyyy/MM/dd").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", "")); + selectedDate = DateFormat("yyyy/MM/dd","en_US").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", "")); } else { selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!); } @@ -748,7 +748,7 @@ class _DynamicInputScreenState extends State { pIDCOLUMNNAME: dateString, pRETURNMSG: "null", pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE, - pVALUECOLUMNNAME: getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date)); + pVALUECOLUMNNAME: getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s',"en_US").format(date)); getEitDffStructureList![index].eSERVICESDV = eservicesdv; setState(() {}); if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) { From d7f45fa0b9b5b0deea78ecdece8636efcea4c2d8 Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Mon, 20 Nov 2023 16:33:17 +0300 Subject: [PATCH 2/3] 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"); From c9886be2d8a521cf8c234334c8e902ab458eb100 Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Tue, 21 Nov 2023 10:09:40 +0300 Subject: [PATCH 3/3] work list ITG str change --- lib/api/worklist/worklist_api_client.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/api/worklist/worklist_api_client.dart b/lib/api/worklist/worklist_api_client.dart index aaf1d07..29805ec 100644 --- a/lib/api/worklist/worklist_api_client.dart +++ b/lib/api/worklist/worklist_api_client.dart @@ -353,7 +353,7 @@ class WorkListApiClient { Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemID": itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, }; postParams.addAll(AppState().postParamsJson); @@ -368,7 +368,7 @@ class WorkListApiClient { Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemID": itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, "Comments": comments, }; @@ -384,7 +384,7 @@ class WorkListApiClient { Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemID": itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, "Comments": comments, }; @@ -400,7 +400,7 @@ class WorkListApiClient { Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemID": itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, "NewUserEMPId": newUserEMPId, "Comments": comments, @@ -419,7 +419,7 @@ class WorkListApiClient { Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemID": itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, "Comments": comments, }; @@ -435,7 +435,7 @@ class WorkListApiClient { Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemID": itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, "Comments": "", "AdditionalFields": null, @@ -453,7 +453,7 @@ class WorkListApiClient { Map postParams = { "RequestType": requestType, "TaskID": taskId, - "ItemID": itemId, + "ItemIDStr": itemId, "EmployeeNumber": employeeNumber, "NewUserEMPId": newUserEMPId, "Comments": comments,