Merge branch 'master' of http://34.17.182.140/Haroon6138/mohemm-flutter-app into master_merge

* 'master' of http://34.17.182.140/Haroon6138/mohemm-flutter-app:
  Updates
  NFC fix

# Conflicts:
#	lib/api/profile_api_client.dart
master_merge
Sultan khan 4 hours ago
commit 3a31b8f430

@ -296,7 +296,15 @@ class LoginApiClient {
Future<GenericResponseModel?> checkActivationCode(bool isDeviceNFC, String? mobileNumber, String activationCode, String? pUserName, String loginType) async {
String url = "${ApiConsts.erpRest}CheckActivationCode";
Map<String, dynamic> postParams = {"IsDeviceNFC": isDeviceNFC, "MobileNumber": mobileNumber, "activationCode": activationCode, "P_USER_NAME": pUserName, "LoginType":loginType};
Map<String, dynamic> 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);

@ -487,7 +487,7 @@ class ProfileApiClient {
String comments,
String itemKey,
int transactionId, {
relationId,
relationId,
}) async {
String url = "${ApiConsts.erpRest}START_CONTACT_APPROVAL_PROCESS";
Map<String, dynamic> postParams = {

@ -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) {

@ -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

@ -791,6 +791,7 @@ class _DashboardScreenState extends State<DashboardScreen> 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") {

@ -44,6 +44,8 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
int _locationUpdateCbId = 0;
bool isAvailable = false;
@override
void initState() {
super.initState();
@ -51,7 +53,13 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
}
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") {

@ -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:

Loading…
Cancel
Save