diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index d018fec..d6d528d 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -2,7 +2,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.mohem_flutter_app">
-
+
diff --git a/android/build.gradle b/android/build.gradle
index 23ea6ba..2c90dbd 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,5 @@
buildscript {
- ext.kotlin_version = '1.7.20'
+ ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
@@ -11,6 +11,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.huawei.agconnect:agcp:1.8.0.300'
+ classpath "com.android.tools:r8:8.2.33"
}
}
diff --git a/android/gradle.properties b/android/gradle.properties
index 2260f45..69c440c 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,3 +1,4 @@
-org.gradle.jvmargs=-Xmx1836M
+org.gradle.jvmargs=-Xmx2048M
android.useAndroidX=true
android.enableJetifier=true
+#org.gradle.java.home=/Users/user/Library/Java/JavaVirtualMachines/jbr-17.0.12/Contents/Home/
\ No newline at end of file
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 2f8758c..1e830b7 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Jun 23 08:50:38 CEST 2017
+#Thu Mar 06 11:40:30 AST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
\ No newline at end of file
diff --git a/assets/icons/itg/alert.svg b/assets/icons/itg/alert.svg
new file mode 100644
index 0000000..6f0f0ca
--- /dev/null
+++ b/assets/icons/itg/alert.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/itg/calendar-remove.svg b/assets/icons/itg/calendar-remove.svg
new file mode 100644
index 0000000..965a40c
--- /dev/null
+++ b/assets/icons/itg/calendar-remove.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/itg/calendar.svg b/assets/icons/itg/calendar.svg
new file mode 100644
index 0000000..2ac497c
--- /dev/null
+++ b/assets/icons/itg/calendar.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/icons/itg/coming-soon.svg b/assets/icons/itg/coming-soon.svg
new file mode 100644
index 0000000..52d5ffc
--- /dev/null
+++ b/assets/icons/itg/coming-soon.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/itg/finger-print-remove.svg b/assets/icons/itg/finger-print-remove.svg
new file mode 100644
index 0000000..bc6fe65
--- /dev/null
+++ b/assets/icons/itg/finger-print-remove.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/icons/itg/knight-shield.svg b/assets/icons/itg/knight-shield.svg
new file mode 100644
index 0000000..e0bf799
--- /dev/null
+++ b/assets/icons/itg/knight-shield.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/itg/money-not-found.svg b/assets/icons/itg/money-not-found.svg
new file mode 100644
index 0000000..01121a6
--- /dev/null
+++ b/assets/icons/itg/money-not-found.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/itg/stethoscope.svg b/assets/icons/itg/stethoscope.svg
new file mode 100644
index 0000000..31c4638
--- /dev/null
+++ b/assets/icons/itg/stethoscope.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/itg/time-quarter-pass.svg b/assets/icons/itg/time-quarter-pass.svg
new file mode 100644
index 0000000..5a8a758
--- /dev/null
+++ b/assets/icons/itg/time-quarter-pass.svg
@@ -0,0 +1,15 @@
+
diff --git a/assets/icons/itg/time-quarter.svg b/assets/icons/itg/time-quarter.svg
new file mode 100644
index 0000000..7eaf056
--- /dev/null
+++ b/assets/icons/itg/time-quarter.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/biometrics.svg b/assets/images/biometrics.svg
new file mode 100644
index 0000000..5d61575
--- /dev/null
+++ b/assets/images/biometrics.svg
@@ -0,0 +1,33 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index 5a27f0b..d840a9b 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -4,7 +4,10 @@
"arabic": "عربي",
"login": "تسجيل الدخول",
"pleaseEnterLoginDetails": "الرجاء إدخال التفاصيل أدناه لتسجيل الدخول",
+ "userId": "UserID",
"username": "اسم المستخدم",
+ "userName": "اسم المستخدم",
+ "userSearch": "User Search",
"password": "كلمة المرور",
"welcomeBack": "مرحبا بعودتك",
"wouldYouLikeToLoginWithCurrentUsername": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟",
@@ -545,6 +548,36 @@
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"open": "يفتح",
+<<<<<<< HEAD
+=======
+ "youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
+ "pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
+ "generate": "يولد",
+ "paymentRequest": "طلب الدفع",
+ "paymentDetails": "تفاصيل الدفع",
+ "requestNo": "رقم الطلب",
+ "requesterEmpNum": "رقم الموظف الذي قدم الطلب",
+ "requesterEmpName": "اسم الموظف مقدم الطلب",
+ "prepareEmpName": "إعداد اسم الموظف",
+ "requesterPositionName": "اسم الوظيفة لمقدم الطلب",
+ "preparePositionName": "إعداد اسم الوظيفة",
+ "requesterPayrollName": "اسم مقدم الطلب",
+ "payingORGName": "اسم المنظمة الدافعة",
+ "requestAmount": "مبلغ الطلب",
+ "typeofPayment": "نوع الدفع",
+ "beneficiaryDetails": "تفاصيل المستفيد",
+ "beneficiaryName": "اسم المستفيد",
+ "idIqama": "الهوية السعودية / الإقامة",
+ "beneficiaryBankName": "اسم البنك المستفيد",
+ "sadadNumber": "رقم سداد",
+ "beneficiaryIBAN": "رقم IBAN للمستفيد",
+ "purchaseOrders": "طلبات الشراء",
+ "approvalDate": "تاريخ الموافقة",
+ "pOAmount": "مبلغ الطلب",
+ "versionStatus": "حالة الإصدار",
+ "supplierNo": "رقم المورد",
+ "general": "عام",
+>>>>>>> master
"requesterOperatingUnit":"وحدة تشغيل مقدم الطلب",
"prepareEmpNum":"إعداد رقم الموظف",
"supplierInfo" : "معلومات المورد",
@@ -558,5 +591,36 @@
"patientName" : "اسم المريض",
"invoiceDate" : "تاريخ الفاتورة",
"refundInvoice" :"فاتورة الاسترجاع",
+<<<<<<< HEAD
"hospitalClinic" : "عيادة المستشفى"
+=======
+ "hospitalClinic" : "عيادة المستشفى",
+ "graphicalAnalysis": "التحليل الرسومي",
+ "itemHistoryAnalysis": "تحليل تاريخ العنصر",
+ "pOno": "امر شراء #",
+ "oprUnit": "وحدة التشغيل",
+ "qtyOrdered": "الكمية المطلوبة",
+ "qtyReceived": "الكمية المستلمة",
+ "bonusQty": "كمية المكافأة",
+ "balQty": "كمية التوازن",
+ "videoCall": "مكالمة فيديو",
+ "addUsers": "إضافة مستخدمين إلى المجموعة",
+ "admin": "مشرف",
+ "areYouSureWantTodelete": "هل أنت متأكد أنك تريد الحذف؟",
+ "Attendance": "الحضور",
+ "audioCall": "مكالمة صوتية",
+ "editGroups": "تعديل المجموعة",
+ "enterGroupName": "يرجى إدخال اسم المجموعة الصحيح",
+ "enterGroupNamePlease": "يرجى إدخال اسم المجموعة",
+ "groupMembers": "أعضاء المجموعة",
+ "groupName": "اسم المجموعة",
+ "groupNameshouldbe": "يجب أن يتكون اسم المجموعة من 10 أحرف على الأقل",
+ "manage": "إدارة",
+ "manageGroup": "إدارة المجموعة",
+ "members": "الأعضاء",
+ "searchByUserName": "البحث بواسطة اسم المستخدم",
+ "shareScreen": "مشاركة الشاشة",
+ "start":"يبدأ",
+ "about":"عن"
+>>>>>>> master
}
\ No newline at end of file
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 2a9ece6..2ab3649 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -303,6 +303,7 @@
"section": "Section",
"topic": "Topic",
"actionBy": "Action By",
+ "pending": "Pending",
"pendingTransactions": "Pending Transactions",
"selectRequestType": "Please select request type",
"dateFrom": "Date From",
@@ -565,6 +566,34 @@
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
"requesterOperatingUnit":"Requester Operating Unit",
+<<<<<<< HEAD
+=======
+ "generate": "Generate",
+ "paymentRequest": "Pay Request",
+ "paymentDetails": "Payment Details",
+ "requestNo": "Request No",
+ "requesterEmpNum": "Requester Employee Num",
+ "requesterEmpName": "Requester Employee Name",
+ "prepareEmpName": "Prepare Employee Name",
+ "requesterPositionName": "Requester Position Name",
+ "preparePositionName": "Prepare Position Name",
+ "requesterPayrollName": "Requester Payroll Name",
+ "payingORGName": "Paying Organization Name",
+ "requestAmount": "Request Amount",
+ "typeofPayment": "Type of Payment",
+ "beneficiaryDetails": "Beneficiary Details",
+ "beneficiaryName": "Beneficiary Name",
+ "idIqama": "Saudi ID / Iqama",
+ "beneficiaryBankName": "Beneficiary Bank Name",
+ "sadadNumber": "Sadad Number",
+ "beneficiaryIBAN": "Beneficiary IBAN",
+ "purchaseOrders": "Purchase Orders",
+ "approvalDate": "Approval Date",
+ "pOAmount": "PO Amount",
+ "versionStatus": "Version Status",
+ "supplierNo": "Supplier No",
+ "general": "General",
+>>>>>>> master
"prepareEmpNum":"Prepare Employee Num",
"supplierInfo" : "Supplier Information",
"supplierAcNo": "Supplier Account No",
@@ -577,5 +606,19 @@
"patientName" : "Patient Name",
"invoiceDate" : "Invoice Date",
"refundInvoice" :"Refund Invoice",
+<<<<<<< HEAD
"hospitalClinic" : "Hospital Clinic"
+=======
+ "hospitalClinic" : "Hospital Clinic",
+ "graphicalAnalysis": "Graphical Analysis",
+ "itemHistoryAnalysis": "Item History Analysis",
+ "pOno": "P.O #",
+ "oprUnit": "Opr. Unit",
+ "qtyOrdered": "Qty. Ordered",
+ "qtyReceived": "Qty. Received",
+ "bonusQty": "Bonus Qty.",
+ "balQty": "Bal. Qty.",
+ "start":"Start",
+ "about":"About"
+>>>>>>> master
}
\ No newline at end of file
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 9625e10..7c56964 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 11.0
+ 12.0
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 1eb87d0..98a3328 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -160,7 +160,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1300;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -232,6 +232,7 @@
files = (
);
inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@@ -362,6 +363,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
@@ -500,6 +502,7 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
@@ -530,6 +533,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index c87d15a..5e31d3d 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
CFBundleInfoDictionaryVersion
6.0
CFBundleName
- MOHEMM
+ MoheM
CFBundlePackageType
APPL
CFBundleShortVersionString
diff --git a/lib/api/api_client.dart b/lib/api/api_client.dart
index e3cbee1..fb415d4 100644
--- a/lib/api/api_client.dart
+++ b/lib/api/api_client.dart
@@ -86,6 +86,7 @@ class ApiClient {
var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes, isFormData: isFormData);
try {
if (!kReleaseMode) {
+ logger.i("Url: " + url);
logger.i("res: " + response.body);
}
@@ -93,6 +94,12 @@ class ApiClient {
if (jsonData["IsAuthenticated"] != null) {
AppState().setIsAuthenticated = jsonData["IsAuthenticated"];
}
+
+ // if(url.contains("GetOfferDiscountsConfigData")) {
+ // jsonData["ErrorMessage"] = "Service Not Available";
+ // jsonData["ErrorEndUserMessage"] = "Service Not Available";
+ // }
+
if (jsonData["ErrorMessage"] == null) {
return factoryConstructor(jsonData);
} else {
diff --git a/lib/api/dashboard_api_client.dart b/lib/api/dashboard_api_client.dart
index bc0fece..145b039 100644
--- a/lib/api/dashboard_api_client.dart
+++ b/lib/api/dashboard_api_client.dart
@@ -13,6 +13,8 @@ import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
import 'package:platform_device_id/platform_device_id.dart';
+
+// import 'package:platform_device_id/platform_device_id.dart';
import 'package:uuid/uuid.dart';
class DashboardApiClient {
@@ -26,40 +28,56 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_Attendance_Tracking";
Map postParams = {};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData.getAttendanceTrackingList;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData.getAttendanceTrackingList;
+ },
+ url,
+ postParams,
+ );
}
Future getOpenNotifications() async {
String url = "${ApiConsts.erpRest}GET_OPEN_NOTIFICATIONS";
Map postParams = {};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
Future getCOCNotifications() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_ReviewerAdmin_Pending_Tasks";
Map postParams = {"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
Future getItgFormsPendingTask() async {
String url = "${ApiConsts.cocRest}ITGFormsPendingTasks";
Map postParams = {};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- ItgFormsModel responseData = ItgFormsModel.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ ItgFormsModel responseData = ItgFormsModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
Future> getAccrualBalances(String effectiveDate, {String? empID}) async {
@@ -67,20 +85,28 @@ class DashboardApiClient {
Map postParams = {"P_EFFECTIVE_DATE": effectiveDate};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData.getAccrualBalancesList ?? [];
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData.getAccrualBalancesList ?? [];
+ },
+ url,
+ postParams,
+ );
}
Future getOpenMissingSwipes() async {
String url = "${ApiConsts.erpRest}GET_OPEN_MISSING_SWIPES";
Map postParams = {};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
//Menus List
@@ -88,10 +114,14 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_MENU";
Map postParams = {};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData.listMenu ?? [];
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData.listMenu ?? [];
+ },
+ url,
+ postParams,
+ );
}
//GET_MENU_ENTRIES
@@ -99,14 +129,40 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_MENU_ENTRIES";
Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
+ }
+
+ Future getEventActivity() async {
+ String url = "${ApiConsts.erpRest}Get_EventActivity";
+ Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
+ postParams.addAll(AppState().postParamsJson);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
//Mark Attendance
- Future markAttendance({String lat = "0", String? long = "0", required int pointType, String nfcValue = "", bool isGpsRequired = false, String QRValue = "", String payrollCode = ""}) async {
+ Future markAttendance({
+ String lat = "0",
+ String? long = "0",
+ required int pointType,
+ String nfcValue = "",
+ bool isGpsRequired = false,
+ String QRValue = "",
+ String payrollCode = "",
+ }) async {
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
var uuid = Uuid();
// Generate a v4 (random) id
@@ -121,13 +177,17 @@ class DashboardApiClient {
"NFCValue": nfcValue,
"WifiValue": pointType == 3 ? "100" : "",
"IsGpsRequired": isGpsRequired,
- "PayrollCodeStr": AppState().postParamsObject?.payrollCodeStr.toString() ?? ""
+ "PayrollCodeStr": AppState().postParamsObject?.payrollCodeStr.toString() ?? "",
};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
//Mark Fake Location
@@ -146,10 +206,14 @@ class DashboardApiClient {
"EmployeeID": AppState().memberInformationList!.eMPLOYEENUMBER,
};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
//Check ITG Type
@@ -159,15 +223,19 @@ class DashboardApiClient {
Map postParams = {
"EmployeeNumber": AppState().getUserName,
"ItgEnableAt": "After Service Submission", //Mobile Id
- "ItgServiceName": "Login"
+ "ItgServiceName": "Login",
};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- GenericResponseModel responseData = GenericResponseModel.fromJson(json);
- MohemmItgResponseItem res = MohemmItgResponseItem.fromJson(jsonDecode(responseData.mohemmITGResponseItem ?? ""));
- // var jsonDecodedData = jsonDecode(jsonDecode(responseData.mohemmITGResponseItem!)['result']['data']);
- return res;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ GenericResponseModel responseData = GenericResponseModel.fromJson(json);
+ MohemmItgResponseItem res = MohemmItgResponseItem.fromJson(jsonDecode(responseData.mohemmITGResponseItem ?? ""));
+ // var jsonDecodedData = jsonDecode(jsonDecode(responseData.mohemmITGResponseItem!)['result']['data']);
+ return res;
+ },
+ url,
+ postParams,
+ );
}
//Submit ITG
@@ -179,13 +247,17 @@ class DashboardApiClient {
"ItgComments": comment,
"ItgNotificationMasterId": masterId,
"ItgQuestionResponses": itgList,
- "ItgSurveyId": serviceId
+ "ItgSurveyId": serviceId,
};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- ItgMainRes responseData = ItgMainRes.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ ItgMainRes responseData = ItgMainRes.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
Future getAdvertisementDetail(String masterID) async {
@@ -196,10 +268,14 @@ class DashboardApiClient {
"ItgNotificationMasterId": masterID, //Mobile Id
};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- ItgMainRes responseData = ItgMainRes.fromJson(json);
- return responseData;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ ItgMainRes responseData = ItgMainRes.fromJson(json);
+ return responseData;
+ },
+ url,
+ postParams,
+ );
}
Future setAdvertisementViewed(String masterID, int advertisementId, String? ackValue) async {
@@ -213,9 +289,27 @@ class DashboardApiClient {
// "ItgAdvertisement": {"ItgAdvertisementId": advertisementId, "ItgAcknowledgment": ackValue} //Mobile Id
};
postParams.addAll(AppState().postParamsJson);
- return await ApiClient().postJsonForObject((json) {
- // ItgMainRes responseData = ItgMainRes.fromJson(json);
- return json;
- }, url, postParams);
+ return await ApiClient().postJsonForObject(
+ (json) {
+ // ItgMainRes responseData = ItgMainRes.fromJson(json);
+ return json;
+ },
+ url,
+ postParams,
+ );
}
+
+ // Future getItgTimeCardDetails() async {
+ // String url = "${ApiConsts.cocRest}ITG_TimeCard_Get";
+ // Map postParams = {};
+ // postParams.addAll(AppState().postParamsJson);
+ // return await ApiClient().postJsonForObject(
+ // (json) {
+ // ItgTimeCardModel responseData = ItgTimeCardModel.fromJson(json);
+ // return responseData;
+ // },
+ // url,
+ // postParams,
+ // );
+ // }
}
diff --git a/lib/api/my_attendance_api_client.dart b/lib/api/my_attendance_api_client.dart
index 78742a3..3978c2d 100644
--- a/lib/api/my_attendance_api_client.dart
+++ b/lib/api/my_attendance_api_client.dart
@@ -29,6 +29,21 @@ class MyAttendanceApiClient {
}, url, postParams);
}
+ Future?> getCeiTransaction(String pFunctionName, int? relationID) async {
+ String url = "${ApiConsts.erpRest}GET_CEI_TRANSACTIONS";
+ Map postParams = {"P_PAGE_LIMIT": 50, "P_PAGE_NUM": 1, "P_FUNCTION_NAME": pFunctionName};
+ postParams.addAll(AppState().postParamsJson);
+ if (relationID != null) postParams["P_CONTACT_RELATIONSHIP_ID"] = relationID;
+ return await ApiClient().postJsonForObject((json) {
+ GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
+ if (responseData.getCEITransactionList?.isNotEmpty ?? false) {
+ return responseData.getCEITransactionList!.map((e) => GetEITTransactionList(collectionTransaction: e.collectionTransaction)).toList();
+ } else {
+ return [];
+ }
+ }, url, postParams);
+ }
+
Future getEitDffStructure(String pFunctionName, String? empID) async {
String url = "${ApiConsts.erpRest}GET_EIT_DFF_STRUCTURE";
Map postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_FUNCTION_NAME": pFunctionName};
@@ -40,14 +55,55 @@ class MyAttendanceApiClient {
}, url, postParams);
}
- Future> getValueSetValues(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List