diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 097512f..1dede0d 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -67,6 +67,7 @@ "whatsapp": "واتس اب", "reject": "يرفض", "approve": "يوافق", + "attendanceDetails": "تفاصيل الحضور", "msg": "Hello {} in the {} world ", "msg_named": "{} are written in the {lang} language", "clickMe": "Click me", diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index a95e5b4..ca8e2f0 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -1,7 +1,7 @@ class ApiConsts { //static String baseUrl = "http://10.200.204.20:2801/"; // Local server - static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server - // static String baseUrl = "https://hmgwebservices.com"; // Live server + // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server + static String baseUrl = "https://hmgwebservices.com"; // Live server static String baseUrlServices = baseUrl + "/Services/"; // server // static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/"; diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index 31f8374..5169f19 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -9,8 +9,6 @@ extension WidgetExtensions on Widget { Widget get center => Center(child: this); - Widget get expanded => Expanded(child: this); - Widget paddingAll(double _value) => Padding(padding: EdgeInsets.all(_value), child: this); Widget paddingOnly({double left = 0.0, double right = 0.0, double top = 0.0, double bottom = 0.0}) => diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 55e543b..d4772d0 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1,6 +1,6 @@ // DO NOT EDIT. This is code generated via package:easy_localization/generate.dart -abstract class LocaleKeys { +abstract class LocaleKeys { static const mohemm = 'mohemm'; static const english = 'english'; static const arabic = 'arabic'; @@ -53,6 +53,7 @@ abstract class LocaleKeys { static const confirm = 'confirm'; static const passwordChangedSuccessfully = 'passwordChangedSuccessfully'; static const itemsForSale = 'itemsForSale'; + static const attendanceDetails = 'attendanceDetails'; static const doNotUseRecentPassword = 'doNotUseRecentPassword'; static const atLeastOneLowercase = 'atLeastOneLowercase'; static const atLeastOneUppercase = 'atLeastOneUppercase'; @@ -65,14 +66,14 @@ abstract class LocaleKeys { static const fingerPrint = 'fingerPrint'; static const face = 'face'; static const whatsapp = 'whatsapp'; + static const reject = 'reject'; + static const approve = 'approve'; static const msg = 'msg'; static const msg_named = 'msg_named'; static const clickMe = 'clickMe'; static const human = 'human'; static const resources = 'resources'; static const details = 'details'; - static const reject = 'reject'; - static const approve = 'approve'; static const profile_reset_password_label = 'profile.reset_password.label'; static const profile_reset_password_username = 'profile.reset_password.username'; static const profile_reset_password_password = 'profile.reset_password.password'; @@ -83,4 +84,5 @@ abstract class LocaleKeys { static const gender_with_arg = 'gender.with_arg'; static const gender = 'gender'; static const reset_locale = 'reset_locale'; + } diff --git a/lib/ui/attendance/monthly_attendance.dart b/lib/ui/attendance/monthly_attendance.dart index ff370a3..38547c5 100644 --- a/lib/ui/attendance/monthly_attendance.dart +++ b/lib/ui/attendance/monthly_attendance.dart @@ -231,7 +231,7 @@ class _MonthlyAttendanceState extends State { ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [title.toText10(color: MyColors.darkTextColor).expanded, value.toText20(color: MyColors.darkTextColor)], + children: [title.toText10(color: MyColors.darkTextColor).expanded, value.toText16(color: MyColors.darkTextColor)], ), ), ).expanded; @@ -243,7 +243,7 @@ class _MonthlyAttendanceState extends State { headerHeight: 0, todayHighlightColor: MyColors.grey3AColor, viewHeaderStyle: const ViewHeaderStyle( - dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600), + dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600), ), monthCellBuilder: (cxt, build) { int val = build.date.day % 4; @@ -273,7 +273,7 @@ class _MonthlyAttendanceState extends State { alignment: Alignment.center, child: Text( "${build.date.day}", - style: const TextStyle( + style: const TextStyle( fontSize: 13, fontWeight: FontWeight.w500, color: MyColors.white, @@ -297,7 +297,7 @@ class _MonthlyAttendanceState extends State { alignment: Alignment.center, child: Text( "${build.date.day}", - style: const TextStyle( + style: const TextStyle( fontSize: 13, fontWeight: FontWeight.w500, color: MyColors.white, @@ -321,7 +321,7 @@ class _MonthlyAttendanceState extends State { alignment: Alignment.center, child: Text( "${build.date.day}", - style: const TextStyle( + style: const TextStyle( fontSize: 13, fontWeight: FontWeight.w500, color: Color(0xff1F2428), @@ -338,7 +338,7 @@ class _MonthlyAttendanceState extends State { alignment: Alignment.center, child: Text( "${build.date.day}", - style: const TextStyle( + style: const TextStyle( fontSize: 13, fontWeight: FontWeight.w500, color: MyColors.greyA5Color, diff --git a/lib/ui/landing/dashboard.dart b/lib/ui/landing/dashboard.dart index feb405d..15b8e29 100644 --- a/lib/ui/landing/dashboard.dart +++ b/lib/ui/landing/dashboard.dart @@ -68,56 +68,59 @@ class _DashboardState extends State { return Scaffold( body: Column( children: [ - Row( - children: [ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - CircularAvatar( - width: 34, - height: 34, - url: - "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png", - ), - 8.width, - SvgPicture.asset("assets/images/side_nav.svg"), - ], - ).onPress(() {}), - Expanded( - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, + Container( + color: Colors.red, + child: Row( + children: [ + Row( mainAxisSize: MainAxisSize.min, children: [ - //AppLogo(), + CircularAvatar( + width: 34, + height: 34, + url: + "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png", + ), 8.width, - LocaleKeys.mohemm.tr().toText14() - ], - ), - ), - SizedBox( - width: 36, - height: 36, - child: Stack( - alignment: Alignment.centerLeft, - children: [ - SvgPicture.asset("assets/images/announcements.svg"), - Positioned( - right: 0, - top: 0, - child: Container( - padding: const EdgeInsets.only(left: 5, right: 5), - decoration: BoxDecoration( - color: MyColors.redColor, - borderRadius: BorderRadius.circular(17)), - child: "3".toText12(color: Colors.white), - ), - ) + SvgPicture.asset("assets/images/side_nav.svg"), ], + ).onPress(() {}), + Expanded( + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + //AppLogo(), + 8.width, + LocaleKeys.mohemm.tr().toText14() + ], + ), ), - ) - ], - ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), + SizedBox( + width: 36, + height: 36, + child: Stack( + alignment: Alignment.centerLeft, + children: [ + SvgPicture.asset("assets/images/announcements.svg"), + Positioned( + right: 0, + top: 0, + child: Container( + padding: const EdgeInsets.only(left: 5, right: 5), + decoration: BoxDecoration( + color: MyColors.redColor, + borderRadius: BorderRadius.circular(17)), + child: "3".toText12(color: Colors.white), + ), + ) + ], + ), + ) + ], + ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), + ), Expanded( child: ListView( padding: EdgeInsets.zero, diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index c54dc05..668d3ce 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -96,7 +96,9 @@ class _DashboardScreenState extends State { ], ), ).onPress(() { - data.update(); + // data.update(); + Navigator.pushNamed( + context, AppRoutes.monthlyAttendance); }) ], ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart index ad4e3c2..81882c7 100644 --- a/lib/ui/login/login_screen.dart +++ b/lib/ui/login/login_screen.dart @@ -128,11 +128,11 @@ class _LoginScreenState extends State { @override Widget build(BuildContext context) { - username.text = "15153"; - password.text = "Xy12345@"; + // username.text = "15153"; + // password.text = "Xy12345@"; - // username.text = "287742"; - // password.text = "509@Shafi"; + username.text = "287742"; + password.text = "509@Shafi"; return Scaffold( body: Column( children: [ diff --git a/lib/ui/login/verify_last_login_screen.dart b/lib/ui/login/verify_last_login_screen.dart index 3a7ce86..4124312 100644 --- a/lib/ui/login/verify_last_login_screen.dart +++ b/lib/ui/login/verify_last_login_screen.dart @@ -118,9 +118,9 @@ class _VerifyLastLoginScreenState extends State { shrinkWrap: true, children: [ getButton(3), + getButton(4), getButton(2), getButton(1), - getButton(4), ], ) ], @@ -225,7 +225,7 @@ class _VerifyLastLoginScreenState extends State { }); } else { Utils.showLoading(context); - if (_flag == 2 || _flag == 3) { + if (_flag == 4 || _flag == 3) { bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); if (authenticateWithFaceAndTouchID) { Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route route) => false); @@ -305,11 +305,11 @@ class _VerifyLastLoginScreenState extends State { Widget getButton(int flag) { switch (flag) { - case 4: + case 2: return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null); case 1: return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null); - case 2: + case 4: return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index); case 3: return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index); diff --git a/lib/ui/login/verify_login_screen.dart b/lib/ui/login/verify_login_screen.dart index 7db2151..c208f1d 100644 --- a/lib/ui/login/verify_login_screen.dart +++ b/lib/ui/login/verify_login_screen.dart @@ -140,9 +140,9 @@ class _VerifyLoginScreenState extends State { shrinkWrap: true, children: [ getButton(3), + getButton(4), getButton(2), getButton(1), - getButton(4), ], ) ], @@ -648,7 +648,7 @@ class _VerifyLoginScreenState extends State { } else { try { Utils.showLoading(context); - if (_flag == 2 || _flag == 3) { + if (_flag == 4 || _flag == 3) { bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics(); if (!authenticateWithFaceAndTouchID) { return; @@ -735,11 +735,11 @@ class _VerifyLoginScreenState extends State { Widget getButton(int flag) { switch (flag) { - case 4: + case 2: return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null); case 1: return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null); - case 2: + case 4: return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index); case 3: return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index); diff --git a/lib/widgets/app_bar_widget.dart b/lib/widgets/app_bar_widget.dart index f079f7f..5f021d1 100644 --- a/lib/widgets/app_bar_widget.dart +++ b/lib/widgets/app_bar_widget.dart @@ -21,7 +21,7 @@ AppBar AppBarWidget(BuildContext context, {required String title, bool showHomeB child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor), ), 4.width, - title.toText24(color: MyColors.darkTextColor, isBold: true, considerHeight: false).expanded, + title.toText24(color: MyColors.darkTextColor, isBold: true).expanded, ], ), centerTitle: false,