update in progress

master-Api2.0_update3.29
Sultan khan 7 months ago
parent 0e8512597c
commit d921d6bc1d

@ -391,11 +391,11 @@ class ApiResponse<T> {
String toRawJson() => json.encode(toJson());
factory ApiResponse.fromJson(Map<String, dynamic> json) => ApiResponse(
totalItemsCount: json["TotalItemsCount"],
data: json["Data"],
messageStatus: json["MessageStatus"],
errorMessage: json["ErrorMessage"],
errorEndUserMessage: json["ErrorEndUserMessage"],
totalItemsCount: json["TotalItemsCount"] ?? json["totalItemsCount"] ,
data: json["Data"] ?? json["data"],
messageStatus: json["MessageStatus"] ?? json["messageStatus"],
errorMessage: json["ErrorMessage"] ?? json["errorMessage"],
errorEndUserMessage: json["ErrorEndUserMessage"] ?? json["errorEndUserMessage"],
);
Map<String, dynamic> toJson() => {
@ -471,7 +471,7 @@ class ApiClient {
if (!kReleaseMode) {
print("Url:$url");
var bodyJson = json.encode(jsonObject);
print("body:$bodyJson");
printLongLog("body:$bodyJson");
}
var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes, isFormData: isFormData);
@ -494,15 +494,29 @@ class ApiClient {
if (apiResponse.isSuccess) {
return factoryConstructor(jsonData);
} else {
throw APIException(
APIException.BAD_REQUEST,
error: APIError(
null,
apiResponse.errorEndUserMessage ?? apiResponse.errorMessage,
null,
response.statusCode,
),
);
if(apiResponse.messageStatus == null || apiResponse.messageStatus != 1) {
logger.i(apiResponse.errorMessage);
throw APIException(
APIException.OTHER,
error: APIError(
null,
apiResponse.errorEndUserMessage ?? apiResponse.errorMessage,
null,
response.statusCode,
),
);
}else {
throw APIException(
APIException.BAD_REQUEST,
error: APIError(
null,
apiResponse.errorEndUserMessage ?? apiResponse.errorMessage,
null,
response.statusCode,
),
);
}
}
}
@ -560,6 +574,7 @@ class ApiClient {
url = url + '?' + queryString;
}
var response = await _post(
Uri.parse(url),
body: requestBody,
@ -795,4 +810,9 @@ class ApiClient {
body: body,
encoding: encoding,
));
void printLongLog(String text) {
var pattern = RegExp('.{1,1000}'); // Break into 1000-char chunks
pattern.allMatches(text.replaceAll('\n', ' ')).forEach((match) => debugPrint(match.group(0)));
}
}

@ -9,7 +9,9 @@ import 'package:mohem_flutter_app/models/check_activation_code_model.dart';
import 'package:mohem_flutter_app/models/check_mobile_app_version_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_open_missing_swipe.dart';
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/eit/get_eit_transaction_model.dart';
import 'package:mohem_flutter_app/models/generic_mapper_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
@ -25,7 +27,7 @@ class ApiClassMapper {
return MemberLoginListModel.fromRawJson(jsonEncode(jsonData));
case 'Mohemm_SendActivationCodebyOTPNotificationType':
BasicMemberInformationModel response = BasicMemberInformationModel.fromRawJson(jsonEncode(jsonData));
AppState().postParamsObject?.setLogInTokenID = response.logInTokenId;
// AppState().postParamsObject?.setLogInTokenID = response.logInTokenId;
return response;
case 'CheckActivationCode':
CheckActivationCodeModel responseData = CheckActivationCodeModel.fromRawJson(jsonEncode(jsonData));
@ -37,10 +39,10 @@ class ApiClassMapper {
AppState().postParamsObject?.pUserName = AppState().getUserName;
AppState().postParamsObject?.pSelectedEmployeeNumber = AppState().getUserName;
AppState().postParamsObject?.setPLegislationCode = responseData.basicMemberInformation!.pLegislationCode;
AppState().postParamsObject?.setPayrollCodeStr = responseData.memberInformationList!.first.pAYROLLCODE;
AppState().postParamsObject?.setPayrollCodeStr = responseData.memberInformationList!.first.payrolLCode;
AppState().setBusinessCardPrivilege = responseData.memberInformationList!.first.businessCardPrivilege ?? false;
// AppState().postParamsObject!.logInTokenID = responseData.authenticationTokenId;
responseData.errorMessage = errorMessage;
//responseData.errorMessage = errorMessage;
return responseData;
case 'RefreshToken':
return;
@ -53,13 +55,13 @@ class ApiClassMapper {
return false;
}
case 'Mohemm_GetMobileLoginInfo_NEW':
GetMobileLoginInfoListModel response = GetMobileLoginInfoListModel.fromJson(jsonData);
GetMobileLoginInfoListModel response = GetMobileLoginInfoListModel.fromJson(jsonData.first);
return response;
case 'ChangePassword_FromActiveSession':
return;
case 'Get_BasicUserInformation':
return;
BasicMemberInformationModel response = BasicMemberInformationModel.fromJson(jsonData);
return response;
case 'SendPublicActivationCode':
return;
case 'CheckPublicActivationCode':
@ -68,6 +70,8 @@ class ApiClassMapper {
return;
case 'CheckMobileAppVersion':
return CheckMobileAppVersionModel.fromRawJson(jsonData);
case 'GET_MENU':
return CheckMobileAppVersionModel.fromRawJson(jsonData);
// COCWS endpoints
case 'Mohemm_ITG_GetCategories':
return;
@ -264,11 +268,11 @@ class ApiClassMapper {
case 'ErrorCount_Get':
return;
case 'GET_Menu_Entries':
return;
return GetMenuEntriesList.fromRawJson(jsonData);;
case 'GET_Open_Notifications':
return GenericResponseModel();
return GenericResponseModel.fromJson(jsonData);
case 'Get_Open_Missing_Swipes':
return;
return GetOpenMissingSwipes.fromRawJson(jsonData);
case 'GET_CONTACT_COLS_STRUCTURE':
return;
case 'GET_EMPLOYEE_ADDRESS':
@ -386,7 +390,8 @@ class ApiClassMapper {
case 'INSERT_GL_JOURNALS_INTO_STG':
return;
case 'GET_Attendance_Tracking':
return GetAttendanceTracking();
GetAttendanceTracking response = GetAttendanceTracking.fromJson(jsonData);
return response;
case 'GET_OPEN_NOTIFICATIONS':
return GenericResponseModel();
case 'GET_ABSENCE_TRANSACTIONS':

@ -33,7 +33,7 @@ class ChatApiClient {
Response response = await ApiClient().postJsonForResponse(
"${ApiConsts.chatLoginTokenUrl}externaluserlogin",
{
"employeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER.toString(),
"employeeNumber": AppState().memberInformationList!.employeENumber.toString(),
"password": "FxIu26rWIKoF8n6mpbOmAjDLphzFGmpG",
"isMobile": true,
"platform": Platform.isIOS ? "ios" : "android",

@ -2,13 +2,16 @@ import 'dart:async';
import 'dart:convert';
import 'package:mohem_flutter_app/api/api_client.dart';
import 'package:mohem_flutter_app/api/api_mapper_class.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/consts.dart';
import 'package:mohem_flutter_app/classes/date_uitl.dart';
import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_open_missing_swipe.dart';
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
import 'package:mohem_flutter_app/models/dashboard/list_menu.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
@ -26,25 +29,30 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_Attendance_Tracking";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json["Data"]);
return responseData.getAttendanceTrackingList;
}, url, postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
GetAttendanceTracking ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_Attendance_Tracking", jsonData: res.data);
return ress;
}
Future<GenericResponseModel?> getOpenNotifications() async {
String url = "${ApiConsts.erpRest}GET_OPEN_NOTIFICATIONS";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json["Data"]);
return responseData;
}, url, postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
GenericResponseModel ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_OPEN_NOTIFICATIONS", jsonData: res);
return ress;
}
Future<GenericResponseModel?> getCOCNotifications() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_ReviewerAdmin_Pending_Tasks";
Map<String, dynamic> postParams = {"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
Map<String, dynamic> postParams = {"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.employeENumber};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
@ -64,23 +72,25 @@ class DashboardApiClient {
Future<List<GetAccrualBalancesList>> getAccrualBalances(String effectiveDate, {String? empID}) async {
String url = "${ApiConsts.erpRest}GET_ACCRUAL_BALANCES";
Map<String, dynamic> postParams = {"P_EFFECTIVE_DATE": effectiveDate};
Map<String, dynamic> postParams = {"p_EFFECTIVE_DATE": effectiveDate};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json["Data"]);
return responseData.getAccrualBalancesList ?? [];
}, url, postParams);
if (empID != null) postParams["p_SELECTED_EMPLOYEE_NUMBER"] = empID;
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
List<GetAccrualBalancesList> ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_ACCRUAL_BALANCES", jsonData: res.data);
return ress;
}
Future<GenericResponseModel?> getOpenMissingSwipes() async {
Future<GetOpenMissingSwipes?> getOpenMissingSwipes() async {
String url = "${ApiConsts.erpRest}GET_OPEN_MISSING_SWIPES";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json["Data"]);
return responseData;
}, url, postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
GetOpenMissingSwipes ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_OPEN_MISSING_SWIPES", jsonData: res.data);
return ress;
}
//Menus List
@ -88,21 +98,25 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_MENU";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json["Data"]);
return responseData.listMenu ?? [];
}, url, postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
List<ListMenu> ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_MENU", jsonData: res.data);
return ress;
}
//GET_MENU_ENTRIES
Future<GenericResponseModel?> getGetMenuEntries() async {
Future<List<GetMenuEntriesList>> getGetMenuEntries() async {
String url = "${ApiConsts.erpRest}GET_MENU_ENTRIES";
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
Map<String, dynamic> postParams = {"p_SELECTED_RESP_ID": -999, "p_MENU_TYPE": "E"};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
List<GetMenuEntriesList> ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_MENU_ENTRIES", jsonData: res.data);
return ress;
}
//Mark Attendance
@ -143,7 +157,7 @@ class DashboardApiClient {
"QRValue": '',
"NFCValue": sourceName == 'NFC' ? sourceName : '',
"WifiValue": sourceName == 'WIFI' ? sourceName : '',
"EmployeeID": AppState().memberInformationList!.eMPLOYEENUMBER,
"EmployeeID": AppState().memberInformationList!.employeENumber,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -162,12 +176,11 @@ class DashboardApiClient {
"ItgServiceName": "Login"
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json["Data"]);
MohemmItgResponseItem res = MohemmItgResponseItem.fromJson(jsonDecode(responseData.mohemmITGResponseItem ?? ""));
// var jsonDecodedData = jsonDecode(jsonDecode(responseData.mohemmITGResponseItem!)['result']['data']);
return res;
}, url, postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
MohemmItgResponseItem ress = await ApiClassMapper().handleApiEndpoint(endpoint: "Mohemm_ITG_GetPageNotification", jsonData: res.data);
return ress;
}
//Submit ITG
@ -207,7 +220,7 @@ class DashboardApiClient {
Map<String, dynamic> postParams = {
"ItgNotificationMasterId": masterID,
"EmployeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER.toString(),
"EmployeeNumber": AppState().memberInformationList!.employeENumber.toString(),
"ItgAdvertisementId": advertisementId,
"ItgAcknowledgment": ackValue,
// "ItgAdvertisement": {"ItgAdvertisementId": advertisementId, "ItgAcknowledgment": ackValue} //Mobile Id

@ -20,7 +20,7 @@ class ItemsForSaleApiClient {
List<GetSaleCategoriesList> getSaleCategoriesList = [];
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetItemSaleCategory";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgPageSize": 10, "ItgPageNo": 1};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgPageSize": 10, "ItgPageNo": 1};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((response) {
@ -48,7 +48,7 @@ class ItemsForSaleApiClient {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetItemForSale";
Map<String, dynamic> postParams = {
"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"EmployeeNumber": AppState().memberInformationList?.employeENumber,
"ItgPageSize": 10,
"ItgPageNo": itgPageNo,
"ItgStatus": "Approved",
@ -81,9 +81,9 @@ class ItemsForSaleApiClient {
// request.fields['employeeNumber'] = empNum;
Map<String, dynamic> postParams = {
"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"employeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"MobileNo": AppState().memberInformationList?.eMPLOYEEMOBILENUMBER,
"EmployeeNumber": AppState().memberInformationList?.employeENumber,
"employeeNumber": AppState().memberInformationList?.employeENumber,
"MobileNo": AppState().memberInformationList?.employeEMobileNumber,
"itemSaleID": itemSaleID.toString(),
"Channel": "31",
"isActive": "false",
@ -105,7 +105,7 @@ class ItemsForSaleApiClient {
List<EmployeePostedAds> employeePostedAdsList = [];
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetItemForSaleByEmployee";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgEmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgEmployeeNumber": AppState().memberInformationList?.employeENumber};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((response) {
@ -121,7 +121,7 @@ class ItemsForSaleApiClient {
Future<List<GetRegionsList>> getRegions() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetRegion";
List<GetRegionsList> getRegionsList = [];
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgEmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgEmployeeNumber": AppState().memberInformationList?.employeENumber};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((response) {
var body = json.decode(response['Mohemm_ITG_ResponseItem']);
@ -145,8 +145,8 @@ class ItemsForSaleApiClient {
"ItgQuotePrice": itemReviewModel.itemPrice,
"RegionID": itemReviewModel.selectedRegion!.regionID,
"ItgIsActive": true,
"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"employeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"EmployeeNumber": AppState().memberInformationList?.employeENumber,
"employeeNumber": AppState().memberInformationList?.employeENumber,
"ItgStatus": itemReviewModel.itemCondition
};
postParams.addAll(AppState().postParamsJson);

@ -25,37 +25,38 @@ class LoginApiClient {
Map<String, dynamic> postParams = {};
postParams["DeviceToken"] = deviceToken;
postParams["DeviceType"] = deviceType;
return await ApiClient().postJsonForObject((json) {
// 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;
return modelData;
}, url, postParams);
// 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;
// return modelData;
// }, url, postParams);
// dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
// ApiResponse res = ApiResponse.fromJson(response);
// dynamic ress = await ApiClassMapper().handleApiEndpoint(endpoint: "Mohemm_GetMobileLoginInfo_NEW", jsonData: res.data);
// return ress;
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
GetMobileLoginInfoListModel ress = await ApiClassMapper().handleApiEndpoint(endpoint: "Mohemm_GetMobileLoginInfo_NEW", jsonData: res.data);
return ress;
}
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_Insert_MobileDeviceInfo";
String url = "${ApiConsts.authRest}Mohemm_InsertMobileLoginInfo";
Map<String, dynamic> postParams = {
"MobileNumber": mobileNumber,
"P_USER_NAME": userName,
"UserName": userName,
"CompanyID": 1, // todo 'sikander' @discuss umer for companyID
"DeviceToken": deviceToken,
"LoginType": loginType,
"EmployeeName": employeeName,
"P_SESSION_ID": sessionId,
"P_EMAIL_ADDRESS": email
"p_USER_NAME": userName,
"userName": userName,
"companyID": 1, // todo 'sikander' @discuss umer for companyID
"deviceToken": deviceToken,
"loginType": loginType,
"employeeName": employeeName,
"p_EMAIL_ADDRESS": email,
"gender":1, //todo
};
postParams["DeviceToken"] = deviceToken;
postParams["DeviceType"] = deviceType;
postParams["deviceToken"] = deviceToken;
postParams["deviceType"] = deviceType;
postParams.addAll(AppState().postParamsJson);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
@ -97,10 +98,11 @@ class LoginApiClient {
String url = "${ApiConsts.authRest}Mohemm_SendActivationCodebyOTPNotificationType";
Map<String, dynamic> postParams = {"IsMobileFingerPrint": isMobileFingerPrint, "MobileNumber": mobileNumber, "OTP_SendType": optSendType, "P_USER_NAME": pUserName};
postParams.addAll(AppState().postParamsJson);
postParams["LogInTokenID"] = AppState().postParamsObject?.getLogInTokenID;
postParams["logInTokenID"] = AppState().postParamsObject?.getLogInTokenID;
print(postParams);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams);
ApiResponse res = ApiResponse.fromJson(response);
AppState().postParamsObject?.setLogInTokenID = res.data["logInTokenID"] ?? AppState().postParamsObject?.getLogInTokenID;
return await ApiClassMapper().handleApiEndpoint(endpoint: "Mohemm_SendActivationCodebyOTPNotificationType", jsonData: res.data);
}
@ -108,9 +110,10 @@ class LoginApiClient {
String url = "${ApiConsts.authRest}CheckActivationCode";
Map<String, dynamic> postParams = {"IsDeviceNFC": isDeviceNFC, "MobileNumber": mobileNumber, "ActivationCode": activationCode, "P_USER_NAME": pUserName};
postParams.addAll(AppState().postParamsJson);
postParams["LogInTokenID"] = AppState().postParamsObject?.getLogInTokenID;
postParams["logInTokenID"] = AppState().postParamsObject?.getLogInTokenID;
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams);
ApiResponse res = ApiResponse.fromJson(response);
AppState().isLogged =true;
return await ApiClassMapper().handleApiEndpoint(endpoint: "CheckActivationCode", jsonData: res.data);
}
@ -125,19 +128,21 @@ class LoginApiClient {
}
Future<GenericResponseModel?> sendPublicActivationCode(String? mobileNumber, String? pUsername) async {
String url = "${ApiConsts.erpRest}SendPublicActivationCode"; // todo @zahoor, not found in swagger
Map<String, dynamic> postParams = {"MobileNumber": mobileNumber, "P_MOBILE_NUMBER": mobileNumber, "P_USER_NAME": pUsername};
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, };
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
AppState().postParamsObject?.setLogInTokenID = responseData.logInTokenID;
ApiResponse res = ApiResponse.fromJson(json);
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
AppState().postParamsObject?.setLogInTokenID = res.data['logInTokenID'] ?? AppState().postParamsObject?.getLogInTokenID;
return responseData;
}, url, postParams);
}
Future<GenericResponseModel?> checkPublicActivationCode(String activationCode, String? pUserName) async {
String url = "${ApiConsts.erpRest}checkPublicActivationCode"; // todo @zahoor, not found in swagger
String url = "${ApiConsts.authRest}checkPublicActivationCode"; // todo @zahoor, not found in swagger
Map<String, dynamic> postParams = {"activationCode": activationCode, "P_USER_NAME": pUserName};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);

@ -86,9 +86,9 @@ class MarathonApiClient {
Future<MarathonGenericModel> joinMarathonAsParticipant() async {
Map<String, String> jsonObject = <String, String>{
"employeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER ?? "",
"employeeNameAr": AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr ?? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn ?? "",
"employeeNameEn": AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn ?? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr ?? "",
"employeeNumber": AppState().memberInformationList!.employeENumber ?? "",
"employeeNameAr": AppState().memberInformationList!.employeENameAr ?? AppState().memberInformationList!.employeEDisplayNameAr ?? "",
"employeeNameEn": AppState().memberInformationList!.employeeNameEn ?? AppState().memberInformationList!.employeeDisplayNameEn ?? "",
"marathonId": AppState().getMarathonProjectId!,
};

@ -23,7 +23,7 @@ class MowadhafhiApiClient {
Future<List<GetTicketsByEmployeeList>> getTicketsByEmployee() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetTicketsByEmployee";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgPageSize": 10, "ItgPageNo": 1};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgPageSize": 10, "ItgPageNo": 1};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -34,7 +34,7 @@ class MowadhafhiApiClient {
Future<List<GetTicketDetailsByEmployee>> getTicketDetailsByEmployee(String? itgTicketID) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetTicketDetails";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgTicketId": itgTicketID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgTicketId": itgTicketID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -45,7 +45,7 @@ class MowadhafhiApiClient {
Future<List<GetTicketTransactions>> getTicketTransactions(String? itgTicketID) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetTicketTransaction";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgTicketId": itgTicketID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgTicketId": itgTicketID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -56,7 +56,7 @@ class MowadhafhiApiClient {
Future<GetTransactionAttachmentModel> getTransactionAttachments(int? attachmentID) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetTicketAttachment";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgAttachmentId": attachmentID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgAttachmentId": attachmentID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -68,7 +68,7 @@ class MowadhafhiApiClient {
Future<List<GetTicketTypes>> getTicketTypes() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetTicketTypes";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -79,7 +79,7 @@ class MowadhafhiApiClient {
Future<List<GetMowadhafhiProjects>> getProjects() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetProjects";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgProjectCode": AppState().memberInformationList?.pAYROLLCODE};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgProjectCode": AppState().memberInformationList?.payrolLCode};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -90,7 +90,7 @@ class MowadhafhiApiClient {
Future<List<GetProjectDepartments>> getProjectDepartments(int projectID) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetProjectDepartments";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgProjectId": projectID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgProjectId": projectID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -102,7 +102,7 @@ class MowadhafhiApiClient {
Future<List<GetDepartmentSections>> getDepartmentSections(int? projectDepartmentID) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetDepartmentSections";
Map<String, dynamic> postParams = {
"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"EmployeeNumber": AppState().memberInformationList?.employeENumber,
"ItgDepartmentSectionId": projectDepartmentID,
"ItgProjectDepartmentId": projectDepartmentID
};
@ -116,7 +116,7 @@ class MowadhafhiApiClient {
Future<List<GetSectionTopics>> getSectionTopics(int? departmentSectionID) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetSectionTopics";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgDepartmentSectionId": departmentSectionID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgDepartmentSectionId": departmentSectionID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
@ -128,12 +128,12 @@ class MowadhafhiApiClient {
Future<int?> submitRequest(int? departmentID, String description, int? projectID, String? sectionID, String? sectionTopicID, int? ticketTypeID, List<Map<String, dynamic>> attachmentList) async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_CreateTicketMobile";
Map<String, dynamic> postParams = {
"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"EmployeeNumber": AppState().memberInformationList?.employeENumber,
"ItgImageCollList": attachmentList,
"channelId": 3,
"departmentId": departmentID,
"description": description,
"employeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"employeeNumber": AppState().memberInformationList?.employeENumber,
"projectId": projectID,
"sectionId": sectionID,
"sectionTopicId": sectionTopicID,

@ -167,7 +167,7 @@ class MyAttendanceApiClient {
Future<ResubmitEITRequestResponse> reSubmitEitTransaction(String itemKey, var notifID, List<Map<String, dynamic>> list) async {
String url = "${ApiConsts.erpRest}RESUBMIT_EIT_TRANSACTION";
Map<String, dynamic> postParams = {"P_NOTIFICATION_ID": notifID, "P_ITEM_KEY": itemKey, "P_EMAIL_ADDRESS": AppState().memberInformationList!.eMPLOYEEEMAILADDRESS, "EITTransactionTBL": list};
Map<String, dynamic> postParams = {"P_NOTIFICATION_ID": notifID, "P_ITEM_KEY": itemKey, "P_EMAIL_ADDRESS": AppState().memberInformationList!.employeEEmailAddress, "EITTransactionTBL": list};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);

@ -17,7 +17,7 @@ class OffersAndDiscountsApiClient {
List<GetCategoriesList> getSaleCategoriesList = [];
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetCategories";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgPageSize": 100, "ItgPageNo": 1, "ItgIsActive": true};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgPageSize": 100, "ItgPageNo": 1, "ItgIsActive": true};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
@ -48,12 +48,12 @@ class OffersAndDiscountsApiClient {
List<OffersListModel> getSaleCategoriesList = [];
String url = "${ApiConsts.cocRest}GetOfferDiscountsConfigData";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER, "ItgPageSize": pageSize, "ItgPageNo": 1, "ItgCategoryID": categoryID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber, "ItgPageSize": pageSize, "ItgPageNo": 1, "ItgCategoryID": categoryID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(response) {
var body = json.decode(response['Mohemm_ITG_ResponseItem']);
var body = json.decode(response['data']);
var bodyData = body['result']['data'];

@ -41,7 +41,7 @@ class PendingTransactionsApiClient {
Future<String> getAnnouncements(int itgAwarenessID, int itgPageNo, int itgRowID) async {
String url = "${ApiConsts.cocRest}GetAnnouncementDiscountsConfigData";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER.toString(), "ItgAwarenessID": itgAwarenessID, "ItgPageNo": itgPageNo, "ItgPageSize": 5, "ItgRowID": itgRowID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber.toString(), "ItgAwarenessID": itgAwarenessID, "ItgPageNo": itgPageNo, "ItgPageSize": 5, "ItgRowID": itgRowID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
@ -51,7 +51,7 @@ class PendingTransactionsApiClient {
Future<GetAnnouncementDetails> getAnnouncementDetails(int itgAwarenessID, int itgPageNo, int itgRowID) async {
String url = "${ApiConsts.cocRest}GetAnnouncementDiscountsConfigData";
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER.toString(), "ItgAwarenessID": itgAwarenessID, "ItgPageNo": itgPageNo, "ItgPageSize": 5, "ItgRowID": itgRowID};
Map<String, dynamic> postParams = {"EmployeeNumber": AppState().memberInformationList?.employeENumber.toString(), "ItgAwarenessID": itgAwarenessID, "ItgPageNo": itgPageNo, "ItgPageSize": 5, "ItgRowID": itgRowID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);

@ -26,7 +26,7 @@ import 'package:sizer/sizer.dart';
Logger logger = Logger(
// filter: null, // Use the default LogFilter (-> only log in debug mode)
printer: PrettyPrinter(
lineLength: 0,
lineLength:200,
), // Use the PrettyPrinter to format and print log
// output: null, // U
);
@ -98,6 +98,7 @@ class MyApp extends StatelessWidget {
builder: (context, orientation, deviceType) {
PostParamsModel? obj = AppState().postParamsObject;
obj?.languageID = EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2;
obj?.language = EasyLocalization.of(context)?.locale.languageCode == "ar" ? "ar" : "us";
AppState().setPostParamsModel(obj!);
List<LocalizationsDelegate<dynamic>> delegates = context.localizationDelegates;
// delegates.add(GlobalMaterialLocalizations.delegate);

@ -22,20 +22,20 @@ class BasicMemberInformationModel {
String toRawJson() => json.encode(toJson());
factory BasicMemberInformationModel.fromJson(Map<String, dynamic> json) => BasicMemberInformationModel(
pReturnStatus: json["P_RETURN_STATUS"],
pReturnMsg: json["P_RETURN_MSG"],
pMobileNumber: json["P_MOBILE_NUMBER"],
pEmailAddress: json["P_EMAIL_ADDRESS"],
pLegislationCode: json["P_LEGISLATION_CODE"],
logInTokenId: json["LogInTokenID"],
pReturnStatus: json["p_RETURN_STATUS"],
pReturnMsg: json["p_RETURN_MSG"],
pMobileNumber: json["p_MOBILE_NUMBER"],
pEmailAddress: json["p_EMAIL_ADDRESS"],
pLegislationCode: json["p_LEGISLATION_CODE"],
logInTokenId: json["logInTokenID"],
);
Map<String, dynamic> toJson() => {
"P_RETURN_STATUS": pReturnStatus,
"P_RETURN_MSG": pReturnMsg,
"P_MOBILE_NUMBER": pMobileNumber,
"P_EMAIL_ADDRESS": pEmailAddress,
"P_LEGISLATION_CODE": pLegislationCode,
"LogInTokenID": logInTokenId,
"p_RETURN_STATUS": pReturnStatus,
"p_RETURN_MSG": pReturnMsg,
"p_MOBILE_NUMBER": pMobileNumber,
"p_EMAIL_ADDRESS": pEmailAddress,
"p_LEGISLATION_CODE": pLegislationCode,
"logInTokenID": logInTokenId,
};
}

@ -1,8 +1,6 @@
import 'dart:convert';
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
class CheckActivationCodeModel {
String? authenticationTokenId;
@ -15,20 +13,19 @@ class CheckActivationCodeModel {
String? companyImageDescription;
String? companyBadge;
String? companyMainCompany;
dynamic bcLogo;
dynamic bcDomain;
dynamic businessGroupName;
dynamic bCLogo;
dynamic bCDomain;
dynamic businesSGroupName;
String? pReturnStatus;
String? pReturnMsg;
List<MemberInformationListModel>? memberInformationList;
BasicMemberInformationModel? basicMemberInformation;
BasicMemberInformation? basicMemberInformation;
dynamic mohemmItgResponseItem;
int? pSessionId;
String? tokenId;
String? refreshToken;
String? errorMessage;
DateTime? expiry;
List<PrivilegeListModel>? privilegeList;
List<PrivilegeList>? privilegeList;
CheckActivationCodeModel({
this.authenticationTokenId,
@ -41,9 +38,9 @@ class CheckActivationCodeModel {
this.companyImageDescription,
this.companyBadge,
this.companyMainCompany,
this.bcLogo,
this.bcDomain,
this.businessGroupName,
this.bCLogo,
this.bCDomain,
this.businesSGroupName,
this.pReturnStatus,
this.pReturnMsg,
this.memberInformationList,
@ -52,7 +49,6 @@ class CheckActivationCodeModel {
this.pSessionId,
this.tokenId,
this.refreshToken,
this.errorMessage,
this.expiry,
this.privilegeList,
});
@ -62,56 +58,450 @@ class CheckActivationCodeModel {
String toRawJson() => json.encode(toJson());
factory CheckActivationCodeModel.fromJson(Map<String, dynamic> json) => CheckActivationCodeModel(
authenticationTokenId: json["AuthenticationTokenID"],
pPassowrdExpired: json["P_PASSOWRD_EXPIRED"],
pPasswordExpiredMsg: json["P_PASSWORD_EXPIRED_MSG"],
pInvalidLoginMsg: json["P_INVALID_LOGIN_MSG"],
mohemmWifiSsid: json["Mohemm_Wifi_SSID"],
mohemmWifiPassword: json["Mohemm_Wifi_Password"],
companyImageUrl: json["CompanyImageURL"],
companyImageDescription: json["CompanyImageDescription"],
companyBadge: json["CompanyBadge"],
companyMainCompany: json["CompanyMainCompany"],
bcLogo: json["BC_Logo"],
bcDomain: json["BC_Domain"],
businessGroupName: json["BUSINESS_GROUP_NAME"],
pReturnStatus: json["P_RETURN_STATUS"],
pReturnMsg: json["P_RETURN_MSG"],
memberInformationList: json["MemberInformationList"] == null ? [] : List<MemberInformationListModel>.from(json["MemberInformationList"]!.map((x) => MemberInformationListModel.fromJson(x))),
basicMemberInformation: json["BasicMemberInformation"] == null ? null : BasicMemberInformationModel.fromJson(json["BasicMemberInformation"]),
mohemmItgResponseItem: json["Mohemm_ITG_ResponseItem"],
pSessionId: json["P_SESSION_ID"],
tokenId: json["TokenId"],
refreshToken: json["RefreshToken"],
errorMessage: json["ErrorMessage"],
expiry: json["Expiry"] == null ? null : DateTime.parse(json["Expiry"]),
privilegeList: json["Privilege_List"] == null ? [] : List<PrivilegeListModel>.from(json["Privilege_List"]!.map((x) => PrivilegeListModel.fromJson(x))),
authenticationTokenId: json["authenticationTokenID"],
pPassowrdExpired: json["p_PASSOWRD_EXPIRED"],
pPasswordExpiredMsg: json["p_PASSWORD_EXPIRED_MSG"],
pInvalidLoginMsg: json["p_INVALID_LOGIN_MSG"],
mohemmWifiSsid: json["mohemm_Wifi_SSID"],
mohemmWifiPassword: json["mohemm_Wifi_Password"],
companyImageUrl: json["companyImageURL"],
companyImageDescription: json["companyImageDescription"],
companyBadge: json["companyBadge"],
companyMainCompany: json["companyMainCompany"],
bCLogo: json["bC_Logo"],
bCDomain: json["bC_Domain"],
businesSGroupName: json["businesS_GROUP_NAME"],
pReturnStatus: json["p_RETURN_STATUS"],
pReturnMsg: json["p_RETURN_MSG"],
memberInformationList: json["memberInformationList"] == null ? [] : List<MemberInformationListModel>.from(json["memberInformationList"]!.map((x) => MemberInformationListModel.fromJson(x))),
basicMemberInformation: json["basicMemberInformation"] == null ? null : BasicMemberInformation.fromJson(json["basicMemberInformation"]),
mohemmItgResponseItem: json["mohemm_ITG_ResponseItem"],
pSessionId: json["p_SESSION_ID"],
tokenId: json["tokenId"],
refreshToken: json["refreshToken"],
expiry: json["expiry"] == null ? null : DateTime.parse(json["expiry"]),
privilegeList: json["privilege_List"] == null ? [] : List<PrivilegeList>.from(json["privilege_List"]!.map((x) => PrivilegeList.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"AuthenticationTokenID": authenticationTokenId,
"P_PASSOWRD_EXPIRED": pPassowrdExpired,
"P_PASSWORD_EXPIRED_MSG": pPasswordExpiredMsg,
"P_INVALID_LOGIN_MSG": pInvalidLoginMsg,
"Mohemm_Wifi_SSID": mohemmWifiSsid,
"Mohemm_Wifi_Password": mohemmWifiPassword,
"CompanyImageURL": companyImageUrl,
"CompanyImageDescription": companyImageDescription,
"CompanyBadge": companyBadge,
"CompanyMainCompany": companyMainCompany,
"BC_Logo": bcLogo,
"BC_Domain": bcDomain,
"BUSINESS_GROUP_NAME": businessGroupName,
"P_RETURN_STATUS": pReturnStatus,
"P_RETURN_MSG": pReturnMsg,
"MemberInformationList": memberInformationList == null ? [] : List<dynamic>.from(memberInformationList!.map((x) => x.toJson())),
"BasicMemberInformation": basicMemberInformation?.toJson(),
"Mohemm_ITG_ResponseItem": mohemmItgResponseItem,
"P_SESSION_ID": pSessionId,
"TokenId": tokenId,
"RefreshToken": refreshToken,
"ErrorMessage": errorMessage,
"Expiry": expiry?.toIso8601String(),
"Privilege_List": privilegeList == null ? [] : List<dynamic>.from(privilegeList!.map((x) => x.toJson())),
"authenticationTokenID": authenticationTokenId,
"p_PASSOWRD_EXPIRED": pPassowrdExpired,
"p_PASSWORD_EXPIRED_MSG": pPasswordExpiredMsg,
"p_INVALID_LOGIN_MSG": pInvalidLoginMsg,
"mohemm_Wifi_SSID": mohemmWifiSsid,
"mohemm_Wifi_Password": mohemmWifiPassword,
"companyImageURL": companyImageUrl,
"companyImageDescription": companyImageDescription,
"companyBadge": companyBadge,
"companyMainCompany": companyMainCompany,
"bC_Logo": bCLogo,
"bC_Domain": bCDomain,
"businesS_GROUP_NAME": businesSGroupName,
"p_RETURN_STATUS": pReturnStatus,
"p_RETURN_MSG": pReturnMsg,
"memberInformationList": memberInformationList == null ? [] : List<dynamic>.from(memberInformationList!.map((x) => x.toJson())),
"basicMemberInformation": basicMemberInformation?.toJson(),
"mohemm_ITG_ResponseItem": mohemmItgResponseItem,
"p_SESSION_ID": pSessionId,
"tokenId": tokenId,
"refreshToken": refreshToken,
"expiry": expiry?.toIso8601String(),
"privilege_List": privilegeList == null ? [] : List<dynamic>.from(privilegeList!.map((x) => x.toJson())),
};
}
class BasicMemberInformation {
String? pReturnStatus;
dynamic pReturnMsg;
String? pMobileNumber;
String? pEmailAddress;
String? pLegislationCode;
BasicMemberInformation({
this.pReturnStatus,
this.pReturnMsg,
this.pMobileNumber,
this.pEmailAddress,
this.pLegislationCode,
});
factory BasicMemberInformation.fromRawJson(String str) => BasicMemberInformation.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory BasicMemberInformation.fromJson(Map<String, dynamic> json) => BasicMemberInformation(
pReturnStatus: json["p_RETURN_STATUS"],
pReturnMsg: json["p_RETURN_MSG"],
pMobileNumber: json["p_MOBILE_NUMBER"],
pEmailAddress: json["p_EMAIL_ADDRESS"],
pLegislationCode: json["p_LEGISLATION_CODE"],
);
Map<String, dynamic> toJson() => {
"p_RETURN_STATUS": pReturnStatus,
"p_RETURN_MSG": pReturnMsg,
"p_MOBILE_NUMBER": pMobileNumber,
"p_EMAIL_ADDRESS": pEmailAddress,
"p_LEGISLATION_CODE": pLegislationCode,
};
}
//
// class MemberInformationListModel {
// int? businesSGroupId;
// int? persoNId;
// int? persoNTypeId;
// int? assignmenTId;
// String? assignmenTStartDate;
// String? assignmenTEndDate;
// String? primarYFlag;
// String? currenTEmployeeFlag;
// int? assignmenTStatusTypeId;
// dynamic normaLHours;
// dynamic frequency;
// dynamic frequencYMeaning;
// String? employeENumber;
// String? nationaLIdentifier;
// String? systeMPersonType;
// String? persoNType;
// String? manuaLTimecardFlag;
// String? manuaLTimecardMeaning;
// String? swipeSExemptedFlag;
// String? swipeSExemptedMeaning;
// String? assignmenTNumber;
// dynamic uniTNumber;
// String? useRStatus;
// String? employmenTCategory;
// String? assignmenTType;
// String? employmenTCategoryMeaning;
// String? peRInformationCategory;
// String? nationalitYCode;
// String? nationalitYMeaning;
// String? hirEDate;
// String? roWNum;
// int? servicEYears;
// int? servicEDays;
// dynamic actuaLTerminationDate;
// String? employeEEmailAddress;
// int? joBId;
// int? positioNId;
// int? organizatioNId;
// int? locatioNId;
// int? payrolLId;
// dynamic gradEId;
// String? positioNName;
// String? organizatioNName;
// String? locatioNName;
// String? payrolLName;
// String? payrolLCode;
// dynamic gradEName;
// String? employeEMobileNumber;
// String? employeEWorkNumber;
// String? employeeQr;
// bool? businessCardPrivilege;
// String? businessCardQr;
// int? supervisoRId;
// dynamic supervisoRAssignmentId;
// String? supervisoRNumber;
// String? supervisoRName;
// String? supervisoRDisplayName;
// String? supervisoREmailAddress;
// String? supervisoRMobileNumber;
// String? supervisoRWorkNumber;
// String? employeEImage;
// int? tKPersonId;
// String? tKEmployeeNumber;
// String? tKEmployeeName;
// String? tKEmployeeDisplayName;
// String? tKEmailAddress;
// int? nOOfRows;
// int? froMRowNum;
// int? tORowNum;
// int? ledgeRId;
// int? servicEMonths;
// String? employeeNameEn;
// dynamic employeENameAr;
// String? jobNameEn;
// dynamic joBNameAr;
// String? employeeDisplayNameEn;
// dynamic employeEDisplayNameAr;
// String? mobileNumberWithZipCode;
//
// MemberInformationListModel({
// this.businesSGroupId,
// this.persoNId,
// this.persoNTypeId,
// this.assignmenTId,
// this.assignmenTStartDate,
// this.assignmenTEndDate,
// this.primarYFlag,
// this.currenTEmployeeFlag,
// this.assignmenTStatusTypeId,
// this.normaLHours,
// this.frequency,
// this.frequencYMeaning,
// this.employeENumber,
// this.nationaLIdentifier,
// this.systeMPersonType,
// this.persoNType,
// this.manuaLTimecardFlag,
// this.manuaLTimecardMeaning,
// this.swipeSExemptedFlag,
// this.swipeSExemptedMeaning,
// this.assignmenTNumber,
// this.uniTNumber,
// this.useRStatus,
// this.employmenTCategory,
// this.assignmenTType,
// this.employmenTCategoryMeaning,
// this.peRInformationCategory,
// this.nationalitYCode,
// this.nationalitYMeaning,
// this.hirEDate,
// this.roWNum,
// this.servicEYears,
// this.servicEDays,
// this.actuaLTerminationDate,
// this.employeEEmailAddress,
// this.joBId,
// this.positioNId,
// this.organizatioNId,
// this.locatioNId,
// this.payrolLId,
// this.gradEId,
// this.positioNName,
// this.organizatioNName,
// this.locatioNName,
// this.payrolLName,
// this.payrolLCode,
// this.gradEName,
// this.employeEMobileNumber,
// this.employeEWorkNumber,
// this.employeeQr,
// this.businessCardPrivilege,
// this.businessCardQr,
// this.supervisoRId,
// this.supervisoRAssignmentId,
// this.supervisoRNumber,
// this.supervisoRName,
// this.supervisoRDisplayName,
// this.supervisoREmailAddress,
// this.supervisoRMobileNumber,
// this.supervisoRWorkNumber,
// this.employeEImage,
// this.tKPersonId,
// this.tKEmployeeNumber,
// this.tKEmployeeName,
// this.tKEmployeeDisplayName,
// this.tKEmailAddress,
// this.nOOfRows,
// this.froMRowNum,
// this.tORowNum,
// this.ledgeRId,
// this.servicEMonths,
// this.employeeNameEn,
// this.employeENameAr,
// this.jobNameEn,
// this.joBNameAr,
// this.employeeDisplayNameEn,
// this.employeEDisplayNameAr,
// this.mobileNumberWithZipCode,
// });
//
// factory MemberInformationListModel.fromRawJson(String str) => MemberInformationListModel.fromJson(json.decode(str));
//
// String toRawJson() => json.encode(toJson());
//
// factory MemberInformationListModel.fromJson(Map<String, dynamic> json) => MemberInformationListModel(
// businesSGroupId: json["businesS_GROUP_ID"],
// persoNId: json["persoN_ID"],
// persoNTypeId: json["persoN_TYPE_ID"],
// assignmenTId: json["assignmenT_ID"],
// assignmenTStartDate: json["assignmenT_START_DATE"],
// assignmenTEndDate: json["assignmenT_END_DATE"],
// primarYFlag: json["primarY_FLAG"],
// currenTEmployeeFlag: json["currenT_EMPLOYEE_FLAG"],
// assignmenTStatusTypeId: json["assignmenT_STATUS_TYPE_ID"],
// normaLHours: json["normaL_HOURS"],
// frequency: json["frequency"],
// frequencYMeaning: json["frequencY_MEANING"],
// employeENumber: json["employeE_NUMBER"],
// nationaLIdentifier: json["nationaL_IDENTIFIER"],
// systeMPersonType: json["systeM_PERSON_TYPE"],
// persoNType: json["persoN_TYPE"],
// manuaLTimecardFlag: json["manuaL_TIMECARD_FLAG"],
// manuaLTimecardMeaning: json["manuaL_TIMECARD_MEANING"],
// swipeSExemptedFlag: json["swipeS_EXEMPTED_FLAG"],
// swipeSExemptedMeaning: json["swipeS_EXEMPTED_MEANING"],
// assignmenTNumber: json["assignmenT_NUMBER"],
// uniTNumber: json["uniT_NUMBER"],
// useRStatus: json["useR_STATUS"],
// employmenTCategory: json["employmenT_CATEGORY"],
// assignmenTType: json["assignmenT_TYPE"],
// employmenTCategoryMeaning: json["employmenT_CATEGORY_MEANING"],
// peRInformationCategory: json["peR_INFORMATION_CATEGORY"],
// nationalitYCode: json["nationalitY_CODE"],
// nationalitYMeaning: json["nationalitY_MEANING"],
// hirEDate: json["hirE_DATE"],
// roWNum: json["roW_NUM"],
// servicEYears: json["servicE_YEARS"],
// servicEDays: json["servicE_DAYS"],
// actuaLTerminationDate: json["actuaL_TERMINATION_DATE"],
// employeEEmailAddress: json["employeE_EMAIL_ADDRESS"],
// joBId: json["joB_ID"],
// positioNId: json["positioN_ID"],
// organizatioNId: json["organizatioN_ID"],
// locatioNId: json["locatioN_ID"],
// payrolLId: json["payrolL_ID"],
// gradEId: json["gradE_ID"],
// positioNName: json["positioN_NAME"],
// organizatioNName: json["organizatioN_NAME"],
// locatioNName: json["locatioN_NAME"],
// payrolLName: json["payrolL_NAME"],
// payrolLCode: json["payrolL_CODE"],
// gradEName: json["gradE_NAME"],
// employeEMobileNumber: json["employeE_MOBILE_NUMBER"],
// employeEWorkNumber: json["employeE_WORK_NUMBER"],
// employeeQr: json["employeeQR"],
// businessCardPrivilege: json["businessCardPrivilege"],
// businessCardQr: json["businessCardQR"],
// supervisoRId: json["supervisoR_ID"],
// supervisoRAssignmentId: json["supervisoR_ASSIGNMENT_ID"],
// supervisoRNumber: json["supervisoR_NUMBER"],
// supervisoRName: json["supervisoR_NAME"],
// supervisoRDisplayName: json["supervisoR_DISPLAY_NAME"],
// supervisoREmailAddress: json["supervisoR_EMAIL_ADDRESS"],
// supervisoRMobileNumber: json["supervisoR_MOBILE_NUMBER"],
// supervisoRWorkNumber: json["supervisoR_WORK_NUMBER"],
// employeEImage: json["employeE_IMAGE"],
// tKPersonId: json["tK_PERSON_ID"],
// tKEmployeeNumber: json["tK_EMPLOYEE_NUMBER"],
// tKEmployeeName: json["tK_EMPLOYEE_NAME"],
// tKEmployeeDisplayName: json["tK_EMPLOYEE_DISPLAY_NAME"],
// tKEmailAddress: json["tK_EMAIL_ADDRESS"],
// nOOfRows: json["nO_OF_ROWS"],
// froMRowNum: json["froM_ROW_NUM"],
// tORowNum: json["tO_ROW_NUM"],
// ledgeRId: json["ledgeR_ID"],
// servicEMonths: json["servicE_MONTHS"],
// employeeNameEn: json["EMPLOYEE_NAME_EN"],
// employeENameAr: json["employeE_NAME_AR"],
// jobNameEn: json["JOB_NAME_EN"],
// joBNameAr: json["joB_NAME_AR"],
// employeeDisplayNameEn: json["EMPLOYEE_DISPLAY_NAME_EN"],
// employeEDisplayNameAr: json["employeE_DISPLAY_NAME_AR"],
// mobileNumberWithZipCode: json["mobileNumberWithZipCode"],
// );
//
// Map<String, dynamic> toJson() => {
// "businesS_GROUP_ID": businesSGroupId,
// "persoN_ID": persoNId,
// "persoN_TYPE_ID": persoNTypeId,
// "assignmenT_ID": assignmenTId,
// "assignmenT_START_DATE": assignmenTStartDate,
// "assignmenT_END_DATE": assignmenTEndDate,
// "primarY_FLAG": primarYFlag,
// "currenT_EMPLOYEE_FLAG": currenTEmployeeFlag,
// "assignmenT_STATUS_TYPE_ID": assignmenTStatusTypeId,
// "normaL_HOURS": normaLHours,
// "frequency": frequency,
// "frequencY_MEANING": frequencYMeaning,
// "employeE_NUMBER": employeENumber,
// "nationaL_IDENTIFIER": nationaLIdentifier,
// "systeM_PERSON_TYPE": systeMPersonType,
// "persoN_TYPE": persoNType,
// "manuaL_TIMECARD_FLAG": manuaLTimecardFlag,
// "manuaL_TIMECARD_MEANING": manuaLTimecardMeaning,
// "swipeS_EXEMPTED_FLAG": swipeSExemptedFlag,
// "swipeS_EXEMPTED_MEANING": swipeSExemptedMeaning,
// "assignmenT_NUMBER": assignmenTNumber,
// "uniT_NUMBER": uniTNumber,
// "useR_STATUS": useRStatus,
// "employmenT_CATEGORY": employmenTCategory,
// "assignmenT_TYPE": assignmenTType,
// "employmenT_CATEGORY_MEANING": employmenTCategoryMeaning,
// "peR_INFORMATION_CATEGORY": peRInformationCategory,
// "nationalitY_CODE": nationalitYCode,
// "nationalitY_MEANING": nationalitYMeaning,
// "hirE_DATE": hirEDate,
// "roW_NUM": roWNum,
// "servicE_YEARS": servicEYears,
// "servicE_DAYS": servicEDays,
// "actuaL_TERMINATION_DATE": actuaLTerminationDate,
// "employeE_EMAIL_ADDRESS": employeEEmailAddress,
// "joB_ID": joBId,
// "positioN_ID": positioNId,
// "organizatioN_ID": organizatioNId,
// "locatioN_ID": locatioNId,
// "payrolL_ID": payrolLId,
// "gradE_ID": gradEId,
// "positioN_NAME": positioNName,
// "organizatioN_NAME": organizatioNName,
// "locatioN_NAME": locatioNName,
// "payrolL_NAME": payrolLName,
// "payrolL_CODE": payrolLCode,
// "gradE_NAME": gradEName,
// "employeE_MOBILE_NUMBER": employeEMobileNumber,
// "employeE_WORK_NUMBER": employeEWorkNumber,
// "employeeQR": employeeQr,
// "businessCardPrivilege": businessCardPrivilege,
// "businessCardQR": businessCardQr,
// "supervisoR_ID": supervisoRId,
// "supervisoR_ASSIGNMENT_ID": supervisoRAssignmentId,
// "supervisoR_NUMBER": supervisoRNumber,
// "supervisoR_NAME": supervisoRName,
// "supervisoR_DISPLAY_NAME": supervisoRDisplayName,
// "supervisoR_EMAIL_ADDRESS": supervisoREmailAddress,
// "supervisoR_MOBILE_NUMBER": supervisoRMobileNumber,
// "supervisoR_WORK_NUMBER": supervisoRWorkNumber,
// "employeE_IMAGE": employeEImage,
// "tK_PERSON_ID": tKPersonId,
// "tK_EMPLOYEE_NUMBER": tKEmployeeNumber,
// "tK_EMPLOYEE_NAME": tKEmployeeName,
// "tK_EMPLOYEE_DISPLAY_NAME": tKEmployeeDisplayName,
// "tK_EMAIL_ADDRESS": tKEmailAddress,
// "nO_OF_ROWS": nOOfRows,
// "froM_ROW_NUM": froMRowNum,
// "tO_ROW_NUM": tORowNum,
// "ledgeR_ID": ledgeRId,
// "servicE_MONTHS": servicEMonths,
// "EMPLOYEE_NAME_EN": employeeNameEn,
// "employeE_NAME_AR": employeENameAr,
// "JOB_NAME_EN": jobNameEn,
// "joB_NAME_AR": joBNameAr,
// "EMPLOYEE_DISPLAY_NAME_EN": employeeDisplayNameEn,
// "employeE_DISPLAY_NAME_AR": employeEDisplayNameAr,
// "mobileNumberWithZipCode": mobileNumberWithZipCode,
// };
// }
class PrivilegeList {
int? id;
String? serviceName;
bool? previlege;
bool? previlegeHmg;
PrivilegeList({
this.id,
this.serviceName,
this.previlege,
this.previlegeHmg,
});
factory PrivilegeList.fromRawJson(String str) => PrivilegeList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory PrivilegeList.fromJson(Map<String, dynamic> json) => PrivilegeList(
id: json["id"],
serviceName: json["serviceName"],
previlege: json["previlege"],
previlegeHmg: json["previlege_HMG"],
);
Map<String, dynamic> toJson() => {
"id": id,
"serviceName": serviceName,
"previlege": previlege,
"previlege_HMG": previlegeHmg,
};
}

@ -1,55 +1,61 @@
import 'dart:convert';
class GetAttendanceTracking {
String? pSwipesExemptedFlag;
String? pShtName;
String? pScheduledHours;
String? pBreakHours;
String? pSpentHours;
String? pRemainingHours;
String? pLateInHours;
String? pSwipeIn;
String? pSwipeOut;
String? pReturnStatus;
String? pReturnMsg;
GetAttendanceTracking({
this.pBreakHours,
this.pLateInHours,
this.pRemainingHours,
this.pReturnMsg,
this.pReturnStatus,
this.pScheduledHours,
this.pSwipesExemptedFlag,
this.pShtName,
this.pScheduledHours,
this.pBreakHours,
this.pSpentHours,
this.pSwipesExemptedFlag,
this.pRemainingHours,
this.pLateInHours,
this.pSwipeIn,
this.pSwipeOut,
this.pReturnStatus,
this.pReturnMsg,
});
String? pBreakHours;
String? pLateInHours;
String? pRemainingHours;
String? pReturnMsg;
String? pReturnStatus;
String? pScheduledHours;
String? pShtName;
String? pSpentHours;
String? pSwipesExemptedFlag;
dynamic pSwipeIn;
dynamic pSwipeOut;
factory GetAttendanceTracking.fromRawJson(String str) => GetAttendanceTracking.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory GetAttendanceTracking.fromMap(Map<String, dynamic> json) => GetAttendanceTracking(
pBreakHours: json["P_BREAK_HOURS"] == null ? null : json["P_BREAK_HOURS"],
pLateInHours: json["P_LATE_IN_HOURS"] == null ? null : json["P_LATE_IN_HOURS"],
pRemainingHours: json["P_REMAINING_HOURS"] == null ? null : json["P_REMAINING_HOURS"],
pReturnMsg: json["P_RETURN_MSG"] == null ? null : json["P_RETURN_MSG"],
pReturnStatus: json["P_RETURN_STATUS"] == null ? null : json["P_RETURN_STATUS"],
pScheduledHours: json["P_SCHEDULED_HOURS"] == null ? null : json["P_SCHEDULED_HOURS"],
pShtName: json["P_SHT_NAME"] == null ? null : json["P_SHT_NAME"],
pSpentHours: json["P_SPENT_HOURS"] == null ? null : json["P_SPENT_HOURS"],
pSwipesExemptedFlag: json["P_SWIPES_EXEMPTED_FLAG"] == null ? null : json["P_SWIPES_EXEMPTED_FLAG"],
pSwipeIn: json["P_SWIPE_IN"],
pSwipeOut: json["P_SWIPE_OUT"],
);
factory GetAttendanceTracking.fromJson(Map<String, dynamic> json) => GetAttendanceTracking(
pSwipesExemptedFlag: json["p_SWIPES_EXEMPTED_FLAG"],
pShtName: json["p_SHT_NAME"],
pScheduledHours: json["p_SCHEDULED_HOURS"],
pBreakHours: json["p_BREAK_HOURS"],
pSpentHours: json["p_SPENT_HOURS"],
pRemainingHours: json["p_REMAINING_HOURS"],
pLateInHours: json["p_LATE_IN_HOURS"],
pSwipeIn: json["p_SWIPE_IN"],
pSwipeOut: json["p_SWIPE_OUT"],
pReturnStatus: json["p_RETURN_STATUS"],
pReturnMsg: json["p_RETURN_MSG"],
);
Map<String, dynamic> toMap() => {
"P_BREAK_HOURS": pBreakHours == null ? null : pBreakHours,
"P_LATE_IN_HOURS": pLateInHours == null ? null : pLateInHours,
"P_REMAINING_HOURS": pRemainingHours == null ? null : pRemainingHours,
"P_RETURN_MSG": pReturnMsg == null ? null : pReturnMsg,
"P_RETURN_STATUS": pReturnStatus == null ? null : pReturnStatus,
"P_SCHEDULED_HOURS": pScheduledHours == null ? null : pScheduledHours,
"P_SHT_NAME": pShtName == null ? null : pShtName,
"P_SPENT_HOURS": pSpentHours == null ? null : pSpentHours,
"P_SWIPES_EXEMPTED_FLAG": pSwipesExemptedFlag == null ? null : pSwipesExemptedFlag,
"P_SWIPE_IN": pSwipeIn,
"P_SWIPE_OUT": pSwipeOut,
};
Map<String, dynamic> toJson() => {
"p_SWIPES_EXEMPTED_FLAG": pSwipesExemptedFlag,
"p_SHT_NAME": pShtName,
"p_SCHEDULED_HOURS": pScheduledHours,
"p_BREAK_HOURS": pBreakHours,
"p_SPENT_HOURS": pSpentHours,
"p_REMAINING_HOURS": pRemainingHours,
"p_LATE_IN_HOURS": pLateInHours,
"p_SWIPE_IN": pSwipeIn,
"p_SWIPE_OUT": pSwipeOut,
"p_RETURN_STATUS": pReturnStatus,
"p_RETURN_MSG": pReturnMsg,
};
}

@ -0,0 +1,29 @@
import 'dart:convert';
class GetOpenMissingSwipes {
int? pOpenMissingSwipes;
String? pReturnStatus;
String? pReturnMsg;
GetOpenMissingSwipes({
this.pOpenMissingSwipes,
this.pReturnStatus,
this.pReturnMsg,
});
factory GetOpenMissingSwipes.fromRawJson(String str) => GetOpenMissingSwipes.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory GetOpenMissingSwipes.fromJson(Map<String, dynamic> json) => GetOpenMissingSwipes(
pOpenMissingSwipes: json["p_OPEN_MISSING_SWIPES"],
pReturnStatus: json["p_RETURN_STATUS"],
pReturnMsg: json["p_RETURN_MSG"],
);
Map<String, dynamic> toJson() => {
"p_OPEN_MISSING_SWIPES": pOpenMissingSwipes,
"p_RETURN_STATUS": pReturnStatus,
"p_RETURN_MSG": pReturnMsg,
};
}

@ -10,14 +10,14 @@ class GetOpenNotificationsList {
int? openNtfNumber;
factory GetOpenNotificationsList.fromMap(Map<String, dynamic> json) => GetOpenNotificationsList(
itemType: json["ITEM_TYPE"] == null ? null : json["ITEM_TYPE"],
itemTypeDisplayName: json["ITEM_TYPE_DISPLAY_NAME"] == null ? null : json["ITEM_TYPE_DISPLAY_NAME"],
openNtfNumber: json["OPEN_NTF_NUMBER"] == null ? null : json["OPEN_NTF_NUMBER"],
itemType: json["iteM_TYPE"] == null ? null : json["iteM_TYPE"],
itemTypeDisplayName: json["iteM_TYPE_DISPLAY_NAME"] == null ? null : json["iteM_TYPE_DISPLAY_NAME"],
openNtfNumber: json["opeN_NTF_NUMBER"] == null ? null : json["opeN_NTF_NUMBER"],
);
Map<String, dynamic> toMap() => {
"ITEM_TYPE": itemType == null ? null : itemType,
"ITEM_TYPE_DISPLAY_NAME": itemTypeDisplayName == null ? null : itemTypeDisplayName,
"OPEN_NTF_NUMBER": openNtfNumber == null ? null : openNtfNumber,
"iteM_TYPE": itemType == null ? null : itemType,
"iteM_TYPE_DISPLAY_NAME": itemTypeDisplayName == null ? null : itemTypeDisplayName,
"opeN_NTF_NUMBER": openNtfNumber == null ? null : openNtfNumber,
};
}

@ -1,39 +1,45 @@
import 'dart:convert';
class ListMenu {
int? menUId;
String? menUName;
String? menUType;
dynamic suBMenuName;
dynamic resPId;
int? requesTGroupId;
String? requesTGroupName;
ListMenu({
this.menuId,
this.menuName,
this.menuType,
this.requestGroupId,
this.requestGroupName,
this.respId,
this.subMenuName,
this.menUId,
this.menUName,
this.menUType,
this.suBMenuName,
this.resPId,
this.requesTGroupId,
this.requesTGroupName,
});
int? menuId;
String? menuName;
String? menuType;
int? requestGroupId;
String? requestGroupName;
dynamic? respId;
String? subMenuName;
factory ListMenu.fromRawJson(String str) => ListMenu.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory ListMenu.fromJson(Map<String, dynamic> json) => ListMenu(
menuId: json["MENU_ID"] == null ? null : json["MENU_ID"],
menuName: json["MENU_NAME"] == null ? null : json["MENU_NAME"],
menuType: json["MENU_TYPE"] == null ? null : json["MENU_TYPE"],
requestGroupId: json["REQUEST_GROUP_ID"] == null ? null : json["REQUEST_GROUP_ID"],
requestGroupName: json["REQUEST_GROUP_NAME"] == null ? null : json["REQUEST_GROUP_NAME"],
respId: json["RESP_ID"],
subMenuName: json["SUB_MENU_NAME"] == null ? null : json["SUB_MENU_NAME"],
);
menUId: json["menU_ID"],
menUName: json["menU_NAME"],
menUType: json["menU_TYPE"],
suBMenuName: json["suB_MENU_NAME"],
resPId: json["resP_ID"],
requesTGroupId: json["requesT_GROUP_ID"],
requesTGroupName: json["requesT_GROUP_NAME"],
);
Map<String, dynamic> toJson() => {
"MENU_ID": menuId == null ? null : menuId,
"MENU_NAME": menuName == null ? null : menuName,
"MENU_TYPE": menuType == null ? null : menuType,
"REQUEST_GROUP_ID": requestGroupId == null ? null : requestGroupId,
"REQUEST_GROUP_NAME": requestGroupName == null ? null : requestGroupName,
"RESP_ID": respId,
"SUB_MENU_NAME": subMenuName == null ? null : subMenuName,
};
"menU_ID": menUId,
"menU_NAME": menUName,
"menU_TYPE": menUType,
"suB_MENU_NAME": suBMenuName,
"resP_ID": resPId,
"requesT_GROUP_ID": requesTGroupId,
"requesT_GROUP_NAME": requesTGroupName,
};
}

@ -1,3 +1,5 @@
import 'dart:convert';
class GetMenuEntriesList {
GetMenuEntriesList({
this.addButton,
@ -12,6 +14,7 @@ class GetMenuEntriesList {
this.prompt,
this.requestType,
this.updateButton,
this.attachmenTRequired
});
String? addButton;
@ -26,35 +29,41 @@ class GetMenuEntriesList {
String? prompt;
String? requestType;
String? updateButton;
dynamic attachmenTRequired;
factory GetMenuEntriesList.fromRawJson(String str) => GetMenuEntriesList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory GetMenuEntriesList.fromJson(Map<String, dynamic> json) => GetMenuEntriesList(
addButton: json["ADD_BUTTON"] == null ? null : json["ADD_BUTTON"],
deleteButton: json["DELETE_BUTTON"] == null ? null : json["DELETE_BUTTON"],
entrySequence: json["ENTRY_SEQUENCE"] == null ? null : json["ENTRY_SEQUENCE"],
functionName: json["FUNCTION_NAME"] == null ? null : json["FUNCTION_NAME"],
icon: json["ICON"] == null ? null : json["ICON"],
lvl: json["LVL"] == null ? null : json["LVL"],
menuEntryType: json["MENU_ENTRY_TYPE"] == null ? null : json["MENU_ENTRY_TYPE"],
menuName: json["MENU_NAME"] == null ? null : json["MENU_NAME"],
parentMenuName: json["PARENT_MENU_NAME"] == null ? null : json["PARENT_MENU_NAME"],
prompt: json["PROMPT"] == null ? null : json["PROMPT"],
requestType: json["REQUEST_TYPE"] == null ? null : json["REQUEST_TYPE"],
updateButton: json["UPDATE_BUTTON"] == null ? null :json["UPDATE_BUTTON"],
addButton: json["adDButton"] == null ? null : json["adDButton"],
deleteButton: json["deletEButton"] == null ? null : json["deletEButton"],
entrySequence: json["entrYSequence"] == null ? null : json["entrYSequence"],
functionName: json["functioNName"] == null ? null : json["functioNName"],
icon: json["icon"] == null ? null : json["icon"],
lvl: json["lvl"] == null ? null : json["lvl"],
menuEntryType: json["menU_ENTRY_TYPE"] == null ? null : json["menU_ENTRY_TYPE"],
menuName: json["menUName"] == null ? null : json["menUName"],
parentMenuName: json["parenTMenuName"] == null ? null : json["parenTMenuName"],
prompt: json["prompt"] == null ? null : json["prompt"],
requestType: json["requesTType"] == null ? null : json["requesTType"],
updateButton: json["updatEButton"] == null ? null :json["updatEButton"],
attachmenTRequired: json["attachmenT_REQUIRED"],
);
Map<String, dynamic> toJson() => {
"ADD_BUTTON": addButton == null ? null :addButton,
"DELETE_BUTTON": deleteButton == null ? null : deleteButton,
"ENTRY_SEQUENCE": entrySequence == null ? null : entrySequence,
"FUNCTION_NAME": functionName == null ? null : functionName,
"ICON": icon == null ? null : icon,
"LVL": lvl == null ? null : lvl,
"MENU_ENTRY_TYPE": menuEntryType == null ? null : menuEntryType,
"MENU_NAME": menuName == null ? null : menuName,
"PARENT_MENU_NAME": parentMenuName == null ? null : parentMenuName,
"PROMPT": prompt == null ? null : prompt,
"REQUEST_TYPE": requestType == null ? null : requestType,
"UPDATE_BUTTON": updateButton == null ? null : updateButton,
"adDButton": addButton == null ? null :addButton,
"deletEButton": deleteButton == null ? null : deleteButton,
"entrYSequence": entrySequence == null ? null : entrySequence,
"functioNName": functionName == null ? null : functionName,
"icon": icon == null ? null : icon,
"lvl": lvl == null ? null : lvl,
"menU_ENTRY_TYPE": menuEntryType == null ? null : menuEntryType,
"menUName": menuName == null ? null : menuName,
"parenTMenuName": parentMenuName == null ? null : parentMenuName,
"prompt": prompt == null ? null : prompt,
"requesTType": requestType == null ? null : requestType,
"updatEButton": updateButton == null ? null : updateButton,
"attachmenT_REQUIRED": attachmenTRequired,
};
}

@ -818,7 +818,7 @@ class GenericResponseModel {
});
}
getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null ? null : GetAttendanceTracking.fromMap(json["GetAttendanceTrackingList"]);
getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null ? null : GetAttendanceTracking.fromRawJson(json["GetAttendanceTrackingList"]);
if (json['GetBasicDetColsStructureList'] != null) {
getBasicDetColsStructureList = <GetBasicDetColsStructureList>[];
json['GetBasicDetColsStructureList'].forEach((v) {
@ -1279,7 +1279,7 @@ class GenericResponseModel {
listMenu = json["List_Menu"] == null ? <ListMenu>[] : List<ListMenu>.from(json["List_Menu"].map((x) => ListMenu.fromJson(x)));
listNewEmployees = json['List_NewEmployees'];
listRadScreen = json['List_RadScreen'];
logInTokenID = json['LogInTokenID'];
logInTokenID = json['logInTokenID'];
if (json['MemberInformationList'] != null) {
memberInformationList = <MemberInformationListModel>[];
json['MemberInformationList'].forEach((v) {

@ -7,7 +7,7 @@ class GetMobileLoginInfoListModel {
int? companyID;
String? deviceType;
String? deviceToken;
int? language;
String? language;
int? gender;
int? loginType;
String? createdOn;
@ -31,36 +31,36 @@ class GetMobileLoginInfoListModel {
this.businessCardPrivilege});
GetMobileLoginInfoListModel.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
employeeID = json['EmployeeID'];
channelID = json['ChannelID'];
companyID = json['CompanyID'];
deviceType = json['DeviceType'];
deviceToken = json['DeviceToken'];
language = json['Language'];
gender = json['Gender'];
loginType = json['LoginType'];
createdOn = json['CreatedOn'];
editedOn = json['EditedOn'];
employeeName = json['EmployeeName'];
businessCardPrivilege = json['BusinessCardPrivilege'];
iD = json['id'];
employeeID = json['employeeID'];
channelID = json['channelID'];
companyID = json['companyID'];
deviceType = json['deviceType'];
deviceToken = json['deviceToken'];
language = json['language'];
gender = json['gender'];
loginType = json['loginType'];
createdOn = json['createdOn'];
editedOn = json['editedOn'];
employeeName = json['employeeName'];
businessCardPrivilege = json['businessCardPrivilege'];
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = Map<String, dynamic>();
data['ID'] = iD;
data['EmployeeID'] = employeeID;
data['ChannelID'] = channelID;
data['CompanyID'] = companyID;
data['DeviceType'] = deviceType;
data['DeviceToken'] = deviceToken;
data['Language'] = language;
data['Gender'] = gender;
data['LoginType'] = loginType;
data['CreatedOn'] = createdOn;
data['EditedOn'] = editedOn;
data['id'] = iD;
data['employeeID'] = employeeID;
data['channelID'] = channelID;
data['companyID'] = companyID;
data['deviceType'] = deviceType;
data['deviceToken'] = deviceToken;
data['language'] = language;
data['gender'] = gender;
data['loginType'] = loginType;
data['createdOn'] = createdOn;
data['editedOn'] = editedOn;
data['EmployeeName'] = employeeName;
data['BusinessCardPrivilege'] = businessCardPrivilege;
data['businessCardPrivilege'] = businessCardPrivilege;
return data;
}

@ -3,349 +3,341 @@ import 'dart:convert';
import 'package:mohem_flutter_app/classes/consts.dart';
import 'package:shared_preferences/shared_preferences.dart';
class MemberInformationListModel {
String? aCTUALTERMINATIONDATE;
String? aSSIGNMENTENDDATE;
int? aSSIGNMENTID;
String? aSSIGNMENTNUMBER;
String? aSSIGNMENTSTARTDATE;
int? aSSIGNMENTSTATUSTYPEID;
String? aSSIGNMENTTYPE;
int? bUSINESSGROUPID;
String? bUSINESSGROUPNAME;
String? businessCardQR;
String? cURRENTEMPLOYEEFLAG;
String? eMPLOYEEDISPLAYNAME;
String? eMPLOYEEDISPLAYNAMEAr;
String? eMPLOYEEDISPLAYNAMEEn;
String? eMPLOYEEEMAILADDRESS;
String? eMPLOYEEIMAGE;
String? eMPLOYEEMOBILENUMBER;
String? eMPLOYEENAME;
String? eMPLOYEENAMEAr;
String? eMPLOYEENAMEEn;
String? eMPLOYEENUMBER;
String? eMPLOYEEWORKNUMBER;
String? eMPLOYMENTCATEGORY;
String? eMPLOYMENTCATEGORYMEANING;
String? employeeQR;
String? fREQUENCY;
String? fREQUENCYMEANING;
int? fROMROWNUM;
int? gRADEID;
String? gRADENAME;
String? hIREDATE;
int? jOBID;
String? jOBNAME;
String? jOBNAMEAr;
String? jOBNAMEEn;
int? lEDGERID;
int? lOCATIONID;
String? lOCATIONNAME;
String? mANUALTIMECARDFLAG;
String? mANUALTIMECARDMEANING;
String? mobileNumberWithZipCode;
String? nATIONALITYCODE;
String? nATIONALITYMEANING;
String? nATIONALIDENTIFIER;
dynamic? nORMALHOURS;
int? nOOFROWS;
int? oRGANIZATIONID;
String? oRGANIZATIONNAME;
String? pAYROLLCODE;
int? pAYROLLID;
String? pAYROLLNAME;
int? pERSONID;
String? pERSONTYPE;
int? pERSONTYPEID;
String? pERINFORMATIONCATEGORY;
int? pOSITIONID;
String? pOSITIONNAME;
String? pRIMARYFLAG;
String? rOWNUM;
int? sERVICEDAYS;
int? sERVICEMONTHS;
int? sERVICEYEARS;
String? sUPERVISORASSIGNMENTID;
String? sUPERVISORDISPLAYNAME;
String? sUPERVISOREMAILADDRESS;
int? sUPERVISORID;
String? sUPERVISORMOBILENUMBER;
String? sUPERVISORNAME;
String? sUPERVISORNUMBER;
String? sUPERVISORWORKNUMBER;
String? sWIPESEXEMPTEDFLAG;
String? sWIPESEXEMPTEDMEANING;
String? sYSTEMPERSONTYPE;
String? tKEMAILADDRESS;
String? tKEMPLOYEEDISPLAYNAME;
String? tKEMPLOYEENAME;
String? tKEMPLOYEENUMBER;
int? tKPERSONID;
int? tOROWNUM;
String? uNITNUMBER;
String? uSERSTATUS;
int? businesSGroupId;
int? persoNId;
int? persoNTypeId;
int? assignmenTId;
String? assignmenTStartDate;
String? assignmenTEndDate;
String? primarYFlag;
String? currenTEmployeeFlag;
int? assignmenTStatusTypeId;
dynamic normaLHours;
dynamic frequency;
dynamic frequencYMeaning;
String? employeENumber;
String? nationaLIdentifier;
String? systeMPersonType;
String? persoNType;
String? manuaLTimecardFlag;
String? manuaLTimecardMeaning;
String? swipeSExemptedFlag;
String? swipeSExemptedMeaning;
String? assignmenTNumber;
dynamic uniTNumber;
String? useRStatus;
String? employmenTCategory;
String? assignmenTType;
String? employmenTCategoryMeaning;
String? peRInformationCategory;
String? nationalitYCode;
String? nationalitYMeaning;
String? hirEDate;
String? roWNum;
int? servicEYears;
int? servicEDays;
dynamic actuaLTerminationDate;
String? employeEEmailAddress;
int? joBId;
int? positioNId;
int? organizatioNId;
int? locatioNId;
int? payrolLId;
dynamic gradEId;
String? positioNName;
String? organizatioNName;
String? locatioNName;
String? payrolLName;
String? payrolLCode;
dynamic gradEName;
String? employeEMobileNumber;
String? employeEWorkNumber;
String? employeeQr;
bool? businessCardPrivilege;
String? businessCardQr;
int? supervisoRId;
dynamic supervisoRAssignmentId;
String? supervisoRNumber;
String? supervisoRName;
String? supervisoRDisplayName;
String? supervisoREmailAddress;
String? supervisoRMobileNumber;
String? supervisoRWorkNumber;
String? employeEImage;
int? tKPersonId;
String? tKEmployeeNumber;
String? tKEmployeeName;
String? tKEmployeeDisplayName;
String? tKEmailAddress;
int? nOOfRows;
int? froMRowNum;
int? tORowNum;
int? ledgeRId;
int? servicEMonths;
String? employeeNameEn;
dynamic employeENameAr;
String? jobNameEn;
dynamic joBNameAr;
String? employeeDisplayNameEn;
dynamic employeEDisplayNameAr;
String? mobileNumberWithZipCode;
MemberInformationListModel(
{this.aCTUALTERMINATIONDATE,
this.aSSIGNMENTENDDATE,
this.aSSIGNMENTID,
this.aSSIGNMENTNUMBER,
this.aSSIGNMENTSTARTDATE,
this.aSSIGNMENTSTATUSTYPEID,
this.aSSIGNMENTTYPE,
this.bUSINESSGROUPID,
this.bUSINESSGROUPNAME,
this.businessCardQR,
this.businessCardPrivilege,
this.cURRENTEMPLOYEEFLAG,
this.eMPLOYEEDISPLAYNAME,
this.eMPLOYEEDISPLAYNAMEAr,
this.eMPLOYEEDISPLAYNAMEEn,
this.eMPLOYEEEMAILADDRESS,
this.eMPLOYEEIMAGE,
this.eMPLOYEEMOBILENUMBER,
this.eMPLOYEENAME,
this.eMPLOYEENAMEAr,
this.eMPLOYEENAMEEn,
this.eMPLOYEENUMBER,
this.eMPLOYEEWORKNUMBER,
this.eMPLOYMENTCATEGORY,
this.eMPLOYMENTCATEGORYMEANING,
this.employeeQR,
this.fREQUENCY,
this.fREQUENCYMEANING,
this.fROMROWNUM,
this.gRADEID,
this.gRADENAME,
this.hIREDATE,
this.jOBID,
this.jOBNAME,
this.jOBNAMEAr,
this.jOBNAMEEn,
this.lEDGERID,
this.lOCATIONID,
this.lOCATIONNAME,
this.mANUALTIMECARDFLAG,
this.mANUALTIMECARDMEANING,
this.mobileNumberWithZipCode,
this.nATIONALITYCODE,
this.nATIONALITYMEANING,
this.nATIONALIDENTIFIER,
this.nORMALHOURS,
this.nOOFROWS,
this.oRGANIZATIONID,
this.oRGANIZATIONNAME,
this.pAYROLLCODE,
this.pAYROLLID,
this.pAYROLLNAME,
this.pERSONID,
this.pERSONTYPE,
this.pERSONTYPEID,
this.pERINFORMATIONCATEGORY,
this.pOSITIONID,
this.pOSITIONNAME,
this.pRIMARYFLAG,
this.rOWNUM,
this.sERVICEDAYS,
this.sERVICEMONTHS,
this.sERVICEYEARS,
this.sUPERVISORASSIGNMENTID,
this.sUPERVISORDISPLAYNAME,
this.sUPERVISOREMAILADDRESS,
this.sUPERVISORID,
this.sUPERVISORMOBILENUMBER,
this.sUPERVISORNAME,
this.sUPERVISORNUMBER,
this.sUPERVISORWORKNUMBER,
this.sWIPESEXEMPTEDFLAG,
this.sWIPESEXEMPTEDMEANING,
this.sYSTEMPERSONTYPE,
this.tKEMAILADDRESS,
this.tKEMPLOYEEDISPLAYNAME,
this.tKEMPLOYEENAME,
this.tKEMPLOYEENUMBER,
this.tKPERSONID,
this.tOROWNUM,
this.uNITNUMBER,
this.uSERSTATUS});
MemberInformationListModel({
this.businesSGroupId,
this.persoNId,
this.persoNTypeId,
this.assignmenTId,
this.assignmenTStartDate,
this.assignmenTEndDate,
this.primarYFlag,
this.currenTEmployeeFlag,
this.assignmenTStatusTypeId,
this.normaLHours,
this.frequency,
this.frequencYMeaning,
this.employeENumber,
this.nationaLIdentifier,
this.systeMPersonType,
this.persoNType,
this.manuaLTimecardFlag,
this.manuaLTimecardMeaning,
this.swipeSExemptedFlag,
this.swipeSExemptedMeaning,
this.assignmenTNumber,
this.uniTNumber,
this.useRStatus,
this.employmenTCategory,
this.assignmenTType,
this.employmenTCategoryMeaning,
this.peRInformationCategory,
this.nationalitYCode,
this.nationalitYMeaning,
this.hirEDate,
this.roWNum,
this.servicEYears,
this.servicEDays,
this.actuaLTerminationDate,
this.employeEEmailAddress,
this.joBId,
this.positioNId,
this.organizatioNId,
this.locatioNId,
this.payrolLId,
this.gradEId,
this.positioNName,
this.organizatioNName,
this.locatioNName,
this.payrolLName,
this.payrolLCode,
this.gradEName,
this.employeEMobileNumber,
this.employeEWorkNumber,
this.employeeQr,
this.businessCardPrivilege,
this.businessCardQr,
this.supervisoRId,
this.supervisoRAssignmentId,
this.supervisoRNumber,
this.supervisoRName,
this.supervisoRDisplayName,
this.supervisoREmailAddress,
this.supervisoRMobileNumber,
this.supervisoRWorkNumber,
this.employeEImage,
this.tKPersonId,
this.tKEmployeeNumber,
this.tKEmployeeName,
this.tKEmployeeDisplayName,
this.tKEmailAddress,
this.nOOfRows,
this.froMRowNum,
this.tORowNum,
this.ledgeRId,
this.servicEMonths,
this.employeeNameEn,
this.employeENameAr,
this.jobNameEn,
this.joBNameAr,
this.employeeDisplayNameEn,
this.employeEDisplayNameAr,
this.mobileNumberWithZipCode,
});
MemberInformationListModel.fromJson(Map<String, dynamic> json) {
aCTUALTERMINATIONDATE = json['ACTUAL_TERMINATION_DATE'];
aSSIGNMENTENDDATE = json['ASSIGNMENT_END_DATE'];
aSSIGNMENTID = json['ASSIGNMENT_ID'];
aSSIGNMENTNUMBER = json['ASSIGNMENT_NUMBER'];
businessCardPrivilege = json['businessCardPrivilege'];
aSSIGNMENTSTARTDATE = json['ASSIGNMENT_START_DATE'];
aSSIGNMENTSTATUSTYPEID = json['ASSIGNMENT_STATUS_TYPE_ID'];
aSSIGNMENTTYPE = json['ASSIGNMENT_TYPE'];
bUSINESSGROUPID = json['BUSINESS_GROUP_ID'];
bUSINESSGROUPNAME = json['BUSINESS_GROUP_NAME'];
businessCardQR = json['BusinessCardQR'];
cURRENTEMPLOYEEFLAG = json['CURRENT_EMPLOYEE_FLAG'];
eMPLOYEEDISPLAYNAME = json['EMPLOYEE_DISPLAY_NAME'];
eMPLOYEEDISPLAYNAMEAr = json['EMPLOYEE_DISPLAY_NAME_Ar'];
eMPLOYEEDISPLAYNAMEEn = json['EMPLOYEE_DISPLAY_NAME_En'];
eMPLOYEEEMAILADDRESS = json['EMPLOYEE_EMAIL_ADDRESS'];
eMPLOYEEIMAGE = json['EMPLOYEE_IMAGE'];
eMPLOYEEMOBILENUMBER = json['EMPLOYEE_MOBILE_NUMBER'];
eMPLOYEENAME = json['EMPLOYEE_NAME'];
eMPLOYEENAMEAr = json['EMPLOYEE_NAME_Ar'];
eMPLOYEENAMEEn = json['EMPLOYEE_NAME_En'];
eMPLOYEENUMBER = json['EMPLOYEE_NUMBER'];
eMPLOYEEWORKNUMBER = json['EMPLOYEE_WORK_NUMBER'];
eMPLOYMENTCATEGORY = json['EMPLOYMENT_CATEGORY'];
eMPLOYMENTCATEGORYMEANING = json['EMPLOYMENT_CATEGORY_MEANING'];
employeeQR = json['EmployeeQR'];
fREQUENCY = json['FREQUENCY'];
fREQUENCYMEANING = json['FREQUENCY_MEANING'];
fROMROWNUM = json['FROM_ROW_NUM'];
gRADEID = json['GRADE_ID'];
gRADENAME = json['GRADE_NAME'];
hIREDATE = json['HIRE_DATE'];
jOBID = json['JOB_ID'];
jOBNAME = json['JOB_NAME'];
jOBNAMEAr = json['JOB_NAME_Ar'];
jOBNAMEEn = json['JOB_NAME_En'];
lEDGERID = json['LEDGER_ID'];
lOCATIONID = json['LOCATION_ID'];
lOCATIONNAME = json['LOCATION_NAME'];
mANUALTIMECARDFLAG = json['MANUAL_TIMECARD_FLAG'];
mANUALTIMECARDMEANING = json['MANUAL_TIMECARD_MEANING'];
mobileNumberWithZipCode = json['MobileNumberWithZipCode'];
nATIONALITYCODE = json['NATIONALITY_CODE'];
nATIONALITYMEANING = json['NATIONALITY_MEANING'];
nATIONALIDENTIFIER = json['NATIONAL_IDENTIFIER'];
nORMALHOURS = json['NORMAL_HOURS'];
nOOFROWS = json['NO_OF_ROWS'];
oRGANIZATIONID = json['ORGANIZATION_ID'];
oRGANIZATIONNAME = json['ORGANIZATION_NAME'];
pAYROLLCODE = json['PAYROLL_CODE'];
pAYROLLID = json['PAYROLL_ID'];
pAYROLLNAME = json['PAYROLL_NAME'];
pERSONID = json['PERSON_ID'];
pERSONTYPE = json['PERSON_TYPE'];
pERSONTYPEID = json['PERSON_TYPE_ID'];
pERINFORMATIONCATEGORY = json['PER_INFORMATION_CATEGORY'];
pOSITIONID = json['POSITION_ID'];
pOSITIONNAME = json['POSITION_NAME'];
pRIMARYFLAG = json['PRIMARY_FLAG'];
rOWNUM = json['ROW_NUM'];
sERVICEDAYS = json['SERVICE_DAYS'];
sERVICEMONTHS = json['SERVICE_MONTHS'];
sERVICEYEARS = json['SERVICE_YEARS'];
sUPERVISORASSIGNMENTID = json['SUPERVISOR_ASSIGNMENT_ID'];
sUPERVISORDISPLAYNAME = json['SUPERVISOR_DISPLAY_NAME'];
sUPERVISOREMAILADDRESS = json['SUPERVISOR_EMAIL_ADDRESS'];
sUPERVISORID = json['SUPERVISOR_ID'];
sUPERVISORMOBILENUMBER = json['SUPERVISOR_MOBILE_NUMBER'];
sUPERVISORNAME = json['SUPERVISOR_NAME'];
sUPERVISORNUMBER = json['SUPERVISOR_NUMBER'];
sUPERVISORWORKNUMBER = json['SUPERVISOR_WORK_NUMBER'];
sWIPESEXEMPTEDFLAG = json['SWIPES_EXEMPTED_FLAG'];
sWIPESEXEMPTEDMEANING = json['SWIPES_EXEMPTED_MEANING'];
sYSTEMPERSONTYPE = json['SYSTEM_PERSON_TYPE'];
tKEMAILADDRESS = json['TK_EMAIL_ADDRESS'];
tKEMPLOYEEDISPLAYNAME = json['TK_EMPLOYEE_DISPLAY_NAME'];
tKEMPLOYEENAME = json['TK_EMPLOYEE_NAME'];
tKEMPLOYEENUMBER = json['TK_EMPLOYEE_NUMBER'];
tKPERSONID = json['TK_PERSON_ID'];
tOROWNUM = json['TO_ROW_NUM'];
uNITNUMBER = json['UNIT_NUMBER'];
uSERSTATUS = json['USER_STATUS'];
}
factory MemberInformationListModel.fromRawJson(String str) => MemberInformationListModel.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory MemberInformationListModel.fromJson(Map<String, dynamic> json) => MemberInformationListModel(
businesSGroupId: json["businesS_GROUP_ID"],
persoNId: json["persoN_ID"],
persoNTypeId: json["persoN_TYPE_ID"],
assignmenTId: json["assignmenT_ID"],
assignmenTStartDate: json["assignmenT_START_DATE"],
assignmenTEndDate: json["assignmenT_END_DATE"],
primarYFlag: json["primarY_FLAG"],
currenTEmployeeFlag: json["currenT_EMPLOYEE_FLAG"],
assignmenTStatusTypeId: json["assignmenT_STATUS_TYPE_ID"],
normaLHours: json["normaL_HOURS"],
frequency: json["frequency"],
frequencYMeaning: json["frequencY_MEANING"],
employeENumber: json["employeE_NUMBER"],
nationaLIdentifier: json["nationaL_IDENTIFIER"],
systeMPersonType: json["systeM_PERSON_TYPE"],
persoNType: json["persoN_TYPE"],
manuaLTimecardFlag: json["manuaL_TIMECARD_FLAG"],
manuaLTimecardMeaning: json["manuaL_TIMECARD_MEANING"],
swipeSExemptedFlag: json["swipeS_EXEMPTED_FLAG"],
swipeSExemptedMeaning: json["swipeS_EXEMPTED_MEANING"],
assignmenTNumber: json["assignmenT_NUMBER"],
uniTNumber: json["uniT_NUMBER"],
useRStatus: json["useR_STATUS"],
employmenTCategory: json["employmenT_CATEGORY"],
assignmenTType: json["assignmenT_TYPE"],
employmenTCategoryMeaning: json["employmenT_CATEGORY_MEANING"],
peRInformationCategory: json["peR_INFORMATION_CATEGORY"],
nationalitYCode: json["nationalitY_CODE"],
nationalitYMeaning: json["nationalitY_MEANING"],
hirEDate: json["hirE_DATE"],
roWNum: json["roW_NUM"],
servicEYears: json["servicE_YEARS"],
servicEDays: json["servicE_DAYS"],
actuaLTerminationDate: json["actuaL_TERMINATION_DATE"],
employeEEmailAddress: json["employeE_EMAIL_ADDRESS"],
joBId: json["joB_ID"],
positioNId: json["positioN_ID"],
organizatioNId: json["organizatioN_ID"],
locatioNId: json["locatioN_ID"],
payrolLId: json["payrolL_ID"],
gradEId: json["gradE_ID"],
positioNName: json["positioN_NAME"],
organizatioNName: json["organizatioN_NAME"],
locatioNName: json["locatioN_NAME"],
payrolLName: json["payrolL_NAME"],
payrolLCode: json["payrolL_CODE"],
gradEName: json["gradE_NAME"],
employeEMobileNumber: json["employeE_MOBILE_NUMBER"],
employeEWorkNumber: json["employeE_WORK_NUMBER"],
employeeQr: json["employeeQR"],
businessCardPrivilege: json["businessCardPrivilege"],
businessCardQr: json["businessCardQR"],
supervisoRId: json["supervisoR_ID"],
supervisoRAssignmentId: json["supervisoR_ASSIGNMENT_ID"],
supervisoRNumber: json["supervisoR_NUMBER"],
supervisoRName: json["supervisoR_NAME"],
supervisoRDisplayName: json["supervisoR_DISPLAY_NAME"],
supervisoREmailAddress: json["supervisoR_EMAIL_ADDRESS"],
supervisoRMobileNumber: json["supervisoR_MOBILE_NUMBER"],
supervisoRWorkNumber: json["supervisoR_WORK_NUMBER"],
employeEImage: json["employeE_IMAGE"],
tKPersonId: json["tK_PERSON_ID"],
tKEmployeeNumber: json["tK_EMPLOYEE_NUMBER"],
tKEmployeeName: json["tK_EMPLOYEE_NAME"],
tKEmployeeDisplayName: json["tK_EMPLOYEE_DISPLAY_NAME"],
tKEmailAddress: json["tK_EMAIL_ADDRESS"],
nOOfRows: json["nO_OF_ROWS"],
froMRowNum: json["froM_ROW_NUM"],
tORowNum: json["tO_ROW_NUM"],
ledgeRId: json["ledgeR_ID"],
servicEMonths: json["servicE_MONTHS"],
employeeNameEn: json["EMPLOYEE_NAME_EN"],
employeENameAr: json["employeE_NAME_AR"],
jobNameEn: json["JOB_NAME_EN"],
joBNameAr: json["joB_NAME_AR"],
employeeDisplayNameEn: json["EMPLOYEE_DISPLAY_NAME_EN"],
employeEDisplayNameAr: json["employeE_DISPLAY_NAME_AR"],
mobileNumberWithZipCode: json["mobileNumberWithZipCode"],
);
Map<String, dynamic> toJson() => {
"businesS_GROUP_ID": businesSGroupId,
"persoN_ID": persoNId,
"persoN_TYPE_ID": persoNTypeId,
"assignmenT_ID": assignmenTId,
"assignmenT_START_DATE": assignmenTStartDate,
"assignmenT_END_DATE": assignmenTEndDate,
"primarY_FLAG": primarYFlag,
"currenT_EMPLOYEE_FLAG": currenTEmployeeFlag,
"assignmenT_STATUS_TYPE_ID": assignmenTStatusTypeId,
"normaL_HOURS": normaLHours,
"frequency": frequency,
"frequencY_MEANING": frequencYMeaning,
"employeE_NUMBER": employeENumber,
"nationaL_IDENTIFIER": nationaLIdentifier,
"systeM_PERSON_TYPE": systeMPersonType,
"persoN_TYPE": persoNType,
"manuaL_TIMECARD_FLAG": manuaLTimecardFlag,
"manuaL_TIMECARD_MEANING": manuaLTimecardMeaning,
"swipeS_EXEMPTED_FLAG": swipeSExemptedFlag,
"swipeS_EXEMPTED_MEANING": swipeSExemptedMeaning,
"assignmenT_NUMBER": assignmenTNumber,
"uniT_NUMBER": uniTNumber,
"useR_STATUS": useRStatus,
"employmenT_CATEGORY": employmenTCategory,
"assignmenT_TYPE": assignmenTType,
"employmenT_CATEGORY_MEANING": employmenTCategoryMeaning,
"peR_INFORMATION_CATEGORY": peRInformationCategory,
"nationalitY_CODE": nationalitYCode,
"nationalitY_MEANING": nationalitYMeaning,
"hirE_DATE": hirEDate,
"roW_NUM": roWNum,
"servicE_YEARS": servicEYears,
"servicE_DAYS": servicEDays,
"actuaL_TERMINATION_DATE": actuaLTerminationDate,
"employeE_EMAIL_ADDRESS": employeEEmailAddress,
"joB_ID": joBId,
"positioN_ID": positioNId,
"organizatioN_ID": organizatioNId,
"locatioN_ID": locatioNId,
"payrolL_ID": payrolLId,
"gradE_ID": gradEId,
"positioN_NAME": positioNName,
"organizatioN_NAME": organizatioNName,
"locatioN_NAME": locatioNName,
"payrolL_NAME": payrolLName,
"payrolL_CODE": payrolLCode,
"gradE_NAME": gradEName,
"employeE_MOBILE_NUMBER": employeEMobileNumber,
"employeE_WORK_NUMBER": employeEWorkNumber,
"employeeQR": employeeQr,
"businessCardPrivilege": businessCardPrivilege,
"businessCardQR": businessCardQr,
"supervisoR_ID": supervisoRId,
"supervisoR_ASSIGNMENT_ID": supervisoRAssignmentId,
"supervisoR_NUMBER": supervisoRNumber,
"supervisoR_NAME": supervisoRName,
"supervisoR_DISPLAY_NAME": supervisoRDisplayName,
"supervisoR_EMAIL_ADDRESS": supervisoREmailAddress,
"supervisoR_MOBILE_NUMBER": supervisoRMobileNumber,
"supervisoR_WORK_NUMBER": supervisoRWorkNumber,
"employeE_IMAGE": employeEImage,
"tK_PERSON_ID": tKPersonId,
"tK_EMPLOYEE_NUMBER": tKEmployeeNumber,
"tK_EMPLOYEE_NAME": tKEmployeeName,
"tK_EMPLOYEE_DISPLAY_NAME": tKEmployeeDisplayName,
"tK_EMAIL_ADDRESS": tKEmailAddress,
"nO_OF_ROWS": nOOfRows,
"froM_ROW_NUM": froMRowNum,
"tO_ROW_NUM": tORowNum,
"ledgeR_ID": ledgeRId,
"servicE_MONTHS": servicEMonths,
"EMPLOYEE_NAME_EN": employeeNameEn,
"employeE_NAME_AR": employeENameAr,
"JOB_NAME_EN": jobNameEn,
"joB_NAME_AR": joBNameAr,
"EMPLOYEE_DISPLAY_NAME_EN": employeeDisplayNameEn,
"employeE_DISPLAY_NAME_AR": employeEDisplayNameAr,
"mobileNumberWithZipCode": mobileNumberWithZipCode,
};
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['ACTUAL_TERMINATION_DATE'] = this.aCTUALTERMINATIONDATE;
data['ASSIGNMENT_END_DATE'] = this.aSSIGNMENTENDDATE;
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
data['ASSIGNMENT_NUMBER'] = this.aSSIGNMENTNUMBER;
data['ASSIGNMENT_START_DATE'] = this.aSSIGNMENTSTARTDATE;
data['ASSIGNMENT_STATUS_TYPE_ID'] = this.aSSIGNMENTSTATUSTYPEID;
data['ASSIGNMENT_TYPE'] = this.aSSIGNMENTTYPE;
data['BUSINESS_GROUP_ID'] = this.bUSINESSGROUPID;
data['BUSINESS_GROUP_NAME'] = this.bUSINESSGROUPNAME;
data['BusinessCardQR'] = this.businessCardQR;
data['CURRENT_EMPLOYEE_FLAG'] = this.cURRENTEMPLOYEEFLAG;
data['EMPLOYEE_DISPLAY_NAME'] = this.eMPLOYEEDISPLAYNAME;
data['EMPLOYEE_DISPLAY_NAME_Ar'] = this.eMPLOYEEDISPLAYNAMEAr;
data['EMPLOYEE_DISPLAY_NAME_En'] = this.eMPLOYEEDISPLAYNAMEEn;
data['EMPLOYEE_EMAIL_ADDRESS'] = this.eMPLOYEEEMAILADDRESS;
data['EMPLOYEE_IMAGE'] = this.eMPLOYEEIMAGE;
data['EMPLOYEE_MOBILE_NUMBER'] = this.eMPLOYEEMOBILENUMBER;
data['EMPLOYEE_NAME'] = this.eMPLOYEENAME;
data['EMPLOYEE_NAME_Ar'] = this.eMPLOYEENAMEAr;
data['EMPLOYEE_NAME_En'] = this.eMPLOYEENAMEEn;
data['EMPLOYEE_NUMBER'] = this.eMPLOYEENUMBER;
data['businessCardPrivilege'] = this.businessCardPrivilege;
data['EMPLOYEE_WORK_NUMBER'] = this.eMPLOYEEWORKNUMBER;
data['EMPLOYMENT_CATEGORY'] = this.eMPLOYMENTCATEGORY;
data['EMPLOYMENT_CATEGORY_MEANING'] = this.eMPLOYMENTCATEGORYMEANING;
data['EmployeeQR'] = this.employeeQR;
data['FREQUENCY'] = this.fREQUENCY;
data['FREQUENCY_MEANING'] = this.fREQUENCYMEANING;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['GRADE_ID'] = this.gRADEID;
data['GRADE_NAME'] = this.gRADENAME;
data['HIRE_DATE'] = this.hIREDATE;
data['JOB_ID'] = this.jOBID;
data['JOB_NAME'] = this.jOBNAME;
data['JOB_NAME_Ar'] = this.jOBNAMEAr;
data['JOB_NAME_En'] = this.jOBNAMEEn;
data['LEDGER_ID'] = this.lEDGERID;
data['LOCATION_ID'] = this.lOCATIONID;
data['LOCATION_NAME'] = this.lOCATIONNAME;
data['MANUAL_TIMECARD_FLAG'] = this.mANUALTIMECARDFLAG;
data['MANUAL_TIMECARD_MEANING'] = this.mANUALTIMECARDMEANING;
data['MobileNumberWithZipCode'] = this.mobileNumberWithZipCode;
data['NATIONALITY_CODE'] = this.nATIONALITYCODE;
data['NATIONALITY_MEANING'] = this.nATIONALITYMEANING;
data['NATIONAL_IDENTIFIER'] = this.nATIONALIDENTIFIER;
data['NORMAL_HOURS'] = this.nORMALHOURS;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['ORGANIZATION_ID'] = this.oRGANIZATIONID;
data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME;
data['PAYROLL_CODE'] = this.pAYROLLCODE;
data['PAYROLL_ID'] = this.pAYROLLID;
data['PAYROLL_NAME'] = this.pAYROLLNAME;
data['PERSON_ID'] = this.pERSONID;
data['PERSON_TYPE'] = this.pERSONTYPE;
data['PERSON_TYPE_ID'] = this.pERSONTYPEID;
data['PER_INFORMATION_CATEGORY'] = this.pERINFORMATIONCATEGORY;
data['POSITION_ID'] = this.pOSITIONID;
data['POSITION_NAME'] = this.pOSITIONNAME;
data['PRIMARY_FLAG'] = this.pRIMARYFLAG;
data['ROW_NUM'] = this.rOWNUM;
data['SERVICE_DAYS'] = this.sERVICEDAYS;
data['SERVICE_MONTHS'] = this.sERVICEMONTHS;
data['SERVICE_YEARS'] = this.sERVICEYEARS;
data['SUPERVISOR_ASSIGNMENT_ID'] = this.sUPERVISORASSIGNMENTID;
data['SUPERVISOR_DISPLAY_NAME'] = this.sUPERVISORDISPLAYNAME;
data['SUPERVISOR_EMAIL_ADDRESS'] = this.sUPERVISOREMAILADDRESS;
data['SUPERVISOR_ID'] = this.sUPERVISORID;
data['SUPERVISOR_MOBILE_NUMBER'] = this.sUPERVISORMOBILENUMBER;
data['SUPERVISOR_NAME'] = this.sUPERVISORNAME;
data['SUPERVISOR_NUMBER'] = this.sUPERVISORNUMBER;
data['SUPERVISOR_WORK_NUMBER'] = this.sUPERVISORWORKNUMBER;
data['SWIPES_EXEMPTED_FLAG'] = this.sWIPESEXEMPTEDFLAG;
data['SWIPES_EXEMPTED_MEANING'] = this.sWIPESEXEMPTEDMEANING;
data['SYSTEM_PERSON_TYPE'] = this.sYSTEMPERSONTYPE;
data['TK_EMAIL_ADDRESS'] = this.tKEMAILADDRESS;
data['TK_EMPLOYEE_DISPLAY_NAME'] = this.tKEMPLOYEEDISPLAYNAME;
data['TK_EMPLOYEE_NAME'] = this.tKEMPLOYEENAME;
data['TK_EMPLOYEE_NUMBER'] = this.tKEMPLOYEENUMBER;
data['TK_PERSON_ID'] = this.tKPERSONID;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['UNIT_NUMBER'] = this.uNITNUMBER;
data['USER_STATUS'] = this.uSERSTATUS;
return data;
}
String getPositionName() {
String positionName = "";
List<String> list = pOSITIONNAME?.split(".") ?? [];
List<String> list = positionName?.split(".") ?? [];
if (list.isNotEmpty) {
if (list.length > 1) {
positionName = list[0] + " " + list[1];
@ -358,13 +350,15 @@ class MemberInformationListModel {
static Future<List<MemberInformationListModel>> getFromPrefs() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
List encodedList = prefs.getStringList(SharedPrefsConsts.memberInformation) ?? [];
return encodedList.map((e) => MemberInformationListModel.fromJson(jsonDecode(e))).toList();
List<String> encodedList = prefs.getStringList(
SharedPrefsConsts.memberInformation) ?? [];
return encodedList.map((e) =>
MemberInformationListModel.fromJson(jsonDecode(e))).toList();
}
static void saveToPrefs(List<MemberInformationListModel> list) async {
static Future<void> saveToPrefs(List<MemberInformationListModel> list) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
List<String> encodedList = list.map((e) => jsonEncode(e.toJson())).toList();
await prefs.setStringList(SharedPrefsConsts.memberInformation, encodedList);
}
}
}

@ -1,49 +1,56 @@
import 'dart:convert';
class MemberLoginListModel {
String? pReturnStatus;
String? pReturnMsg;
String? pPassowrdExpired;
String? pPasswordExpiredMsg;
String? pMobileNumber;
String? pEmailAddress;
String? pLegislationCode;
String? logInTokenId;
MemberLoginListModel({
this.pReturnStatus,
this.pReturnMsg,
this.pPassowrdExpired,
this.pPasswordExpiredMsg,
this.pMobileNumber,
this.pEmailAddress,
this.pLegislationCode,
this.logInTokenId,
required this.pReturnStatus,
required this.pReturnMsg,
required this.pPassowrdExpired,
required this.pPasswordExpiredMsg,
required this.pMobileNumber,
required this.pEmailAddress,
required this.pLegislationCode,
required this.logInTokenId,
});
final String? pReturnStatus;
final String? pReturnMsg;
final String? pPassowrdExpired;
final String? pPasswordExpiredMsg;
final String? pMobileNumber;
final String? pEmailAddress;
final String? pLegislationCode;
final String? logInTokenId;
factory MemberLoginListModel.fromRawJson(String str) => MemberLoginListModel.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory MemberLoginListModel.fromJson(Map<String, dynamic> json) => MemberLoginListModel(
pReturnStatus: json["P_RETURN_STATUS"],
pReturnMsg: json["P_RETURN_MSG"],
pPassowrdExpired: json["P_PASSOWRD_EXPIRED"],
pPasswordExpiredMsg: json["P_PASSWORD_EXPIRED_MSG"],
pMobileNumber: json["P_MOBILE_NUMBER"],
pEmailAddress: json["P_EMAIL_ADDRESS"],
pLegislationCode: json["P_LEGISLATION_CODE"],
logInTokenId: json["LogInTokenID"],
);
factory MemberLoginListModel.fromJson(Map<String, dynamic> json){
return MemberLoginListModel(
pReturnStatus: json["p_RETURN_STATUS"],
pReturnMsg: json["p_RETURN_MSG"],
pPassowrdExpired: json["p_PASSOWRD_EXPIRED"],
pPasswordExpiredMsg: json["p_PASSWORD_EXPIRED_MSG"],
pMobileNumber: json["p_MOBILE_NUMBER"],
pEmailAddress: json["p_EMAIL_ADDRESS"],
pLegislationCode: json["p_LEGISLATION_CODE"],
logInTokenId: json["logInTokenID"],
);
}
Map<String, dynamic> toJson() => {
"P_RETURN_STATUS": pReturnStatus,
"P_RETURN_MSG": pReturnMsg,
"P_PASSOWRD_EXPIRED": pPassowrdExpired,
"P_PASSWORD_EXPIRED_MSG": pPasswordExpiredMsg,
"P_MOBILE_NUMBER": pMobileNumber,
"P_EMAIL_ADDRESS": pEmailAddress,
"P_LEGISLATION_CODE": pLegislationCode,
"LogInTokenID": logInTokenId,
"p_RETURN_STATUS": pReturnStatus,
"p_RETURN_MSG": pReturnMsg,
"p_PASSOWRD_EXPIRED": pPassowrdExpired,
"p_PASSWORD_EXPIRED_MSG": pPasswordExpiredMsg,
"p_MOBILE_NUMBER": pMobileNumber,
"p_EMAIL_ADDRESS": pEmailAddress,
"p_LEGISLATION_CODE": pLegislationCode,
"logInTokenID": logInTokenId,
};
}

@ -15,7 +15,7 @@ class PostParamsModel {
String? payrollCodeStr;
int? pSessionId;
String? userName;
String? language;
PostParamsModel({
this.versionID,
this.channel,
@ -31,6 +31,7 @@ class PostParamsModel {
this.pSelectedEmployeeNumber,
this.payrollCodeStr,
this.pLegislationCode,
this.language
});
PostParamsModel.fromJson(Map<String, dynamic> json) {
@ -46,33 +47,34 @@ class PostParamsModel {
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['versionID'] = this.versionID;
data['channel'] = this.channel;
data['languageID'] = this.languageID;
data['MobileType'] = this.mobileType;
data['LogInTokenID'] = this.logInTokenID;
data['PayrollCodeStr'] = this.payrollCodeStr;
data['LegislationCodeStr'] = this.pLegislationCode;
data['TokenID'] = this.tokenID;
data['logInTokenID'] = this.logInTokenID ??"";
data['payrollCodeStr'] = this.payrollCodeStr ?? "CS";
data['legislationCodeStr'] = this.pLegislationCode ?? "CS";
data['tokenID'] = this.tokenID ?? "";
return data;
}
Map<String, dynamic> toJsonAfterLogin() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['MobileType'] = this.mobileType;
data['LogInTokenID'] = this.logInTokenID;
data['TokenID'] = this.tokenID;
data['MobileNumber'] = this.mobileNumber;
data['UserName'] = this.userName;
data['P_EMAIL_ADDRESS'] = this.pEmailAddress;
data['P_SESSION_ID'] = this.pSessionId;
data['PayrollCodeStr'] = this.payrollCodeStr;
data['LegislationCodeStr'] = this.pLegislationCode;
data['P_SELECTED_EMPLOYEE_NUMBER'] = this.pSelectedEmployeeNumber;
data['P_USER_NAME'] = this.pUserName;
data['versionID'] = this.versionID;
data['channel'] = this.channel;
data['languageID'] = this.languageID;
data['mobileType'] = this.mobileType;
data['logInTokenID'] = this.logInTokenID;
data['tokenID'] = this.tokenID;
data['mobileNumber'] = this.mobileNumber;
data['userName'] = this.userName;
data['p_EMAIL_ADDRESS'] = this.pEmailAddress;
data['p_SESSION_ID'] = this.pSessionId;
data['payrollCodeStr'] = this.payrollCodeStr;
data['legislationCodeStr'] = this.pLegislationCode;
data['p_SELECTED_EMPLOYEE_NUMBER'] = this.pSelectedEmployeeNumber;
data['p_USER_NAME'] = this.pUserName;
data['p_LANGUAGE'] = this.language;
return data;
}

@ -11,6 +11,7 @@ import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/dashboard/drawer_menu_item_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_open_missing_swipe.dart';
import 'package:mohem_flutter_app/models/dashboard/get_open_notifications_list.dart';
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
import 'package:mohem_flutter_app/models/dashboard/list_menu.dart';
@ -143,7 +144,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
workListCounter = genericResponseModel?.pOPENNTFNUMBER ?? 0;
itgFormsModel = await DashboardApiClient().getItgFormsPendingTask();
//itgFormsModel = await DashboardApiClient().getItgFormsPendingTask();
workListCounter = workListCounter + (itgFormsModel?.totalCount ?? 0);
GenericResponseModel? cocGenericResponseModel = await DashboardApiClient().getCOCNotifications();
cocCount = cocGenericResponseModel?.mohemmITGPendingTaskResponseItem;
@ -176,9 +177,9 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
//Missing Siwpe API's & Methods
Future fetchMissingSwipe(context) async {
try {
GenericResponseModel? genericResponseModel = await DashboardApiClient().getOpenMissingSwipes();
GetOpenMissingSwipes? genericResponseModel = await DashboardApiClient().getOpenMissingSwipes();
isMissingSwipeLoading = false;
missingSwipeCounter = genericResponseModel!.getOpenMissingSwipesList!.pOpenMissingSwipes ?? 0;
missingSwipeCounter = genericResponseModel!.pOpenMissingSwipes ?? 0;
notifyListeners();
} catch (ex) {
isMissingSwipeLoading = false;
@ -211,11 +212,11 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
void fetchListMenu() async {
try {
List<ListMenu> menuList = await DashboardApiClient().getListMenu();
List findMyRequest = menuList.where((element) => element.menuType == "E").toList();
List findMyRequest = menuList.where((element) => element.menUType == "E").toList();
if (findMyRequest.isNotEmpty) {
drawerMenuItemList.insert(3, DrawerMenuItem("assets/images/drawer/my_requests.svg", LocaleKeys.myRequest.tr(), AppRoutes.myRequests));
}
List findMyTeam = menuList.where((element) => element.menuType == "M").toList();
List findMyTeam = menuList.where((element) => element.menUType == "M").toList();
if (findMyTeam.isNotEmpty) {
AppState().setempStatusIsManager = true;
drawerMenuItemList.insert(2, DrawerMenuItem("assets/images/drawer/my_team.svg", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam));
@ -229,9 +230,9 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
//Menu Entries API's & Methods
void fetchMenuEntries() async {
try {
GenericResponseModel? genericResponseModel = await DashboardApiClient().getGetMenuEntries();
getMenuEntriesList = genericResponseModel!.getMenuEntriesList;
homeMenus = parseMenus(getMenuEntriesList ?? []);
List<GetMenuEntriesList>? getMenuEntriesList = await DashboardApiClient().getGetMenuEntries();
getMenuEntriesList = getMenuEntriesList; //genericResponseModel!.getMenuEntriesList;
homeMenus = parseMenus(getMenuEntriesList!);
if (homeMenus!.isNotEmpty) {
homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr()));
homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requestType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr()));

@ -41,7 +41,7 @@ class BusinessCardDialog extends StatelessWidget {
),
),
Image.memory(
Utils.getPostBytes(AppState().memberInformationList!.businessCardQR ?? ""),
Utils.getPostBytes(AppState().memberInformationList!.businessCardQr ?? ""),
width: 129,
height: 129,
),
@ -51,7 +51,7 @@ class BusinessCardDialog extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
(AppState().memberInformationList!.eMPLOYEENAME ?? "").toText23(isBold: true).paddingOnly(top: 15),
(AppState().memberInformationList!.employeeNameEn ?? "").toText23(isBold: true).paddingOnly(top: 15),
(AppState().memberInformationList!.getPositionName() ?? "").toText17(
color: MyColors.grey57Color,
),
@ -61,7 +61,7 @@ class BusinessCardDialog extends StatelessWidget {
children: [
const Icon(Icons.email, size: 17.5, color: MyColors.grey3AColor).paddingOnly(right: 11.5),
("${LocaleKeys.email.tr()}: ").toText18(color: MyColors.grey57Color),
(AppState().memberInformationList!.eMPLOYEEEMAILADDRESS ?? "").toText18(),
(AppState().memberInformationList!.employeEEmailAddress ?? "").toText18(),
],
),
Row(

@ -36,20 +36,20 @@ class EmployeeDigitialIdDialog extends StatelessWidget {
boxShadow: [BoxShadow(color: Colors.white60, blurRadius: 10, spreadRadius: 10)],
),
clipBehavior: Clip.antiAlias,
child: (AppState().memberInformationList!.eMPLOYEEIMAGE == null || AppState().memberInformationList!.eMPLOYEEIMAGE!.isEmpty)
child: (AppState().memberInformationList!.employeEImage == null || AppState().memberInformationList!.employeEImage!.isEmpty)
? Container(
color: Colors.grey[300],
child: SvgPicture.asset("assets/images/user.svg"),
)
: Image.memory(
Utils.dataFromBase64String(
AppState().memberInformationList!.eMPLOYEEIMAGE ?? "",
AppState().memberInformationList!.employeEImage ?? "",
),
fit: BoxFit.cover,
),
),
16.width,
(AppState().memberInformationList!.eMPLOYEENUMBER ?? "").toText20(),
(AppState().memberInformationList!.employeENumber ?? "").toText20(),
],
),
Container(
@ -59,14 +59,14 @@ class EmployeeDigitialIdDialog extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
12.height,
(AppState().memberInformationList!.eMPLOYEEDISPLAYNAME ?? "").toText16(),
(AppState().memberInformationList!.employeeDisplayNameEn ?? "").toText16(),
4.height,
(showJobName(AppState().memberInformationList!.pOSITIONNAME ?? "")).toText12(isBold: false),
(showJobName(AppState().memberInformationList!.positioNName ?? "")).toText12(isBold: false),
],
),
),
Image.memory(
Utils.getPostBytes(AppState().memberInformationList!.employeeQR ?? ""),
Utils.getPostBytes(AppState().memberInformationList!.employeeQr ?? ""),
width: 160,
height: 160,
),

@ -245,7 +245,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
children: [
Image.memory(
Utils.dataFromBase64String(
AppState().memberInformationList!.eMPLOYEEIMAGE ?? "",
AppState().memberInformationList!.employeEImage ?? "",
),
errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) {
return SvgPicture.asset(
@ -297,7 +297,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
LocaleKeys.welcomeBack.tr().toText14(color: MyColors.grey77Color),
(AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(isBold: true),
(AppState().memberInformationList!.employeeNameEn ?? "").toText24(isBold: true),
16.height,
Row(
children: [

@ -38,7 +38,7 @@ class _ChangeItgAdPasswordScreenState extends State<ChangeItgAdPasswordScreen> {
void setNewPassword() async {
Utils.showLoading(context);
try {
GenericResponseModel response = await LoginApiClient().changePasswordFromActiveDirectorySession(password.text, AppState().memberInformationList!.eMPLOYEEEMAILADDRESS!);
GenericResponseModel response = await LoginApiClient().changePasswordFromActiveDirectorySession(password.text, AppState().memberInformationList!.employeEEmailAddress!);
Utils.hideLoading(context);
if ((response.messageStatus ?? 0) == 1) {
Utils.showToast(LocaleKeys.passwordChangedSuccessfully.tr());

@ -56,7 +56,7 @@ class _AppDrawerState extends State<AppDrawer> {
).paddingOnly(left: 4, right: 14),
Row(
children: [
AppState().memberInformationList!.eMPLOYEEIMAGE == null
AppState().memberInformationList!.employeEImage == null
? SvgPicture.asset(
"assets/images/user.svg",
height: 52,
@ -64,14 +64,14 @@ class _AppDrawerState extends State<AppDrawer> {
)
: CircleAvatar(
radius: 52 / 2,
backgroundImage: MemoryImage(Utils.dataFromBase64String(AppState().memberInformationList!.eMPLOYEEIMAGE!)),
backgroundImage: MemoryImage(Utils.dataFromBase64String(AppState().memberInformationList!.employeEImage!)),
backgroundColor: Colors.black,
),
12.width,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppState().memberInformationList!.eMPLOYEENAME!.toText18(isBold: true),
AppState().memberInformationList!.employeeNameEn!.toText18(isBold: true),
AppState().memberInformationList!.getPositionName().toText14(weight: FontWeight.w500),
],
).expanded
@ -165,6 +165,7 @@ class _AppDrawerState extends State<AppDrawer> {
void postLanguageChange(BuildContext context) {
var obj = AppState().postParamsObject;
obj?.languageID = EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2;
obj?.language = EasyLocalization.of(context)?.locale.languageCode == "ar" ? "ar" : "us";
AppState().setPostParamsModel(obj!);
Navigator.pop(context);
widget.onLanguageChange();

@ -183,7 +183,7 @@ class _LoginScreenState extends State<LoginScreen> {
// print("firebaseToken:$firebaseToken");
this.username.text = username;
this.password.text = password;
_autoLogin = true;
// _autoLogin = true;
}
}

@ -20,6 +20,7 @@ import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
import 'package:mohem_flutter_app/models/check_activation_code_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/ui/dialogs/id/business_card_dialog.dart';
import 'package:mohem_flutter_app/ui/dialogs/id/employee_digital_id_dialog.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
@ -119,7 +120,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
LocaleKeys.lastLoginDetails.tr().toText16(),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!), false).toText12(),
DateUtil.formatDateToDate(DateTime.parse(mobileLoginInfoListModel!.editedOn!), false).toText12(),
],
),
Row(
@ -129,7 +130,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
LocaleKeys.verificationType.tr().toText10(color: MyColors.grey57Color),
getVerificationType(mobileLoginInfoListModel!.loginType!).toText12(),
Expanded(child: SizedBox()),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!)).toText12(),
DateUtil.formatDateToTimeLang(DateTime.parse(mobileLoginInfoListModel!.editedOn!), false).toText12(),
],
)
],
@ -375,18 +376,18 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
await LoginApiClient().insertMobileLoginInfoNEW(
AppState().memberLoginList?.pEmailAddress ?? "",
genericResponseModel?.pSessionId ?? 0,
genericResponseModel?.memberInformationList![0].eMPLOYEENAME ?? "",
genericResponseModel?.memberInformationList![0].employeeNameEn ?? "",
_flag,
AppState().memberLoginList?.pMobileNumber ?? "",
AppState().getUserName!,
AppState().getIsHuawei ? AppState().getHuaweiPushToken : mobileLoginInfoListModel!.deviceToken!,
Platform.isAndroid ? "android" : "ios");
AppState().setMemberInformationListModel = genericResponseModel!.memberInformationList?.first;
AppState().setPrivilegeListModel = genericResponseModel.privilegeList ?? [];
if (genericResponseModel.errorMessage != null) {
Utils.showToast(genericResponseModel.errorMessage ?? "");
// Navigator.pop(context);
}
AppState().setPrivilegeListModel = (genericResponseModel.privilegeList ?? []).cast<PrivilegeListModel>();
// if (genericResponseModel.errorMessage != null) {
// Utils.showToast(genericResponseModel.errorMessage ?? "");
// // Navigator.pop(context);
// }
Utils.hideLoading(context);
Navigator.pop(context);
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false);

@ -629,19 +629,19 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
await LoginApiClient().insertMobileLoginInfoNEW(
AppState().memberLoginList?.pEmailAddress ?? "",
genericResponseModel?.pSessionId ?? 0,
genericResponseModel?.memberInformationList![0].eMPLOYEENAME ?? "",
genericResponseModel?.memberInformationList![0].employeeNameEn ?? "",
_flag,
AppState().memberLoginList?.pMobileNumber ?? "",
AppState().getUserName!,
AppState().getIsHuawei ? AppState().getHuaweiPushToken : firebaseToken!,
Platform.isAndroid ? "android" : "ios");
if (genericResponseModel?.errorMessage != null) {
Utils.showToast(genericResponseModel?.errorMessage ?? "");
} else {
AppState().setPrivilegeListModel = genericResponseModel!.privilegeList ?? [];
// if (genericResponseModel?.errorMessage != null) {
// Utils.showToast(genericResponseModel?.errorMessage ?? "");
// } else {
AppState().setPrivilegeListModel = (genericResponseModel!.privilegeList ?? []).cast<PrivilegeListModel>();
AppState().setMemberInformationListModel = genericResponseModel.memberInformationList?.first;
MemberInformationListModel.saveToPrefs(genericResponseModel.memberInformationList ?? []);
PrivilegeListModel.saveToPrefs(genericResponseModel.privilegeList ?? []);
PrivilegeListModel.saveToPrefs(genericResponseModel.privilegeList!.cast<PrivilegeListModel>());
AppState().setMohemmWifiSSID = genericResponseModel.mohemmWifiSsid;
AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword;
AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword;
@ -649,7 +649,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
Utils.saveStringFromPrefs(SharedPrefsConsts.password, AppState().password!);
Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiSSID, genericResponseModel.mohemmWifiSsid!);
Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiPassword, genericResponseModel.mohemmWifiPassword!);
}
// }
Utils.hideLoading(context);
Navigator.pop(context);
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false);

@ -330,7 +330,7 @@ class MarathonProvider extends ChangeNotifier {
selectedWinners = await MarathonApiClient().getSelectedWinner(marathonId: marathonDetailModel.id!);
if (selectedWinners != null) {
selectedWinners!.removeWhere((WinnerModel element) {
if (element.employeeId == AppState().memberInformationList!.eMPLOYEENUMBER) {
if (element.employeeId == AppState().memberInformationList!.employeENumber) {
iAmWinner = true;
return true;
} else {

@ -81,14 +81,14 @@ class MarathonScreen extends StatelessWidget {
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: provider.demoMarathonDetailModel.selectedLanguage!,
arabicContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr ?? "",
englishContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn ?? "",
arabicContent: AppState().memberInformationList!.employeENameAr ?? "",
englishContent: AppState().memberInformationList!.employeeDisplayNameEn ?? "",
).toText22(
color: MyColors.grey3AColor,
isCentered: true,
),
8.height,
AppState().memberInformationList!.eMPLOYEENUMBER!.toText22(color: MyColors.grey57Color),
AppState().memberInformationList!.employeENumber!.toText22(color: MyColors.grey57Color),
],
),
60.height,
@ -173,14 +173,14 @@ class MarathonScreen extends StatelessWidget {
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: provider.marathonDetailModel.selectedLanguage ?? 0,
arabicContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr ?? "",
englishContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn ?? "",
arabicContent: AppState().memberInformationList!.employeEDisplayNameAr ?? "",
englishContent: AppState().memberInformationList!.employeeDisplayNameEn ?? "",
).toText24(
color: MyColors.grey3AColor,
isCentered: true,
),
8.height,
AppState().memberInformationList!.eMPLOYEENUMBER!.toText22(color: MyColors.grey57Color),
AppState().memberInformationList!.employeENumber!.toText22(color: MyColors.grey57Color),
],
)
: const SizedBox(),
@ -276,10 +276,10 @@ class MarathonScreen extends StatelessWidget {
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: (!AppState().getIsDemoMarathon ? provider.marathonDetailModel.selectedLanguage : provider.demoMarathonDetailModel.selectedLanguage) ?? 0,
arabicContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr ?? "",
englishContent: AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn ?? "",
arabicContent: AppState().memberInformationList!.employeEDisplayNameAr ?? "",
englishContent: AppState().memberInformationList!.employeeDisplayNameEn ?? "",
).toText17(isBold: true, color: MyColors.white),
AppState().memberInformationList!.eMPLOYEENUMBER!.toText17(isBold: true, color: MyColors.white),
AppState().memberInformationList!.employeENumber!.toText17(isBold: true, color: MyColors.white),
],
),
).paddingOnly(left: 20, right: 20, top: 12, bottom: 10);

@ -29,19 +29,19 @@ class PersonalInfo extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
children: [
LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.eMPLOYMENTCATEGORYMEANING ?? "").toText16(),
(memberInformationList.employmenTCategoryMeaning ?? "").toText16(),
12.height,
LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.lOCATIONNAME ?? "").toText16(),
(memberInformationList.locatioNName ?? "").toText16(),
12.height,
LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.eMPLOYEEMOBILENUMBER ?? "").toText16(),
(memberInformationList.employeEMobileNumber ?? "").toText16(),
12.height,
LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.bUSINESSGROUPNAME ?? "").toText16(),
(memberInformationList.jobNameEn ?? "").toText16(),
12.height,
LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor),
(memberInformationList.pAYROLLNAME ?? "").toText16(),
(memberInformationList.payrolLName ?? "").toText16(),
],
).objectContainerView(center: false).paddingAll(21),
],

@ -46,14 +46,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
backgroundColor: const Color(0xffefefef),
body: Stack(
children: [
memberInformationList!.eMPLOYEEIMAGE != null
memberInformationList!.employeEImage != null
? Container(
height: 300,
margin: const EdgeInsets.only(top: 50),
decoration: BoxDecoration(
image: DecorationImage(
image: MemoryImage(
Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!),
Utils.dataFromBase64String(memberInformationList.employeEImage!),
),
fit: BoxFit.cover),
),
@ -157,7 +157,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
Utils.hideLoading(context);
if (empImageUpdteResp['P_RETURN_STATUS'] == 'S') {
setState(() {
memberInformationList.eMPLOYEEIMAGE = image;
memberInformationList.employeEImage = image;
});
}
}

@ -29,17 +29,17 @@ class ProfileInFo extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
16.height,
memberInfo.eMPLOYEENAME!.toText22(),
("${memberInfo.eMPLOYEENUMBER!} | ${memberInfo.getPositionName()}").toText13(color: MyColors.grey80Color),
memberInfo.eMPLOYEEEMAILADDRESS!.toText13(),
memberInfo.employeeDisplayNameEn!.toText22(),
("${memberInfo.employeENumber!} | ${memberInfo.getPositionName()}").toText13(color: MyColors.grey80Color),
memberInfo.employeEEmailAddress!.toText13(),
12.height,
const Divider(height: 8, thickness: 8, color: MyColors.lightGreyEFColor),
12.height,
LocaleKeys.completingYear.tr().toText11(),
Row(children: [
appreciationTime(LocaleKeys.year.tr(), memberInfo.sERVICEYEARS.toString()),
appreciationTime(LocaleKeys.month.tr(), memberInfo.sERVICEMONTHS.toString()),
appreciationTime(LocaleKeys.day.tr(), memberInfo.sERVICEDAYS.toString()),
appreciationTime(LocaleKeys.year.tr(), memberInfo.servicEYears.toString()),
appreciationTime(LocaleKeys.month.tr(), memberInfo.servicEMonths.toString()),
appreciationTime(LocaleKeys.day.tr(), memberInfo.servicEDays.toString()),
]).paddingOnly(bottom: 12, top: 12),
const Divider(height: 8, thickness: 8, color: MyColors.lightGreyEFColor),
// Column(

@ -42,7 +42,7 @@ class ProfilePanel extends StatelessWidget {
);
}
Widget profileImage() => memberInformationList.eMPLOYEEIMAGE == null
Widget profileImage() => memberInformationList.employeEImage == null
? SvgPicture.asset(
"assets/images/user.svg",
height: 68,
@ -50,7 +50,7 @@ class ProfilePanel extends StatelessWidget {
)
: ClipOval(
child: Image.memory(
Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!),
Utils.dataFromBase64String(memberInformationList.employeEImage!),
width: 68,
height: 68,
fit: BoxFit.fill,

@ -175,8 +175,8 @@ class _MyPostedAdsFragmentState extends State<MyPostedAdsFragment> {
void updateItemForSale(EmployeePostedAds employeePostedAds) async {
Utils.showLoading(context);
String? empNum = AppState().memberInformationList?.eMPLOYEENUMBER;
String? empMobNum = AppState().memberInformationList?.eMPLOYEEMOBILENUMBER;
String? empNum = AppState().memberInformationList?.employeENumber;
String? empMobNum = AppState().memberInformationList?.employeEMobileNumber;
String? loginTokenID = AppState().postParamsObject?.logInTokenID;
String? tokenID = AppState().postParamsObject?.tokenID;

@ -71,7 +71,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
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");
@ -419,10 +419,10 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
performAction("Answer");
break;
case "ReportGenerated":
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "");
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.employeENumber ?? "");
break;
case "DataCorrected":
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? "");
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.employeENumber ?? "");
break;
}
setState(() {
@ -498,13 +498,13 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
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 if (actionMode == "Generate") {
performGenerateQrAction(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? "", note);
performGenerateQrAction(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);
}
},
),
@ -515,7 +515,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
try {
Utils.showLoading(context);
ITGRequest? itgRequest =
await WorkListApiClient().requestActionITGRequest(requestType, taskId, itemId, employeeNumber, "", comments, AppState().memberInformationList?.eMPLOYEEEMAILADDRESS ?? "");
await WorkListApiClient().requestActionITGRequest(requestType, taskId, itemId, employeeNumber, "", comments, AppState().memberInformationList?.employeEEmailAddress ?? "");
Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
// Navigator.pop(context, "delegate_reload");
@ -647,7 +647,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
isAttachmentLoaded = false;
itgFormAttachmentsList.clear();
List<ITGFormsAttachmentsModel> _itgFormAttachmentsList =
(await WorkListApiClient().getITGFormAttachments(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.eMPLOYEENUMBER ?? ""))!;
(await WorkListApiClient().getITGFormAttachments(requestDetails!.requestType!, requestDetails!.iD, requestDetails!.itemID, AppState().memberInformationList?.employeENumber ?? ""))!;
if (!isAttachmentLoaded) {
itgFormAttachmentsList = _itgFormAttachmentsList;
}

@ -111,7 +111,7 @@ class ApprovalLevelfragment extends StatelessWidget {
}).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() {
if (history.employeeID == AppState().memberInformationList?.eMPLOYEENUMBER) {
if (history.employeeID == AppState().memberInformationList?.employeENumber) {
showMyBottomSheet(context,
callBackFunc: voidCallback,
child: DelegateSheet(

@ -176,9 +176,9 @@ class SelectedItemSheet extends StatelessWidget {
if (replacementList != null) empID = replacementList!.userName;
try {
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!);
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;
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;
(context as Element).markNeedsBuild();
} catch (ex) {
Utils.handleException(ex, context, null);
@ -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);

@ -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");

@ -124,7 +124,7 @@ class ActionsFragment extends StatelessWidget {
}).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() {
if (actionHistory.uSERNAME == AppState().memberInformationList?.eMPLOYEENUMBER) {
if (actionHistory.uSERNAME == AppState().memberInformationList?.employeENumber) {
showMyBottomSheet(context,
callBackFunc: voidCallback,
child: DelegateSheet(

@ -52,21 +52,21 @@ class _DetailFragmentState extends State<DetailFragment> {
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeNumber.tr(), widget.memberInformationListModel!.eMPLOYEENUMBER ?? ""),
ItemDetailViewCol(LocaleKeys.employeeNumber.tr(), widget.memberInformationListModel!.employeENumber ?? ""),
ItemDetailViewCol(
LocaleKeys.employeeName.tr(), (AppState().isArabic(context) ? widget.memberInformationListModel!.eMPLOYEENAMEAr : widget.memberInformationListModel!.eMPLOYEENAMEEn) ?? ""),
LocaleKeys.employeeName.tr(), (AppState().isArabic(context) ? widget.memberInformationListModel!.employeENameAr : widget.memberInformationListModel!.employeeNameEn) ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.jobTitle.tr(), makePositionName(widget.memberInformationListModel!.pOSITIONNAME ?? "")),
ItemDetailViewCol(LocaleKeys.grade.tr(), widget.memberInformationListModel!.gRADENAME ?? ""),
ItemDetailViewCol(LocaleKeys.jobTitle.tr(), makePositionName(widget.memberInformationListModel!.positioNName ?? "")),
ItemDetailViewCol(LocaleKeys.grade.tr(), widget.memberInformationListModel!.gradEName ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.jobCategory.tr(), makePositionName(widget.memberInformationListModel!.pOSITIONNAME ?? "")),
ItemDetailViewCol(LocaleKeys.category.tr(), widget.memberInformationListModel!.eMPLOYMENTCATEGORYMEANING ?? ""),
ItemDetailViewCol(LocaleKeys.jobCategory.tr(), makePositionName(widget.memberInformationListModel!.positioNName ?? "")),
ItemDetailViewCol(LocaleKeys.category.tr(), widget.memberInformationListModel!.employmenTCategoryMeaning ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeEmailAddress.tr(), widget.memberInformationListModel!.eMPLOYEEEMAILADDRESS ?? ""),
ItemDetailViewCol(LocaleKeys.payrollBranch.tr(), widget.memberInformationListModel!.pAYROLLNAME ?? ""),
ItemDetailViewCol(LocaleKeys.employeeEmailAddress.tr(), widget.memberInformationListModel!.employeEEmailAddress ?? ""),
ItemDetailViewCol(LocaleKeys.payrollBranch.tr(), widget.memberInformationListModel!.payrolLName ?? ""),
isItLast: true,
),
],

Loading…
Cancel
Save