|
|
|
|
@ -54,7 +54,6 @@ class LoginApiClient {
|
|
|
|
|
"employeeName": employeeName,
|
|
|
|
|
"p_EMAIL_ADDRESS": email,
|
|
|
|
|
"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 {
|
|
|
|
|
@ -131,7 +130,11 @@ 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);
|
|
|
|
|
|