|  |  |  | @ -26,9 +26,9 @@ class LoginApiClient { | 
		
	
		
			
				|  |  |  |  |     Map<String, dynamic> postParams = {}; | 
		
	
		
			
				|  |  |  |  |     postParams["DeviceToken"] = deviceToken; | 
		
	
		
			
				|  |  |  |  |     postParams["DeviceType"] = deviceType; | 
		
	
		
			
				|  |  |  |  |    // return await ApiClient().postJsonForObject((json) { | 
		
	
		
			
				|  |  |  |  |       // GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | 
		
	
		
			
				|  |  |  |  |      // print(jsonDecode(json["data"].first)); | 
		
	
		
			
				|  |  |  |  |     // return await ApiClient().postJsonForObject((json) { | 
		
	
		
			
				|  |  |  |  |     // GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | 
		
	
		
			
				|  |  |  |  |     // print(jsonDecode(json["data"].first)); | 
		
	
		
			
				|  |  |  |  |     //   GetMobileLoginInfoListModel? modelData= GetMobileLoginInfoListModel.fromRawJson(jsonDecode(json["data"].first)); | 
		
	
		
			
				|  |  |  |  |     //   print("getMobileLoginInfoNEW: ${modelData.toJson()}"); | 
		
	
		
			
				|  |  |  |  |     //   // return (responseData.mohemmGetMobileLoginInfoList?.length ?? 0) > 0 ? (responseData.mohemmGetMobileLoginInfoList!.first) : null; | 
		
	
	
		
			
				
					|  |  |  | @ -43,7 +43,7 @@ class LoginApiClient { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<bool?> insertMobileLoginInfoNEW(String email, int sessionId, String employeeName, int loginType, String mobileNumber, String userName, String deviceToken, String deviceType) async { | 
		
	
		
			
				|  |  |  |  |     //String url = "${ApiConsts.authRest}Mohemm_Insert_MobileDeviceInfo"; | 
		
	
		
			
				|  |  |  |  |      String url = "${ApiConsts.authRest}Mohemm_InsertMobileLoginInfo"; | 
		
	
		
			
				|  |  |  |  |     String url = "${ApiConsts.authRest}Mohemm_InsertMobileLoginInfo"; | 
		
	
		
			
				|  |  |  |  |     Map<String, dynamic> postParams = { | 
		
	
		
			
				|  |  |  |  |       "MobileNumber": mobileNumber, | 
		
	
		
			
				|  |  |  |  |       "p_USER_NAME": userName, | 
		
	
	
		
			
				
					|  |  |  | @ -53,8 +53,7 @@ class LoginApiClient { | 
		
	
		
			
				|  |  |  |  |       "loginType": loginType, | 
		
	
		
			
				|  |  |  |  |       "employeeName": employeeName, | 
		
	
		
			
				|  |  |  |  |       "p_EMAIL_ADDRESS": email, | 
		
	
		
			
				|  |  |  |  |       "gender":1, //todo | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       "gender": 1, //todo | 
		
	
		
			
				|  |  |  |  |     }; | 
		
	
		
			
				|  |  |  |  |     postParams["deviceToken"] = deviceToken; | 
		
	
		
			
				|  |  |  |  |     postParams["deviceType"] = deviceType; | 
		
	
	
		
			
				
					|  |  |  | @ -68,19 +67,19 @@ class LoginApiClient { | 
		
	
		
			
				|  |  |  |  |     return ress; | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<CheckMobileAppVersionModel?> checkMobileAppVersion() async { | 
		
	
		
			
				|  |  |  |  |   Future<ApiResponse?> checkMobileAppVersion() async { | 
		
	
		
			
				|  |  |  |  |     String url = "${ApiConsts.authRest}CheckMobileAppVersion"; | 
		
	
		
			
				|  |  |  |  |     Map<String, dynamic> postParams = {}; | 
		
	
		
			
				|  |  |  |  |     postParams.addAll(AppState().postParamsJson); | 
		
	
		
			
				|  |  |  |  |     dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, returnJsonData: false); | 
		
	
		
			
				|  |  |  |  |     ApiResponse res = ApiResponse.fromJson(response); | 
		
	
		
			
				|  |  |  |  |     return ApiResponse.fromJson(response); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     if (res.data == null || res.data!.isEmpty) { | 
		
	
		
			
				|  |  |  |  |       return CheckMobileAppVersionModel(data: ""); // Handle the case where response data is null | 
		
	
		
			
				|  |  |  |  |     } else { | 
		
	
		
			
				|  |  |  |  |       CheckMobileAppVersionModel res = await ApiClassMapper().handleApiEndpoint(endpoint: "CheckMobileAppVersion", jsonData: response.data); | 
		
	
		
			
				|  |  |  |  |       return res; | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     // if (res.data == null || res.data!.isEmpty) { | 
		
	
		
			
				|  |  |  |  |     //   return CheckMobileAppVersionModel(data: ""); // Handle the case where response data is null | 
		
	
		
			
				|  |  |  |  |     // } else { | 
		
	
		
			
				|  |  |  |  |     //   CheckMobileAppVersionModel result = await ApiClassMapper().handleApiEndpoint(endpoint: "CheckMobileAppVersion", jsonData: response); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<MemberLoginListModel> memberLogin(String username, String password) async { | 
		
	
	
		
			
				
					|  |  |  | @ -115,7 +114,7 @@ class LoginApiClient { | 
		
	
		
			
				|  |  |  |  |     postParams["logInTokenID"] = AppState().postParamsObject?.getLogInTokenID; | 
		
	
		
			
				|  |  |  |  |     dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams); | 
		
	
		
			
				|  |  |  |  |     ApiResponse res = ApiResponse.fromJson(response); | 
		
	
		
			
				|  |  |  |  |     AppState().isLogged =true; | 
		
	
		
			
				|  |  |  |  |     AppState().isLogged = true; | 
		
	
		
			
				|  |  |  |  |     return await ApiClassMapper().handleApiEndpoint(endpoint: "CheckActivationCode", jsonData: res.data); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
	
		
			
				
					|  |  |  | @ -131,12 +130,16 @@ class LoginApiClient { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<GenericResponseModel?> sendPublicActivationCode(String? mobileNumber, String? pUsername) async { | 
		
	
		
			
				|  |  |  |  |     String url = "${ApiConsts.authRest}SendPublicActivationCode"; // todo @zahoor,  not found in swagger | 
		
	
		
			
				|  |  |  |  |     Map<String, dynamic> postParams = {"mobileNumber": mobileNumber, "p_MOBILE_NUMBER": mobileNumber, "p_USER_NAME": pUsername, }; | 
		
	
		
			
				|  |  |  |  |     Map<String, dynamic> postParams = { | 
		
	
		
			
				|  |  |  |  |       "mobileNumber": mobileNumber, | 
		
	
		
			
				|  |  |  |  |       "p_MOBILE_NUMBER": mobileNumber, | 
		
	
		
			
				|  |  |  |  |       "p_USER_NAME": pUsername, | 
		
	
		
			
				|  |  |  |  |     }; | 
		
	
		
			
				|  |  |  |  |     postParams.addAll(AppState().postParamsJson); | 
		
	
		
			
				|  |  |  |  |     return await ApiClient().postJsonForObject((json) { | 
		
	
		
			
				|  |  |  |  |       ApiResponse res = ApiResponse.fromJson(json); | 
		
	
		
			
				|  |  |  |  |        GenericResponseModel responseData = GenericResponseModel.fromJson(json); | 
		
	
		
			
				|  |  |  |  |        AppState().postParamsObject?.setLogInTokenID = res.data['logInTokenID'] ?? AppState().postParamsObject?.getLogInTokenID; | 
		
	
		
			
				|  |  |  |  |       GenericResponseModel responseData = GenericResponseModel.fromJson(json); | 
		
	
		
			
				|  |  |  |  |       AppState().postParamsObject?.setLogInTokenID = res.data['logInTokenID'] ?? AppState().postParamsObject?.getLogInTokenID; | 
		
	
		
			
				|  |  |  |  |       AppState().postParamsObject?.setTokenID = res.data['logInTokenID']; | 
		
	
		
			
				|  |  |  |  |       return responseData; | 
		
	
		
			
				|  |  |  |  |     }, url, postParams); | 
		
	
	
		
			
				
					|  |  |  | 
 |