diff --git a/android/AtomsSA-playStore.jks b/android/AtomsSA-playStore.jks deleted file mode 100644 index 0d4a261e..00000000 Binary files a/android/AtomsSA-playStore.jks and /dev/null differ diff --git a/android/key.properties b/android/key.properties index ef160512..a181d7ac 100644 --- a/android/key.properties +++ b/android/key.properties @@ -1,5 +1,4 @@ storePassword=Cloud@AtomsSA keyPassword=Cloud@AtomsSA keyAlias=playstore -#storeFile=/Users/sikandersaleem/StudioProjects/cloudsolutions-atoms/android/AtomsSA-playStore.jks -storeFile=/Users/waseem/CsProjects/android/AtomsSA-playStore.jks +storeFile=AtomsSA-playStore.jks \ No newline at end of file diff --git a/lib/new_views/pages/land_page/land_page.dart b/lib/new_views/pages/land_page/land_page.dart index 51e3a009..30e3a0f1 100644 --- a/lib/new_views/pages/land_page/land_page.dart +++ b/lib/new_views/pages/land_page/land_page.dart @@ -11,17 +11,16 @@ import 'package:test_sa/extensions/context_extension.dart'; import 'package:test_sa/extensions/int_extensions.dart'; import 'package:test_sa/extensions/string_extensions.dart'; import 'package:test_sa/extensions/text_extensions.dart'; -import 'package:test_sa/extensions/widget_extensions.dart'; import 'package:test_sa/models/enums/user_types.dart'; import 'package:test_sa/new_views/app_style/app_color.dart'; import 'package:test_sa/new_views/common_widgets/app_filled_button.dart'; import 'package:test_sa/new_views/pages/land_page/calendar_page.dart'; import 'package:test_sa/new_views/pages/land_page/my_request/my_requests_page.dart'; -import 'package:test_sa/new_views/swipe_module/mark_attendance_widget.dart'; import 'package:test_sa/new_views/pages/settings_page.dart'; import 'package:test_sa/new_views/swipe_module/swipe_success_view.dart'; import 'package:test_sa/new_views/swipe_module/utils/swipe_general_utils.dart'; import 'package:test_sa/views/widgets/equipment/single_device_picker.dart'; + import '../../../controllers/providers/settings/setting_provider.dart'; import '../../../views/widgets/dialogs/dialog.dart'; import '../../common_widgets/app_bottom_nav_bar.dart'; @@ -49,7 +48,6 @@ class _LandPageState extends State { @override void initState() { _pages = []; - super.initState(); } @@ -103,19 +101,19 @@ class _LandPageState extends State { } } - Future checkNfcSupported() async { - isNfcSupported = await NfcManager.instance.isAvailable(); - setState(() {}); - } + // Future checkNfcSupported() async { + // isNfcSupported = await NfcManager.instance.isAvailable(); + // setState(() {}); + // } @override Widget build(BuildContext context) { if (_userProvider == null) { _userProvider = Provider.of(context, listen: false); // if (_userProvider.isUserConfirmSwipe) { - if (!_userProvider.user.employeeIsHMG) { - checkNfcSupported(); - } + // if (!_userProvider.user.employeeIsHMG) { + // checkNfcSupported(); + // } _pages = [ DashboardPage(onDrawerPress: (() { _scaffoldKey.currentState.isDrawerOpen ? _scaffoldKey.currentState.closeDrawer() : _scaffoldKey.currentState.openDrawer(); @@ -191,17 +189,18 @@ class _LandPageState extends State { ), if (userProvider.user != null && !userProvider.user.employeeIsHMG) Positioned( - right:_userProvider.user.type==UsersTypes.engineer? 20.toScreenWidth:null, - left:_userProvider.user.type!=UsersTypes.engineer? 20.toScreenWidth:null , + right: _userProvider.user.type == UsersTypes.engineer ? 20.toScreenWidth : null, + left: _userProvider.user.type != UsersTypes.engineer ? 20.toScreenWidth : null, bottom: 130.toScreenHeight, child: GestureDetector( - onTap: () { + onTap: () async { + isNfcSupported = await NfcManager.instance.isAvailable(); SwipeGeneralUtils.showSwipeTypeBottomSheetSheet(context: context, isNfcSupported: isNfcSupported); }, child: CircularAnimationWithProgressIndicator( child: Container( - width: 120.toScreenWidth, - height: 120.toScreenHeight, + width: 100.toScreenWidth, + height: 100.toScreenHeight, decoration: const BoxDecoration( shape: BoxShape.circle, color: AppColor.white, @@ -212,11 +211,22 @@ class _LandPageState extends State { children: [ 'swipe'.toSvgAsset(width: 32, height: 32), 8.height, - context.translation.checkIn.bodyText(context).custom(color: AppColor.neutral80), - 8.height, - userProvider.swipeTransactionModel != null && userProvider.swipeTransactionModel.swipeTime != null - ? SwipeGeneralUtils.formatTimeOnly(userProvider.swipeTransactionModel.swipeTime).bodyText(context).custom(color: AppColor.neutral80) - : '--:--'.bodyText(context).custom(color: AppColor.neutral80), + Text( + ("${context.translation.checkIn}\n${userProvider.swipeTransactionModel != null && userProvider.swipeTransactionModel.swipeTime != null ? SwipeGeneralUtils.formatTimeOnly(userProvider.swipeTransactionModel.swipeTime) : '--:--'}"), + style: AppTextStyles.bodyText2.copyWith(color: AppColor.neutral80, fontWeight: FontWeight.w500, fontFamily: "Poppins"), + ), + + // (context.translation.checkIn + + // "\n" + + // (userProvider.swipeTransactionModel != null && userProvider.swipeTransactionModel.swipeTime != null + // ? SwipeGeneralUtils.formatTimeOnly(userProvider.swipeTransactionModel.swipeTime) + // : '--:--')) + // .bodyText2(context) + // .custom(color: AppColor.neutral80), + // 8.height, + // userProvider.swipeTransactionModel != null && userProvider.swipeTransactionModel.swipeTime != null + // ? SwipeGeneralUtils.formatTimeOnly(userProvider.swipeTransactionModel.swipeTime).bodyText2(context).custom(color: AppColor.neutral80) + // : '--:--'.bodyText(context).custom(color: AppColor.neutral80), ], ), ), diff --git a/lib/new_views/swipe_module/swipe_success_view.dart b/lib/new_views/swipe_module/swipe_success_view.dart index 3b36e1af..8de8d847 100644 --- a/lib/new_views/swipe_module/swipe_success_view.dart +++ b/lib/new_views/swipe_module/swipe_success_view.dart @@ -76,8 +76,8 @@ class _CircularAnimationWithProgressIndicatorState ); }, child: SizedBox( - width: 120.toScreenHeight, - height: 120.toScreenWidth, + width: 100.toScreenHeight, + height: 100.toScreenWidth, child: const CircularProgressIndicator( strokeWidth: 3.0, backgroundColor: AppColor.primary30, diff --git a/lib/new_views/swipe_module/utils/swipe_general_utils.dart b/lib/new_views/swipe_module/utils/swipe_general_utils.dart index d430b29f..2d85c063 100644 --- a/lib/new_views/swipe_module/utils/swipe_general_utils.dart +++ b/lib/new_views/swipe_module/utils/swipe_general_utils.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:developer'; import 'dart:io'; -import 'package:flutter/cupertino.dart'; + import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:geolocator/geolocator.dart'; @@ -29,7 +29,6 @@ import 'package:test_sa/new_views/swipe_module/models/swipe_model.dart'; import 'package:test_sa/new_views/swipe_module/swipe_success_view.dart'; import 'package:test_sa/new_views/swipe_module/utils/location_utils.dart'; - class SwipeGeneralUtils { static bool _isLoadingVisible = false; @@ -178,7 +177,6 @@ class SwipeGeneralUtils { ); } - static void showErrorDialog({String message, @required BuildContext context}) { showDialog( context: context, @@ -214,7 +212,7 @@ class SwipeGeneralUtils { return Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: Colors.white, + color: isEnabled ? Colors.white : AppColor.white40, borderRadius: BorderRadius.circular(18), border: Border.all(color: AppColor.white40, width: 2), ), @@ -222,13 +220,12 @@ class SwipeGeneralUtils { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - icon.toSvgAsset(), - title.heading5(context).custom(color: AppColor.neutral50), + icon.toSvgAsset(color: isEnabled ? null : Colors.grey.withOpacity(0.5)), + title.heading5(context).custom(color: isEnabled ? AppColor.neutral50 : Colors.grey.withOpacity(0.5)), ], ), ).onPress( () { - log('isEnabled is ${!isEnabled}'); if (!isEnabled) return; onPress(); }, @@ -533,7 +530,7 @@ class SwipeGeneralUtils { @required bool isEnable, @required BuildContext context, }) async { - if (!(await isGoogleServicesAvailable())) { + if (!(await isGoogleServicesAvailable())) { checkHuaweiLocationPermission(attendanceType: swipeType, context: context); } else { LocationUtilities.isEnabled((bool isEnabled) { @@ -592,7 +589,7 @@ class SwipeGeneralUtils { static List availableAttendanceMethodList({@required BuildContext context, @required UserProvider userProvider, @required bool isNfcSupported}) { List availableMethods = []; if (userProvider.user.enableNFC) { - availableMethods.add(attendanceTypeCard(SwipeTypeEnum.NFC.name, 'nfc_icon', userProvider.user.enableNFC, () { + availableMethods.add(attendanceTypeCard(SwipeTypeEnum.NFC.name, 'nfc_icon', isNfcSupported, () { handleSwipe(swipeType: SwipeTypeEnum.NFC, isEnable: userProvider.user.enableNFC, context: navigatorKey.currentState.overlay.context); }, context)); } @@ -687,7 +684,6 @@ class SwipeGeneralUtils { // } } - // // static Widget getNoDataWidget(BuildContext context) { // return Column( @@ -906,4 +902,4 @@ class SwipeGeneralUtils { // } // } // return selectedDate; -// } \ No newline at end of file +// }