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()); String toRawJson() => json.encode(toJson());
factory ApiResponse.fromJson(Map<String, dynamic> json) => ApiResponse( factory ApiResponse.fromJson(Map<String, dynamic> json) => ApiResponse(
totalItemsCount: json["TotalItemsCount"], totalItemsCount: json["TotalItemsCount"] ?? json["totalItemsCount"] ,
data: json["Data"], data: json["Data"] ?? json["data"],
messageStatus: json["MessageStatus"], messageStatus: json["MessageStatus"] ?? json["messageStatus"],
errorMessage: json["ErrorMessage"], errorMessage: json["ErrorMessage"] ?? json["errorMessage"],
errorEndUserMessage: json["ErrorEndUserMessage"], errorEndUserMessage: json["ErrorEndUserMessage"] ?? json["errorEndUserMessage"],
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
@ -471,7 +471,7 @@ class ApiClient {
if (!kReleaseMode) { if (!kReleaseMode) {
print("Url:$url"); print("Url:$url");
var bodyJson = json.encode(jsonObject); 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); 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) { if (apiResponse.isSuccess) {
return factoryConstructor(jsonData); return factoryConstructor(jsonData);
} else { } else {
throw APIException( if(apiResponse.messageStatus == null || apiResponse.messageStatus != 1) {
APIException.BAD_REQUEST,
error: APIError( logger.i(apiResponse.errorMessage);
null, throw APIException(
apiResponse.errorEndUserMessage ?? apiResponse.errorMessage, APIException.OTHER,
null, error: APIError(
response.statusCode, 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; url = url + '?' + queryString;
} }
var response = await _post( var response = await _post(
Uri.parse(url), Uri.parse(url),
body: requestBody, body: requestBody,
@ -795,4 +810,9 @@ class ApiClient {
body: body, body: body,
encoding: encoding, 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/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_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_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/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/eit/get_eit_transaction_model.dart';
import 'package:mohem_flutter_app/models/generic_mapper_model.dart'; import 'package:mohem_flutter_app/models/generic_mapper_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart'; import 'package:mohem_flutter_app/models/generic_response_model.dart';
@ -25,7 +27,7 @@ class ApiClassMapper {
return MemberLoginListModel.fromRawJson(jsonEncode(jsonData)); return MemberLoginListModel.fromRawJson(jsonEncode(jsonData));
case 'Mohemm_SendActivationCodebyOTPNotificationType': case 'Mohemm_SendActivationCodebyOTPNotificationType':
BasicMemberInformationModel response = BasicMemberInformationModel.fromRawJson(jsonEncode(jsonData)); BasicMemberInformationModel response = BasicMemberInformationModel.fromRawJson(jsonEncode(jsonData));
AppState().postParamsObject?.setLogInTokenID = response.logInTokenId; // AppState().postParamsObject?.setLogInTokenID = response.logInTokenId;
return response; return response;
case 'CheckActivationCode': case 'CheckActivationCode':
CheckActivationCodeModel responseData = CheckActivationCodeModel.fromRawJson(jsonEncode(jsonData)); CheckActivationCodeModel responseData = CheckActivationCodeModel.fromRawJson(jsonEncode(jsonData));
@ -37,10 +39,10 @@ class ApiClassMapper {
AppState().postParamsObject?.pUserName = AppState().getUserName; AppState().postParamsObject?.pUserName = AppState().getUserName;
AppState().postParamsObject?.pSelectedEmployeeNumber = AppState().getUserName; AppState().postParamsObject?.pSelectedEmployeeNumber = AppState().getUserName;
AppState().postParamsObject?.setPLegislationCode = responseData.basicMemberInformation!.pLegislationCode; 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().setBusinessCardPrivilege = responseData.memberInformationList!.first.businessCardPrivilege ?? false;
// AppState().postParamsObject!.logInTokenID = responseData.authenticationTokenId; // AppState().postParamsObject!.logInTokenID = responseData.authenticationTokenId;
responseData.errorMessage = errorMessage; //responseData.errorMessage = errorMessage;
return responseData; return responseData;
case 'RefreshToken': case 'RefreshToken':
return; return;
@ -53,13 +55,13 @@ class ApiClassMapper {
return false; return false;
} }
case 'Mohemm_GetMobileLoginInfo_NEW': case 'Mohemm_GetMobileLoginInfo_NEW':
GetMobileLoginInfoListModel response = GetMobileLoginInfoListModel.fromJson(jsonData); GetMobileLoginInfoListModel response = GetMobileLoginInfoListModel.fromJson(jsonData.first);
return response; return response;
case 'ChangePassword_FromActiveSession': case 'ChangePassword_FromActiveSession':
return; return;
case 'Get_BasicUserInformation': case 'Get_BasicUserInformation':
BasicMemberInformationModel response = BasicMemberInformationModel.fromJson(jsonData);
return; return response;
case 'SendPublicActivationCode': case 'SendPublicActivationCode':
return; return;
case 'CheckPublicActivationCode': case 'CheckPublicActivationCode':
@ -68,6 +70,8 @@ class ApiClassMapper {
return; return;
case 'CheckMobileAppVersion': case 'CheckMobileAppVersion':
return CheckMobileAppVersionModel.fromRawJson(jsonData); return CheckMobileAppVersionModel.fromRawJson(jsonData);
case 'GET_MENU':
return CheckMobileAppVersionModel.fromRawJson(jsonData);
// COCWS endpoints // COCWS endpoints
case 'Mohemm_ITG_GetCategories': case 'Mohemm_ITG_GetCategories':
return; return;
@ -264,11 +268,11 @@ class ApiClassMapper {
case 'ErrorCount_Get': case 'ErrorCount_Get':
return; return;
case 'GET_Menu_Entries': case 'GET_Menu_Entries':
return; return GetMenuEntriesList.fromRawJson(jsonData);;
case 'GET_Open_Notifications': case 'GET_Open_Notifications':
return GenericResponseModel(); return GenericResponseModel.fromJson(jsonData);
case 'Get_Open_Missing_Swipes': case 'Get_Open_Missing_Swipes':
return; return GetOpenMissingSwipes.fromRawJson(jsonData);
case 'GET_CONTACT_COLS_STRUCTURE': case 'GET_CONTACT_COLS_STRUCTURE':
return; return;
case 'GET_EMPLOYEE_ADDRESS': case 'GET_EMPLOYEE_ADDRESS':
@ -386,7 +390,8 @@ class ApiClassMapper {
case 'INSERT_GL_JOURNALS_INTO_STG': case 'INSERT_GL_JOURNALS_INTO_STG':
return; return;
case 'GET_Attendance_Tracking': case 'GET_Attendance_Tracking':
return GetAttendanceTracking(); GetAttendanceTracking response = GetAttendanceTracking.fromJson(jsonData);
return response;
case 'GET_OPEN_NOTIFICATIONS': case 'GET_OPEN_NOTIFICATIONS':
return GenericResponseModel(); return GenericResponseModel();
case 'GET_ABSENCE_TRANSACTIONS': case 'GET_ABSENCE_TRANSACTIONS':

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

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

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

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

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

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

@ -167,7 +167,7 @@ class MyAttendanceApiClient {
Future<ResubmitEITRequestResponse> reSubmitEitTransaction(String itemKey, var notifID, List<Map<String, dynamic>> list) async { Future<ResubmitEITRequestResponse> reSubmitEitTransaction(String itemKey, var notifID, List<Map<String, dynamic>> list) async {
String url = "${ApiConsts.erpRest}RESUBMIT_EIT_TRANSACTION"; 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); postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) { return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json); GenericResponseModel responseData = GenericResponseModel.fromJson(json);

@ -17,7 +17,7 @@ class OffersAndDiscountsApiClient {
List<GetCategoriesList> getSaleCategoriesList = []; List<GetCategoriesList> getSaleCategoriesList = [];
String url = "${ApiConsts.cocRest}Mohemm_ITG_GetCategories"; 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); postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject( return await ApiClient().postJsonForObject(
@ -48,12 +48,12 @@ class OffersAndDiscountsApiClient {
List<OffersListModel> getSaleCategoriesList = []; List<OffersListModel> getSaleCategoriesList = [];
String url = "${ApiConsts.cocRest}GetOfferDiscountsConfigData"; 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); postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject( return await ApiClient().postJsonForObject(
(response) { (response) {
var body = json.decode(response['Mohemm_ITG_ResponseItem']); var body = json.decode(response['data']);
var bodyData = body['result']['data']; var bodyData = body['result']['data'];

@ -41,7 +41,7 @@ class PendingTransactionsApiClient {
Future<String> getAnnouncements(int itgAwarenessID, int itgPageNo, int itgRowID) async { Future<String> getAnnouncements(int itgAwarenessID, int itgPageNo, int itgRowID) async {
String url = "${ApiConsts.cocRest}GetAnnouncementDiscountsConfigData"; 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); postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) { return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json); GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
@ -51,7 +51,7 @@ class PendingTransactionsApiClient {
Future<GetAnnouncementDetails> getAnnouncementDetails(int itgAwarenessID, int itgPageNo, int itgRowID) async { Future<GetAnnouncementDetails> getAnnouncementDetails(int itgAwarenessID, int itgPageNo, int itgRowID) async {
String url = "${ApiConsts.cocRest}GetAnnouncementDiscountsConfigData"; 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); postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) { return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json); GenericResponseModel? responseData = GenericResponseModel.fromJson(json);

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

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

@ -1,8 +1,6 @@
import 'dart:convert'; 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/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
class CheckActivationCodeModel { class CheckActivationCodeModel {
String? authenticationTokenId; String? authenticationTokenId;
@ -15,20 +13,19 @@ class CheckActivationCodeModel {
String? companyImageDescription; String? companyImageDescription;
String? companyBadge; String? companyBadge;
String? companyMainCompany; String? companyMainCompany;
dynamic bcLogo; dynamic bCLogo;
dynamic bcDomain; dynamic bCDomain;
dynamic businessGroupName; dynamic businesSGroupName;
String? pReturnStatus; String? pReturnStatus;
String? pReturnMsg; String? pReturnMsg;
List<MemberInformationListModel>? memberInformationList; List<MemberInformationListModel>? memberInformationList;
BasicMemberInformationModel? basicMemberInformation; BasicMemberInformation? basicMemberInformation;
dynamic mohemmItgResponseItem; dynamic mohemmItgResponseItem;
int? pSessionId; int? pSessionId;
String? tokenId; String? tokenId;
String? refreshToken; String? refreshToken;
String? errorMessage;
DateTime? expiry; DateTime? expiry;
List<PrivilegeListModel>? privilegeList; List<PrivilegeList>? privilegeList;
CheckActivationCodeModel({ CheckActivationCodeModel({
this.authenticationTokenId, this.authenticationTokenId,
@ -41,9 +38,9 @@ class CheckActivationCodeModel {
this.companyImageDescription, this.companyImageDescription,
this.companyBadge, this.companyBadge,
this.companyMainCompany, this.companyMainCompany,
this.bcLogo, this.bCLogo,
this.bcDomain, this.bCDomain,
this.businessGroupName, this.businesSGroupName,
this.pReturnStatus, this.pReturnStatus,
this.pReturnMsg, this.pReturnMsg,
this.memberInformationList, this.memberInformationList,
@ -52,7 +49,6 @@ class CheckActivationCodeModel {
this.pSessionId, this.pSessionId,
this.tokenId, this.tokenId,
this.refreshToken, this.refreshToken,
this.errorMessage,
this.expiry, this.expiry,
this.privilegeList, this.privilegeList,
}); });
@ -62,56 +58,450 @@ class CheckActivationCodeModel {
String toRawJson() => json.encode(toJson()); String toRawJson() => json.encode(toJson());
factory CheckActivationCodeModel.fromJson(Map<String, dynamic> json) => CheckActivationCodeModel( factory CheckActivationCodeModel.fromJson(Map<String, dynamic> json) => CheckActivationCodeModel(
authenticationTokenId: json["AuthenticationTokenID"], authenticationTokenId: json["authenticationTokenID"],
pPassowrdExpired: json["P_PASSOWRD_EXPIRED"], pPassowrdExpired: json["p_PASSOWRD_EXPIRED"],
pPasswordExpiredMsg: json["P_PASSWORD_EXPIRED_MSG"], pPasswordExpiredMsg: json["p_PASSWORD_EXPIRED_MSG"],
pInvalidLoginMsg: json["P_INVALID_LOGIN_MSG"], pInvalidLoginMsg: json["p_INVALID_LOGIN_MSG"],
mohemmWifiSsid: json["Mohemm_Wifi_SSID"], mohemmWifiSsid: json["mohemm_Wifi_SSID"],
mohemmWifiPassword: json["Mohemm_Wifi_Password"], mohemmWifiPassword: json["mohemm_Wifi_Password"],
companyImageUrl: json["CompanyImageURL"], companyImageUrl: json["companyImageURL"],
companyImageDescription: json["CompanyImageDescription"], companyImageDescription: json["companyImageDescription"],
companyBadge: json["CompanyBadge"], companyBadge: json["companyBadge"],
companyMainCompany: json["CompanyMainCompany"], companyMainCompany: json["companyMainCompany"],
bcLogo: json["BC_Logo"], bCLogo: json["bC_Logo"],
bcDomain: json["BC_Domain"], bCDomain: json["bC_Domain"],
businessGroupName: json["BUSINESS_GROUP_NAME"], businesSGroupName: json["businesS_GROUP_NAME"],
pReturnStatus: json["P_RETURN_STATUS"], pReturnStatus: json["p_RETURN_STATUS"],
pReturnMsg: json["P_RETURN_MSG"], pReturnMsg: json["p_RETURN_MSG"],
memberInformationList: json["MemberInformationList"] == null ? [] : List<MemberInformationListModel>.from(json["MemberInformationList"]!.map((x) => MemberInformationListModel.fromJson(x))), memberInformationList: json["memberInformationList"] == null ? [] : List<MemberInformationListModel>.from(json["memberInformationList"]!.map((x) => MemberInformationListModel.fromJson(x))),
basicMemberInformation: json["BasicMemberInformation"] == null ? null : BasicMemberInformationModel.fromJson(json["BasicMemberInformation"]), basicMemberInformation: json["basicMemberInformation"] == null ? null : BasicMemberInformation.fromJson(json["basicMemberInformation"]),
mohemmItgResponseItem: json["Mohemm_ITG_ResponseItem"], mohemmItgResponseItem: json["mohemm_ITG_ResponseItem"],
pSessionId: json["P_SESSION_ID"], pSessionId: json["p_SESSION_ID"],
tokenId: json["TokenId"], tokenId: json["tokenId"],
refreshToken: json["RefreshToken"], refreshToken: json["refreshToken"],
errorMessage: json["ErrorMessage"], expiry: json["expiry"] == null ? null : DateTime.parse(json["expiry"]),
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))),
privilegeList: json["Privilege_List"] == null ? [] : List<PrivilegeListModel>.from(json["Privilege_List"]!.map((x) => PrivilegeListModel.fromJson(x))),
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"AuthenticationTokenID": authenticationTokenId, "authenticationTokenID": authenticationTokenId,
"P_PASSOWRD_EXPIRED": pPassowrdExpired, "p_PASSOWRD_EXPIRED": pPassowrdExpired,
"P_PASSWORD_EXPIRED_MSG": pPasswordExpiredMsg, "p_PASSWORD_EXPIRED_MSG": pPasswordExpiredMsg,
"P_INVALID_LOGIN_MSG": pInvalidLoginMsg, "p_INVALID_LOGIN_MSG": pInvalidLoginMsg,
"Mohemm_Wifi_SSID": mohemmWifiSsid, "mohemm_Wifi_SSID": mohemmWifiSsid,
"Mohemm_Wifi_Password": mohemmWifiPassword, "mohemm_Wifi_Password": mohemmWifiPassword,
"CompanyImageURL": companyImageUrl, "companyImageURL": companyImageUrl,
"CompanyImageDescription": companyImageDescription, "companyImageDescription": companyImageDescription,
"CompanyBadge": companyBadge, "companyBadge": companyBadge,
"CompanyMainCompany": companyMainCompany, "companyMainCompany": companyMainCompany,
"BC_Logo": bcLogo, "bC_Logo": bCLogo,
"BC_Domain": bcDomain, "bC_Domain": bCDomain,
"BUSINESS_GROUP_NAME": businessGroupName, "businesS_GROUP_NAME": businesSGroupName,
"P_RETURN_STATUS": pReturnStatus, "p_RETURN_STATUS": pReturnStatus,
"P_RETURN_MSG": pReturnMsg, "p_RETURN_MSG": pReturnMsg,
"MemberInformationList": memberInformationList == null ? [] : List<dynamic>.from(memberInformationList!.map((x) => x.toJson())), "memberInformationList": memberInformationList == null ? [] : List<dynamic>.from(memberInformationList!.map((x) => x.toJson())),
"BasicMemberInformation": basicMemberInformation?.toJson(), "basicMemberInformation": basicMemberInformation?.toJson(),
"Mohemm_ITG_ResponseItem": mohemmItgResponseItem, "mohemm_ITG_ResponseItem": mohemmItgResponseItem,
"P_SESSION_ID": pSessionId, "p_SESSION_ID": pSessionId,
"TokenId": tokenId, "tokenId": tokenId,
"RefreshToken": refreshToken, "refreshToken": refreshToken,
"ErrorMessage": errorMessage, "expiry": expiry?.toIso8601String(),
"Expiry": expiry?.toIso8601String(), "privilege_List": privilegeList == null ? [] : List<dynamic>.from(privilegeList!.map((x) => x.toJson())),
"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 { 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({ GetAttendanceTracking({
this.pBreakHours, this.pSwipesExemptedFlag,
this.pLateInHours,
this.pRemainingHours,
this.pReturnMsg,
this.pReturnStatus,
this.pScheduledHours,
this.pShtName, this.pShtName,
this.pScheduledHours,
this.pBreakHours,
this.pSpentHours, this.pSpentHours,
this.pSwipesExemptedFlag, this.pRemainingHours,
this.pLateInHours,
this.pSwipeIn, this.pSwipeIn,
this.pSwipeOut, this.pSwipeOut,
this.pReturnStatus,
this.pReturnMsg,
}); });
String? pBreakHours; factory GetAttendanceTracking.fromRawJson(String str) => GetAttendanceTracking.fromJson(json.decode(str));
String? pLateInHours;
String? pRemainingHours; String toRawJson() => json.encode(toJson());
String? pReturnMsg;
String? pReturnStatus;
String? pScheduledHours;
String? pShtName;
String? pSpentHours;
String? pSwipesExemptedFlag;
dynamic pSwipeIn;
dynamic pSwipeOut;
factory GetAttendanceTracking.fromMap(Map<String, dynamic> json) => GetAttendanceTracking( factory GetAttendanceTracking.fromJson(Map<String, dynamic> json) => GetAttendanceTracking(
pBreakHours: json["P_BREAK_HOURS"] == null ? null : json["P_BREAK_HOURS"], pSwipesExemptedFlag: json["p_SWIPES_EXEMPTED_FLAG"],
pLateInHours: json["P_LATE_IN_HOURS"] == null ? null : json["P_LATE_IN_HOURS"], pShtName: json["p_SHT_NAME"],
pRemainingHours: json["P_REMAINING_HOURS"] == null ? null : json["P_REMAINING_HOURS"], pScheduledHours: json["p_SCHEDULED_HOURS"],
pReturnMsg: json["P_RETURN_MSG"] == null ? null : json["P_RETURN_MSG"], pBreakHours: json["p_BREAK_HOURS"],
pReturnStatus: json["P_RETURN_STATUS"] == null ? null : json["P_RETURN_STATUS"], pSpentHours: json["p_SPENT_HOURS"],
pScheduledHours: json["P_SCHEDULED_HOURS"] == null ? null : json["P_SCHEDULED_HOURS"], pRemainingHours: json["p_REMAINING_HOURS"],
pShtName: json["P_SHT_NAME"] == null ? null : json["P_SHT_NAME"], pLateInHours: json["p_LATE_IN_HOURS"],
pSpentHours: json["P_SPENT_HOURS"] == null ? null : json["P_SPENT_HOURS"], pSwipeIn: json["p_SWIPE_IN"],
pSwipesExemptedFlag: json["P_SWIPES_EXEMPTED_FLAG"] == null ? null : json["P_SWIPES_EXEMPTED_FLAG"], pSwipeOut: json["p_SWIPE_OUT"],
pSwipeIn: json["P_SWIPE_IN"], pReturnStatus: json["p_RETURN_STATUS"],
pSwipeOut: json["P_SWIPE_OUT"], pReturnMsg: json["p_RETURN_MSG"],
); );
Map<String, dynamic> toMap() => { Map<String, dynamic> toJson() => {
"P_BREAK_HOURS": pBreakHours == null ? null : pBreakHours, "p_SWIPES_EXEMPTED_FLAG": pSwipesExemptedFlag,
"P_LATE_IN_HOURS": pLateInHours == null ? null : pLateInHours, "p_SHT_NAME": pShtName,
"P_REMAINING_HOURS": pRemainingHours == null ? null : pRemainingHours, "p_SCHEDULED_HOURS": pScheduledHours,
"P_RETURN_MSG": pReturnMsg == null ? null : pReturnMsg, "p_BREAK_HOURS": pBreakHours,
"P_RETURN_STATUS": pReturnStatus == null ? null : pReturnStatus, "p_SPENT_HOURS": pSpentHours,
"P_SCHEDULED_HOURS": pScheduledHours == null ? null : pScheduledHours, "p_REMAINING_HOURS": pRemainingHours,
"P_SHT_NAME": pShtName == null ? null : pShtName, "p_LATE_IN_HOURS": pLateInHours,
"P_SPENT_HOURS": pSpentHours == null ? null : pSpentHours, "p_SWIPE_IN": pSwipeIn,
"P_SWIPES_EXEMPTED_FLAG": pSwipesExemptedFlag == null ? null : pSwipesExemptedFlag, "p_SWIPE_OUT": pSwipeOut,
"P_SWIPE_IN": pSwipeIn, "p_RETURN_STATUS": pReturnStatus,
"P_SWIPE_OUT": pSwipeOut, "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; int? openNtfNumber;
factory GetOpenNotificationsList.fromMap(Map<String, dynamic> json) => GetOpenNotificationsList( factory GetOpenNotificationsList.fromMap(Map<String, dynamic> json) => GetOpenNotificationsList(
itemType: json["ITEM_TYPE"] == null ? null : json["ITEM_TYPE"], itemType: json["iteM_TYPE"] == null ? null : json["iteM_TYPE"],
itemTypeDisplayName: json["ITEM_TYPE_DISPLAY_NAME"] == null ? null : json["ITEM_TYPE_DISPLAY_NAME"], itemTypeDisplayName: json["iteM_TYPE_DISPLAY_NAME"] == null ? null : json["iteM_TYPE_DISPLAY_NAME"],
openNtfNumber: json["OPEN_NTF_NUMBER"] == null ? null : json["OPEN_NTF_NUMBER"], openNtfNumber: json["opeN_NTF_NUMBER"] == null ? null : json["opeN_NTF_NUMBER"],
); );
Map<String, dynamic> toMap() => { Map<String, dynamic> toMap() => {
"ITEM_TYPE": itemType == null ? null : itemType, "iteM_TYPE": itemType == null ? null : itemType,
"ITEM_TYPE_DISPLAY_NAME": itemTypeDisplayName == null ? null : itemTypeDisplayName, "iteM_TYPE_DISPLAY_NAME": itemTypeDisplayName == null ? null : itemTypeDisplayName,
"OPEN_NTF_NUMBER": openNtfNumber == null ? null : openNtfNumber, "opeN_NTF_NUMBER": openNtfNumber == null ? null : openNtfNumber,
}; };
} }

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

@ -1,3 +1,5 @@
import 'dart:convert';
class GetMenuEntriesList { class GetMenuEntriesList {
GetMenuEntriesList({ GetMenuEntriesList({
this.addButton, this.addButton,
@ -12,6 +14,7 @@ class GetMenuEntriesList {
this.prompt, this.prompt,
this.requestType, this.requestType,
this.updateButton, this.updateButton,
this.attachmenTRequired
}); });
String? addButton; String? addButton;
@ -26,35 +29,41 @@ class GetMenuEntriesList {
String? prompt; String? prompt;
String? requestType; String? requestType;
String? updateButton; 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( factory GetMenuEntriesList.fromJson(Map<String, dynamic> json) => GetMenuEntriesList(
addButton: json["ADD_BUTTON"] == null ? null : json["ADD_BUTTON"], addButton: json["adDButton"] == null ? null : json["adDButton"],
deleteButton: json["DELETE_BUTTON"] == null ? null : json["DELETE_BUTTON"], deleteButton: json["deletEButton"] == null ? null : json["deletEButton"],
entrySequence: json["ENTRY_SEQUENCE"] == null ? null : json["ENTRY_SEQUENCE"], entrySequence: json["entrYSequence"] == null ? null : json["entrYSequence"],
functionName: json["FUNCTION_NAME"] == null ? null : json["FUNCTION_NAME"], functionName: json["functioNName"] == null ? null : json["functioNName"],
icon: json["ICON"] == null ? null : json["ICON"], icon: json["icon"] == null ? null : json["icon"],
lvl: json["LVL"] == null ? null : json["LVL"], lvl: json["lvl"] == null ? null : json["lvl"],
menuEntryType: json["MENU_ENTRY_TYPE"] == null ? null : json["MENU_ENTRY_TYPE"], menuEntryType: json["menU_ENTRY_TYPE"] == null ? null : json["menU_ENTRY_TYPE"],
menuName: json["MENU_NAME"] == null ? null : json["MENU_NAME"], menuName: json["menUName"] == null ? null : json["menUName"],
parentMenuName: json["PARENT_MENU_NAME"] == null ? null : json["PARENT_MENU_NAME"], parentMenuName: json["parenTMenuName"] == null ? null : json["parenTMenuName"],
prompt: json["PROMPT"] == null ? null : json["PROMPT"], prompt: json["prompt"] == null ? null : json["prompt"],
requestType: json["REQUEST_TYPE"] == null ? null : json["REQUEST_TYPE"], requestType: json["requesTType"] == null ? null : json["requesTType"],
updateButton: json["UPDATE_BUTTON"] == null ? null :json["UPDATE_BUTTON"], updateButton: json["updatEButton"] == null ? null :json["updatEButton"],
attachmenTRequired: json["attachmenT_REQUIRED"],
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"ADD_BUTTON": addButton == null ? null :addButton, "adDButton": addButton == null ? null :addButton,
"DELETE_BUTTON": deleteButton == null ? null : deleteButton, "deletEButton": deleteButton == null ? null : deleteButton,
"ENTRY_SEQUENCE": entrySequence == null ? null : entrySequence, "entrYSequence": entrySequence == null ? null : entrySequence,
"FUNCTION_NAME": functionName == null ? null : functionName, "functioNName": functionName == null ? null : functionName,
"ICON": icon == null ? null : icon, "icon": icon == null ? null : icon,
"LVL": lvl == null ? null : lvl, "lvl": lvl == null ? null : lvl,
"MENU_ENTRY_TYPE": menuEntryType == null ? null : menuEntryType, "menU_ENTRY_TYPE": menuEntryType == null ? null : menuEntryType,
"MENU_NAME": menuName == null ? null : menuName, "menUName": menuName == null ? null : menuName,
"PARENT_MENU_NAME": parentMenuName == null ? null : parentMenuName, "parenTMenuName": parentMenuName == null ? null : parentMenuName,
"PROMPT": prompt == null ? null : prompt, "prompt": prompt == null ? null : prompt,
"REQUEST_TYPE": requestType == null ? null : requestType, "requesTType": requestType == null ? null : requestType,
"UPDATE_BUTTON": updateButton == null ? null : updateButton, "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) { if (json['GetBasicDetColsStructureList'] != null) {
getBasicDetColsStructureList = <GetBasicDetColsStructureList>[]; getBasicDetColsStructureList = <GetBasicDetColsStructureList>[];
json['GetBasicDetColsStructureList'].forEach((v) { 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))); listMenu = json["List_Menu"] == null ? <ListMenu>[] : List<ListMenu>.from(json["List_Menu"].map((x) => ListMenu.fromJson(x)));
listNewEmployees = json['List_NewEmployees']; listNewEmployees = json['List_NewEmployees'];
listRadScreen = json['List_RadScreen']; listRadScreen = json['List_RadScreen'];
logInTokenID = json['LogInTokenID']; logInTokenID = json['logInTokenID'];
if (json['MemberInformationList'] != null) { if (json['MemberInformationList'] != null) {
memberInformationList = <MemberInformationListModel>[]; memberInformationList = <MemberInformationListModel>[];
json['MemberInformationList'].forEach((v) { json['MemberInformationList'].forEach((v) {

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

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

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

@ -15,7 +15,7 @@ class PostParamsModel {
String? payrollCodeStr; String? payrollCodeStr;
int? pSessionId; int? pSessionId;
String? userName; String? userName;
String? language;
PostParamsModel({ PostParamsModel({
this.versionID, this.versionID,
this.channel, this.channel,
@ -31,6 +31,7 @@ class PostParamsModel {
this.pSelectedEmployeeNumber, this.pSelectedEmployeeNumber,
this.payrollCodeStr, this.payrollCodeStr,
this.pLegislationCode, this.pLegislationCode,
this.language
}); });
PostParamsModel.fromJson(Map<String, dynamic> json) { PostParamsModel.fromJson(Map<String, dynamic> json) {
@ -46,33 +47,34 @@ class PostParamsModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID; data['versionID'] = this.versionID;
data['Channel'] = this.channel; data['channel'] = this.channel;
data['LanguageID'] = this.languageID; data['languageID'] = this.languageID;
data['MobileType'] = this.mobileType; data['MobileType'] = this.mobileType;
data['LogInTokenID'] = this.logInTokenID; data['logInTokenID'] = this.logInTokenID ??"";
data['PayrollCodeStr'] = this.payrollCodeStr; data['payrollCodeStr'] = this.payrollCodeStr ?? "CS";
data['LegislationCodeStr'] = this.pLegislationCode; data['legislationCodeStr'] = this.pLegislationCode ?? "CS";
data['TokenID'] = this.tokenID; data['tokenID'] = this.tokenID ?? "";
return data; return data;
} }
Map<String, dynamic> toJsonAfterLogin() { Map<String, dynamic> toJsonAfterLogin() {
Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID; data['versionID'] = this.versionID;
data['Channel'] = this.channel; data['channel'] = this.channel;
data['LanguageID'] = this.languageID; data['languageID'] = this.languageID;
data['MobileType'] = this.mobileType; data['mobileType'] = this.mobileType;
data['LogInTokenID'] = this.logInTokenID; data['logInTokenID'] = this.logInTokenID;
data['TokenID'] = this.tokenID; data['tokenID'] = this.tokenID;
data['MobileNumber'] = this.mobileNumber; data['mobileNumber'] = this.mobileNumber;
data['UserName'] = this.userName; data['userName'] = this.userName;
data['P_EMAIL_ADDRESS'] = this.pEmailAddress; data['p_EMAIL_ADDRESS'] = this.pEmailAddress;
data['P_SESSION_ID'] = this.pSessionId; data['p_SESSION_ID'] = this.pSessionId;
data['PayrollCodeStr'] = this.payrollCodeStr; data['payrollCodeStr'] = this.payrollCodeStr;
data['LegislationCodeStr'] = this.pLegislationCode; data['legislationCodeStr'] = this.pLegislationCode;
data['P_SELECTED_EMPLOYEE_NUMBER'] = this.pSelectedEmployeeNumber; data['p_SELECTED_EMPLOYEE_NUMBER'] = this.pSelectedEmployeeNumber;
data['P_USER_NAME'] = this.pUserName; data['p_USER_NAME'] = this.pUserName;
data['p_LANGUAGE'] = this.language;
return data; 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/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_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_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/get_open_notifications_list.dart';
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.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/list_menu.dart';
@ -143,7 +144,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
workListCounter = genericResponseModel?.pOPENNTFNUMBER ?? 0; workListCounter = genericResponseModel?.pOPENNTFNUMBER ?? 0;
itgFormsModel = await DashboardApiClient().getItgFormsPendingTask(); //itgFormsModel = await DashboardApiClient().getItgFormsPendingTask();
workListCounter = workListCounter + (itgFormsModel?.totalCount ?? 0); workListCounter = workListCounter + (itgFormsModel?.totalCount ?? 0);
GenericResponseModel? cocGenericResponseModel = await DashboardApiClient().getCOCNotifications(); GenericResponseModel? cocGenericResponseModel = await DashboardApiClient().getCOCNotifications();
cocCount = cocGenericResponseModel?.mohemmITGPendingTaskResponseItem; cocCount = cocGenericResponseModel?.mohemmITGPendingTaskResponseItem;
@ -176,9 +177,9 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
//Missing Siwpe API's & Methods //Missing Siwpe API's & Methods
Future fetchMissingSwipe(context) async { Future fetchMissingSwipe(context) async {
try { try {
GenericResponseModel? genericResponseModel = await DashboardApiClient().getOpenMissingSwipes(); GetOpenMissingSwipes? genericResponseModel = await DashboardApiClient().getOpenMissingSwipes();
isMissingSwipeLoading = false; isMissingSwipeLoading = false;
missingSwipeCounter = genericResponseModel!.getOpenMissingSwipesList!.pOpenMissingSwipes ?? 0; missingSwipeCounter = genericResponseModel!.pOpenMissingSwipes ?? 0;
notifyListeners(); notifyListeners();
} catch (ex) { } catch (ex) {
isMissingSwipeLoading = false; isMissingSwipeLoading = false;
@ -211,11 +212,11 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
void fetchListMenu() async { void fetchListMenu() async {
try { try {
List<ListMenu> menuList = await DashboardApiClient().getListMenu(); 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) { if (findMyRequest.isNotEmpty) {
drawerMenuItemList.insert(3, DrawerMenuItem("assets/images/drawer/my_requests.svg", LocaleKeys.myRequest.tr(), AppRoutes.myRequests)); 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) { if (findMyTeam.isNotEmpty) {
AppState().setempStatusIsManager = true; AppState().setempStatusIsManager = true;
drawerMenuItemList.insert(2, DrawerMenuItem("assets/images/drawer/my_team.svg", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam)); 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 //Menu Entries API's & Methods
void fetchMenuEntries() async { void fetchMenuEntries() async {
try { try {
GenericResponseModel? genericResponseModel = await DashboardApiClient().getGetMenuEntries(); List<GetMenuEntriesList>? getMenuEntriesList = await DashboardApiClient().getGetMenuEntries();
getMenuEntriesList = genericResponseModel!.getMenuEntriesList; getMenuEntriesList = getMenuEntriesList; //genericResponseModel!.getMenuEntriesList;
homeMenus = parseMenus(getMenuEntriesList ?? []); homeMenus = parseMenus(getMenuEntriesList!);
if (homeMenus!.isNotEmpty) { if (homeMenus!.isNotEmpty) {
homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr())); 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())); homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requestType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr()));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -71,7 +71,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
void getItgData() async { void getItgData() async {
try { try {
Utils.showLoading(context); 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 ?? []; allowedActionList = itgRequest?.allowedActions ?? [];
if (allowedActionList.isNotEmpty) { if (allowedActionList.isNotEmpty) {
isCloseAvailable = allowedActionList.any((element) => element.action == "CLOSE"); isCloseAvailable = allowedActionList.any((element) => element.action == "CLOSE");
@ -419,10 +419,10 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
performAction("Answer"); performAction("Answer");
break; break;
case "ReportGenerated": case "ReportGenerated":
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? ""); performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.employeENumber ?? "");
break; break;
case "DataCorrected": case "DataCorrected":
performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.eMPLOYEENUMBER ?? ""); performDataCorrectionORReportGeneratedAction(requestDetails!.requestType!, requestDetails!.iD!, requestDetails!.itemID!, AppState().memberInformationList?.employeENumber ?? "");
break; break;
} }
setState(() { setState(() {
@ -498,13 +498,13 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
actionMode: actionMode, actionMode: actionMode,
onTap: (note) { onTap: (note) {
if (actionMode == "APPROVED") { 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") { } 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") { } 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 { } 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 { try {
Utils.showLoading(context); Utils.showLoading(context);
ITGRequest? itgRequest = 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.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr()); Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
// Navigator.pop(context, "delegate_reload"); // Navigator.pop(context, "delegate_reload");
@ -647,7 +647,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
isAttachmentLoaded = false; isAttachmentLoaded = false;
itgFormAttachmentsList.clear(); itgFormAttachmentsList.clear();
List<ITGFormsAttachmentsModel> _itgFormAttachmentsList = 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) { if (!isAttachmentLoaded) {
itgFormAttachmentsList = _itgFormAttachmentsList; itgFormAttachmentsList = _itgFormAttachmentsList;
} }

@ -111,7 +111,7 @@ class ApprovalLevelfragment extends StatelessWidget {
}).expanded, }).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor), Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() { 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, showMyBottomSheet(context,
callBackFunc: voidCallback, callBackFunc: voidCallback,
child: DelegateSheet( child: DelegateSheet(

@ -176,9 +176,9 @@ class SelectedItemSheet extends StatelessWidget {
if (replacementList != null) empID = replacementList!.userName; if (replacementList != null) empID = replacementList!.userName;
try { try {
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!); memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!);
if (actionHistoryList != null) empID = actionHistoryList!.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 (favoriteReplacements != null) empID = favoriteReplacements!.employeeImage = memberInformationListModel!.employeEImage ?? AppState().getBase64ImageEmp;
if (replacementList != null) empID = replacementList!.employeeImage = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp; if (replacementList != null) empID = replacementList!.employeeImage = memberInformationListModel!.employeEImage ?? AppState().getBase64ImageEmp;
(context as Element).markNeedsBuild(); (context as Element).markNeedsBuild();
} catch (ex) { } catch (ex) {
Utils.handleException(ex, context, null); Utils.handleException(ex, context, null);
@ -211,13 +211,13 @@ class SelectedItemSheet extends StatelessWidget {
try { try {
var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!]; var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!];
if (apiMode == "Delegate") { 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); isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment);
} else if (apiMode == "RequestInformation") { } 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); isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment);
} else if (apiMode == "Answer") { } 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); isITGRequest ? favoriteReplacements!.userName! : actionHistoryList!.uSERNAME!, comment);
} }
Utils.hideLoading(context); Utils.hideLoading(context);

@ -122,13 +122,13 @@ class SelectedItgItemSheet extends StatelessWidget {
var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!]; var requestDetails = AppState().requestAllList![AppState().itgWorkListIndex!];
if (apiMode == "Delegate") { if (apiMode == "Delegate") {
await WorkListApiClient() 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") { } else if (apiMode == "RequestInformation") {
await WorkListApiClient() 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") { } else if (apiMode == "Answer") {
await WorkListApiClient() 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); Utils.hideLoading(context);
Navigator.pop(context, "delegate_reload"); Navigator.pop(context, "delegate_reload");

@ -124,7 +124,7 @@ class ActionsFragment extends StatelessWidget {
}).expanded, }).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor), Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() { 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, showMyBottomSheet(context,
callBackFunc: voidCallback, callBackFunc: voidCallback,
child: DelegateSheet( child: DelegateSheet(

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

Loading…
Cancel
Save