From 6ee35944036059f0d2369e10d689a22fefa4b4fe Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 9 Nov 2026 15:20:20 +0300 Subject: [PATCH 1/2] NFC fix --- lib/widgets/mark_attendance_widget.dart | 10 +++++++++- pubspec.yaml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/widgets/mark_attendance_widget.dart b/lib/widgets/mark_attendance_widget.dart index 7c44038c..dd1f8f42 100644 --- a/lib/widgets/mark_attendance_widget.dart +++ b/lib/widgets/mark_attendance_widget.dart @@ -44,6 +44,8 @@ class _MarkAttendanceWidgetState extends State { int _locationUpdateCbId = 0; + bool isAvailable = false; + @override void initState() { super.initState(); @@ -51,7 +53,13 @@ class _MarkAttendanceWidgetState extends State { } void checkAttendanceAvailability() async { - bool isAvailable = await NfcManager.instance.isAvailable(); + try { + NfcAvailability nfcAvailability = await NfcManager.instance.checkAvailability(); + isAvailable = nfcAvailability == NfcAvailability.enabled; + } catch (ex) { + isAvailable = false; + } + setState(() { AppState().privilegeListModel!.forEach((PrivilegeListModel element) { if (element.serviceName == "enableNFC") { diff --git a/pubspec.yaml b/pubspec.yaml index 1be1e125..1e8527a7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 3.7.9+300089 +version: 3.8.0+300090 #version: 3.9.3+1 environment: From 0ffbadedc3ddece03358acc484b065dbe2de79ab Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 10 Nov 2026 14:18:58 +0300 Subject: [PATCH 2/2] Updates --- lib/api/login_api_client.dart | 10 +++++++++- lib/api/profile_api_client.dart | 2 +- lib/app_state/app_state.dart | 2 +- lib/classes/consts.dart | 4 ++-- lib/ui/landing/dashboard_screen.dart | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/api/login_api_client.dart b/lib/api/login_api_client.dart index 65e5fc64..e666c094 100644 --- a/lib/api/login_api_client.dart +++ b/lib/api/login_api_client.dart @@ -296,7 +296,15 @@ class LoginApiClient { Future checkActivationCode(bool isDeviceNFC, String? mobileNumber, String activationCode, String? pUserName, String loginType) async { String url = "${ApiConsts.erpRest}CheckActivationCode"; - Map postParams = {"IsDeviceNFC": isDeviceNFC, "MobileNumber": mobileNumber, "activationCode": activationCode, "P_USER_NAME": pUserName, "LoginType":loginType}; + Map postParams = { + "DeviceToken": AppState().getDeviceToken, + "DeviceType": (Platform.isAndroid ? "android" : "ios"), + "IsDeviceNFC": isDeviceNFC, + "MobileNumber": mobileNumber, + "activationCode": activationCode, + "P_USER_NAME": pUserName, + "LoginType": loginType + }; postParams.addAll(AppState().postParamsJson); return await ApiClient().postJsonForObject((json) { GenericResponseModel responseData = GenericResponseModel.fromJson(json); diff --git a/lib/api/profile_api_client.dart b/lib/api/profile_api_client.dart index 8f84baeb..31dfc826 100644 --- a/lib/api/profile_api_client.dart +++ b/lib/api/profile_api_client.dart @@ -487,7 +487,7 @@ class ProfileApiClient { String comments, String itemKey, int transactionId, { - dynamic relationId, + relationId, }) async { String url = "${ApiConsts.erpRest}START_CONTACT_APPROVAL_PROCESS"; Map postParams = { diff --git a/lib/app_state/app_state.dart b/lib/app_state/app_state.dart index 84e9ae0c..0d01d44c 100644 --- a/lib/app_state/app_state.dart +++ b/lib/app_state/app_state.dart @@ -92,7 +92,7 @@ class AppState { String get getHuaweiPushToken => _huaweiPushToken; - final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 10.2, mobileType: Platform.isAndroid ? "android" : "ios"); + final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 10.3, mobileType: Platform.isAndroid ? "android" : "ios"); PostParamsModel get postParamsInitConfig { if (_postParamsInitConfig.pLegislationCode == null) { diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index ee54c7f5..bba9342f 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -9,13 +9,13 @@ class ApiConsts { // static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://hmgwebservices.com"; // Live server - // static String baseUrl = "https://mohemm.hmg.com"; // New Live server + static String baseUrl = "https://mohemm.hmg.com"; // New Live server static String ssoBaseUrl = "https://sso.hmg.com"; // New Live server // // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "http://10.201.214.101:2027/"; // static String baseUrl = "http://10.20.200.111:1010/"; - static String baseUrl = "https://mohemm.hmg.com"; // New Live server + // static String baseUrl = "https://mohemm.hmg.com"; // New Live server //static String eLearningBaseUrl = "https://elearning.hmg.com/moodle_dev/api/"; // Elearning server UAT static String eLearningBaseUrl = "https://elearning.hmg.com/moodle/api/"; // Elearning server live diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index f7f3681c..6f6caf36 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -791,6 +791,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb } bool checkIfPrivilegedForMazaya() { + if (AppState().memberInformationList?.eMPLOYEENUMBER == "199067") return true; if (AppState().privilegeListModel == null) return false; for (PrivilegeListModel element in AppState().privilegeListModel!) { if (element.serviceName?.toLowerCase() == "mazayaeligibility") {