diff --git a/lib/api/worklist/worklist_api_client.dart b/lib/api/worklist/worklist_api_client.dart index 51a47bb..626ac6a 100644 --- a/lib/api/worklist/worklist_api_client.dart +++ b/lib/api/worklist/worklist_api_client.dart @@ -216,9 +216,24 @@ class WorkListApiClient { ); } - Future getUserInformation(int pSelectedResopID, String selectedEmployeeNumber) async { - String url = "${ApiConsts.erpRest}Get_UserInformation"; - Map postParams = {"P_SELECTED_RESP_ID": pSelectedResopID, "P_PAGE_LIMIT": 100, "P_PAGE_NUM": 1}; + // Future getUserInformation(int pSelectedResopID, String selectedEmployeeNumber) async { + // String url = "${ApiConsts.erpRest}Get_UserInformation"; + // Map postParams = {"P_SELECTED_RESP_ID": pSelectedResopID, "P_PAGE_LIMIT": 100, "P_PAGE_NUM": 1}; + // postParams.addAll(AppState().postParamsJson); + // if (selectedEmployeeNumber != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = selectedEmployeeNumber; + // return await ApiClient().postJsonForObject( + // (json) { + // GenericResponseModel responseData = GenericResponseModel.fromJson(json); + // return responseData.memberInformationList![0]; + // }, + // url, + // postParams, + // ); + // } + + Future getNotificationUserInformation(int pSelectedResopID, String selectedEmployeeNumber, int pNotificationID) async { + String url = "${ApiConsts.erpRest}Get_Notification_UserInformation"; + Map postParams = {"P_SELECTED_RESP_ID": pSelectedResopID, "P_PAGE_LIMIT": 100, "P_PAGE_NUM": 1, "P_NOTIFICATION_ID": pNotificationID}; postParams.addAll(AppState().postParamsJson); if (selectedEmployeeNumber != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = selectedEmployeeNumber; return await ApiClient().postJsonForObject( diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 51e8066..0f939bf 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -9,9 +9,9 @@ class ApiConsts { // static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://hmgwebservices.com"; // Live server - static String baseUrl = "https://mohemm.hmg.com"; // New Live server + // static String baseUrl = "https://mohemm.hmg.com"; // New Live server // - // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver + static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "http://10.20.200.111:1010/"; // static String baseUrl = "https://webservices.hmg.com"; // PreProd diff --git a/lib/ui/work_list/sheets/selected_item_sheet.dart b/lib/ui/work_list/sheets/selected_item_sheet.dart index 2efe88b..9b98c8b 100644 --- a/lib/ui/work_list/sheets/selected_item_sheet.dart +++ b/lib/ui/work_list/sheets/selected_item_sheet.dart @@ -175,7 +175,7 @@ class SelectedItemSheet extends StatelessWidget { if (favoriteReplacements != null) empID = favoriteReplacements!.userName; if (replacementList != null) empID = replacementList!.userName; try { - memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!); + memberInformationListModel = await WorkListApiClient().getNotificationUserInformation(-999, empID!, notificationID!); if (actionHistoryList != null) empID = actionHistoryList!.eMPLOYEEIMAGE = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp; if (favoriteReplacements != null) empID = favoriteReplacements!.employeeImage = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp; if (replacementList != null) empID = replacementList!.employeeImage = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp; diff --git a/lib/ui/work_list/worklist_detail_screen.dart b/lib/ui/work_list/worklist_detail_screen.dart index f1a7a3e..20cb0ea 100644 --- a/lib/ui/work_list/worklist_detail_screen.dart +++ b/lib/ui/work_list/worklist_detail_screen.dart @@ -813,7 +813,7 @@ class _WorkListDetailScreenState extends State { if (apiCallCount == 0) Utils.showLoading(context); apiCallCount++; memberInformationListModel = null; - memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!); + memberInformationListModel = await WorkListApiClient().getNotificationUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!, workListData!.nOTIFICATIONID!); apiCallCount--; if (apiCallCount == 0) { Utils.hideLoading(context);