diff --git a/assets/images/logos/loading_moe.gif b/assets/images/logos/loading_moe.gif new file mode 100644 index 0000000..531de7e Binary files /dev/null and b/assets/images/logos/loading_moe.gif differ diff --git a/assets/images/logos/moe-logo.png b/assets/images/logos/moe-logo.png new file mode 100644 index 0000000..da66b11 Binary files /dev/null and b/assets/images/logos/moe-logo.png differ diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 96fd4b0..7740624 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -1,12 +1,10 @@ import 'package:mohem_flutter_app/ui/marathon/widgets/question_card.dart'; class ApiConsts { - //static String baseUrl = "http://10.200.204.20:2801/"; // Local server - // static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server - // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server - static String baseUrl = "https://hmgwebservices.com"; // Live server + static String baseUrl = "https://uathrmsys.moenergy.gov.sa"; //MOE UAT + // static String baseUrl = "https://hrmsys.moenergy.gov.sa"; // MOE ;LIVE + static String baseUrlServices = baseUrl + "/Services/"; // server - // static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/"; static String erpRest = baseUrlServices + "ERP.svc/REST/"; static String swpRest = baseUrlServices + "SWP.svc/REST/"; diff --git a/lib/classes/utils.dart b/lib/classes/utils.dart index 3368f83..8822123 100644 --- a/lib/classes/utils.dart +++ b/lib/classes/utils.dart @@ -98,7 +98,8 @@ class Utils { static void handleException(dynamic exception, cxt, Function(String)? onErrorMessage) { String errorMessage; - if (exception.error.errorType != null && exception.error.errorType == 4) { + print("exception:$exception"); + if (exception?.error?.errorType != null && exception.error.errorType == 4) { Navigator.pushNamedAndRemoveUntil(cxt, AppRoutes.appUpdateScreen, (_) => false, arguments: exception.error?.errorMessage); } else { if (exception is APIException) { diff --git a/lib/config/env.dart b/lib/config/env.dart index b78c5e4..38fa108 100644 --- a/lib/config/env.dart +++ b/lib/config/env.dart @@ -1,9 +1,8 @@ // ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars final -Map env = { - "appConfig": "lib/config/config_en.json", - - // Worklist (Dynamic ListView, Dynamic Forms, Dynamic Submission) +// link to generate dart class https://www.webinovers.com/web-tools/json-to-dart-convertor +Map _env = { + "appConfig": "lib/config/config_en.json", "login": { "verification": true, "verificationMethod": { @@ -21,6 +20,7 @@ Map env = { "monthlyAttendance": false, "vocationRules": false, }, + "itg": false, "marathon": false, "offersDiscount": false, "myTeams": false, @@ -32,4 +32,175 @@ Map env = { "chat": false, "monthlyAttendance": false, "vocationRules": false, + "canEdit": false, }; + +Env env = Env.fromJson(_env); + +class Env { + Env({ + required this.appConfig, + required this.login, + required this.bottomBar, + required this.dashboard, + required this.itg, + required this.marathon, + required this.offersDiscount, + required this.myTeams, + required this.modifiy, + required this.myRequest, + required this.pendingTransactions, + required this.myProfile, + required this.itemsForSale, + required this.chat, + required this.monthlyAttendance, + required this.vocationRules, + required this.canEdit, + }); + + late final String appConfig; + late final Login login; + late final bool bottomBar; + late final Dashboard dashboard; + late final bool itg; + late final bool marathon; + late final bool offersDiscount; + late final bool myTeams; + late final bool modifiy; + late final bool myRequest; + late final bool pendingTransactions; + late final bool myProfile; + late final bool itemsForSale; + late final bool chat; + late final bool monthlyAttendance; + late final bool vocationRules; + late final bool canEdit; + + Env.fromJson(Map json) { + appConfig = json['appConfig']; + login = Login.fromJson(json['login']); + bottomBar = json['bottomBar']; + dashboard = Dashboard.fromJson(json['dashboard']); + marathon = json['marathon']; + itg = json['itg']; + offersDiscount = json['offersDiscount']; + myTeams = json['myTeams']; + modifiy = json['modifiy']; + myRequest = json['myRequest']; + pendingTransactions = json['pendingTransactions']; + myProfile = json['myProfile']; + itemsForSale = json['itemsForSale']; + chat = json['chat']; + monthlyAttendance = json['monthlyAttendance']; + vocationRules = json['vocationRules']; + canEdit = json['canEdit']; + } + + Map toJson() { + var _data = {}; + _data['appConfig'] = appConfig; + _data['login'] = login.toJson(); + _data['bottomBar'] = bottomBar; + _data['dashboard'] = dashboard.toJson(); + _data['marathon'] = marathon; + _data['itg'] = itg; + _data['offersDiscount'] = offersDiscount; + _data['myTeams'] = myTeams; + _data['modifiy'] = modifiy; + _data['myRequest'] = myRequest; + _data['pendingTransactions'] = pendingTransactions; + _data['myProfile'] = myProfile; + _data['itemsForSale'] = itemsForSale; + _data['chat'] = chat; + _data['monthlyAttendance'] = monthlyAttendance; + _data['vocationRules'] = vocationRules; + _data['canEdit'] = canEdit; + return _data; + } +} + +class Login { + Login({ + required this.verification, + required this.verificationMethod, + required this.forgetPassword, + }); + + late final bool verification; + late final VerificationMethod verificationMethod; + late final bool forgetPassword; + + Login.fromJson(Map json) { + verification = json['verification']; + verificationMethod = VerificationMethod.fromJson(json['verificationMethod']); + forgetPassword = json['forgetPassword']; + } + + Map toJson() { + var _data = {}; + _data['verification'] = verification; + _data['verificationMethod'] = verificationMethod.toJson(); + _data['forgetPassword'] = forgetPassword; + return _data; + } +} + +class VerificationMethod { + VerificationMethod({ + required this.whatsapp, + }); + + late final bool whatsapp; + + VerificationMethod.fromJson(Map json) { + whatsapp = json['whatsapp']; + } + + Map toJson() { + var _data = {}; + _data['whatsapp'] = whatsapp; + return _data; + } +} + +class Dashboard { + Dashboard({ + required this.attendance, + required this.worklist, + required this.ticketBalance, + required this.leaveBalance, + required this.missingSwipe, + required this.monthlyAttendance, + required this.vocationRules, + }); + + late final bool attendance; + late final bool worklist; + late final bool ticketBalance; + late final bool leaveBalance; + late final bool missingSwipe; + late final bool monthlyAttendance; + late final bool vocationRules; + + Dashboard.fromJson(Map json) { + attendance = json['attendance']; + worklist = json['worklist']; + ticketBalance = json['ticketBalance']; + leaveBalance = json['leaveBalance']; + missingSwipe = json['missingSwipe']; + monthlyAttendance = json['monthlyAttendance']; + vocationRules = json['vocationRules']; + } + + Map toJson() { + var _data = {}; + _data['attendance'] = attendance; + _data['worklist'] = worklist; + _data['ticketBalance'] = ticketBalance; + _data['leaveBalance'] = leaveBalance; + _data['missingSwipe'] = missingSwipe; + _data['monthlyAttendance'] = monthlyAttendance; + _data['vocationRules'] = vocationRules; + return _data; + } +} diff --git a/lib/models/get_mobile_login_info_list_model.dart b/lib/models/get_mobile_login_info_list_model.dart index a2f7799..d544ef5 100644 --- a/lib/models/get_mobile_login_info_list_model.dart +++ b/lib/models/get_mobile_login_info_list_model.dart @@ -1,6 +1,6 @@ class GetMobileLoginInfoListModel { int? iD; - int? employeeID; + String? employeeID; int? channelID; int? companyID; String? deviceType; diff --git a/lib/provider/dashboard_provider_model.dart b/lib/provider/dashboard_provider_model.dart index a035403..9ca232c 100644 --- a/lib/provider/dashboard_provider_model.dart +++ b/lib/provider/dashboard_provider_model.dart @@ -103,11 +103,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { drawerMenuItemList = [ DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile), - DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation), - DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi), - DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions), - // DrawerMenuItem("assets/images/drawer/drawer_marathon.svg", LocaleKeys.brainMarathon.tr(), AppRoutes.marathonIntroScreen), - DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), AppRoutes.changePassword), + // DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation), + // DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi), + // DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions), + // // DrawerMenuItem("assets/images/drawer/drawer_marathon.svg", LocaleKeys.brainMarathon.tr(), AppRoutes.marathonIntroScreen), + // DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), AppRoutes.changePassword), + // ]; notifyListeners(); @@ -139,15 +140,17 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { getOpenNotificationsList = genericResponseModel?.getOpenNotificationsList; workListCounter = genericResponseModel?.pOPENNTFNUMBER ?? 0; - - itgFormsModel = await DashboardApiClient().getItgFormsPendingTask(); + if (env.itg) itgFormsModel = await DashboardApiClient().getItgFormsPendingTask(); workListCounter = workListCounter + (itgFormsModel?.totalCount ?? 0); - GenericResponseModel? cocGenericResponseModel = await DashboardApiClient().getCOCNotifications(); - cocCount = cocGenericResponseModel?.mohemmITGPendingTaskResponseItem; - if (cocCount != null) { - cocFinalCount = (cocCount?.escalation ?? 0) + (cocCount?.waitingToClose ?? 0) + (cocCount?.waitingForAcceptance ?? 0) + (cocCount?.extendTATRequest ?? 0); - workListCounter += cocFinalCount; + if (env.itg) { + GenericResponseModel? cocGenericResponseModel = await DashboardApiClient().getCOCNotifications(); + cocCount = cocGenericResponseModel?.mohemmITGPendingTaskResponseItem; + if (cocCount != null) { + cocFinalCount = (cocCount?.escalation ?? 0) + (cocCount?.waitingToClose ?? 0) + (cocCount?.waitingForAcceptance ?? 0) + (cocCount?.extendTATRequest ?? 0); + workListCounter += cocFinalCount; + } } + if (showLoading) Utils.hideLoading(context); notifyListeners(); } catch (ex) { @@ -210,12 +213,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { List menuList = await DashboardApiClient().getListMenu(); List findMyRequest = menuList.where((element) => element.menuType == "E").toList(); if (findMyRequest.isNotEmpty) { - drawerMenuItemList.insert(3, DrawerMenuItem("assets/images/drawer/my_requests.svg", LocaleKeys.myRequest.tr(), AppRoutes.myRequests)); + drawerMenuItemList.add(DrawerMenuItem("assets/images/drawer/my_requests.svg", LocaleKeys.myRequest.tr(), AppRoutes.myRequests)); } List findMyTeam = menuList.where((element) => element.menuType == "M").toList(); if (findMyTeam.isNotEmpty) { AppState().setempStatusIsManager = true; - drawerMenuItemList.insert(2, DrawerMenuItem("assets/images/drawer/my_team.svg", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam)); + drawerMenuItemList.add(DrawerMenuItem("assets/images/drawer/my_team.svg", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam)); } } catch (ex) { logger.wtf(ex); @@ -231,10 +234,10 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { homeMenus = parseMenus(getMenuEntriesList ?? []); if (homeMenus!.isNotEmpty) { - if(env["dashboard"]["monthlyAttendance"]) { + if (env.dashboard.monthlyAttendance) { homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr())); } - if(env["dashboard"]["vocationRules"]) { + if (env.dashboard.vocationRules) { homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requestType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr())); } } @@ -274,6 +277,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { MohemmItgResponseItem? res = await DashboardApiClient().getITGPageNotification(); return res; } + void notify() { notifyListeners(); } diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 2cf3320..27cd5ff 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -61,13 +61,13 @@ class _DashboardScreenState extends State with WidgetsBindingOb super.initState(); scheduleMicrotask(() { data = Provider.of(context, listen: false); - if (env["marathon"]) { + if (env.marathon) { marathonProvider = Provider.of(context, listen: false); } - if (env["chat"]) { + if (env.chat) { cProvider = Provider.of(context, listen: false); + _bHubCon(); } - _bHubCon(); _onRefresh(true); }); } @@ -141,21 +141,25 @@ class _DashboardScreenState extends State with WidgetsBindingOb // print(value.result!.data!.notificationTitle); // }); data.fetchListMenu(); - if (env["dashboard"]["attendance"]) { + if (env.dashboard.attendance) { data.fetchAttendanceTracking(context); } data.fetchWorkListCounter(context); - if (env["dashboard"]["missingSwipe"]) { + if (env.dashboard.missingSwipe) { data.fetchMissingSwipe(context); } data.fetchLeaveTicketBalance(context, DateTime.now()); data.fetchMenuEntries(); - data.getCategoryOffersListAPI(context); - if (env["marathon"]) { + if (env.offersDiscount) { + data.getCategoryOffersListAPI(context); + } + if (env.marathon) { marathonProvider.getMarathonDetailsFromApi(); } - - if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon(); + if (env.chat) { + marathonProvider.getMarathonDetailsFromApi(); + if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon(); + } _refreshController.refreshCompleted(); } @@ -239,12 +243,12 @@ class _DashboardScreenState extends State with WidgetsBindingOb }); }), Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded, - SvgPicture.asset( - "assets/images/announcements.svg", - matchTextDirection: true, - ).onPress(() async { - await Navigator.pushNamed(context, AppRoutes.announcements); - }) + // SvgPicture.asset( + // "assets/images/announcements.svg", + // matchTextDirection: true, + // ).onPress(() async { + // await Navigator.pushNamed(context, AppRoutes.announcements); + // }) ], ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), Expanded( @@ -269,119 +273,119 @@ class _DashboardScreenState extends State with WidgetsBindingOb 16.height, Row( children: [ - if (env["dashboard"]["attendance"]) - Expanded( - child: AspectRatio( - aspectRatio: 159 / 159, - child: Consumer( - builder: (BuildContext context, DashboardProviderModel model, Widget? child) { - return (model.isAttendanceTrackingLoading - ? GetAttendanceTrackingShimmer() - : Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15), - gradient: const LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [ - MyColors.gradiantEndColor, - MyColors.gradiantStartColor, - ]), - ), - child: Stack( - alignment: Alignment.center, - children: [ - if (model.isTimeRemainingInSeconds == 0) SvgPicture.asset("assets/images/thumb.svg"), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, + if (env.dashboard.attendance) + Expanded( + child: AspectRatio( + aspectRatio: 159 / 159, + child: Consumer( + builder: (BuildContext context, DashboardProviderModel model, Widget? child) { + return (model.isAttendanceTrackingLoading + ? GetAttendanceTrackingShimmer() + : Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + gradient: const LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [ + MyColors.gradiantEndColor, + MyColors.gradiantStartColor, + ]), + ), + child: Stack( + alignment: Alignment.center, + children: [ + if (model.isTimeRemainingInSeconds == 0) SvgPicture.asset("assets/images/thumb.svg"), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LocaleKeys.markAttendance.tr().toText14(color: Colors.white, isBold: true), + if (model.isTimeRemainingInSeconds == 0) DateTime.now().toString().split(" ")[0].toText12(color: Colors.white), + if (model.isTimeRemainingInSeconds != 0) + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 9.height, + Directionality( + textDirection: ui.TextDirection.ltr, + child: CountdownTimer( + endTime: model.endTime, + onEnd: null, + endWidget: "00:00:00".toText14(color: Colors.white, isBold: true), + textStyle: const TextStyle(color: Colors.white, fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold), + ), + ), + LocaleKeys.timeLeftToday.tr().toText12(color: Colors.white), + 9.height, + ClipRRect( + borderRadius: const BorderRadius.all(Radius.circular(20)), + child: LinearProgressIndicator( + value: model.progress, + minHeight: 8, + valueColor: const AlwaysStoppedAnimation(Colors.white), + backgroundColor: const Color(0xff196D73), + ), + ), + ], + ), + ], + ).paddingOnly(top: 12, right: 15, left: 12), + ), + Row( children: [ - LocaleKeys.markAttendance.tr().toText14(color: Colors.white, isBold: true), - if (model.isTimeRemainingInSeconds == 0) DateTime.now().toString().split(" ")[0].toText12(color: Colors.white), - if (model.isTimeRemainingInSeconds != 0) - Column( + Expanded( + child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - 9.height, - Directionality( - textDirection: ui.TextDirection.ltr, - child: CountdownTimer( - endTime: model.endTime, - onEnd: null, - endWidget: "00:00:00".toText14(color: Colors.white, isBold: true), - textStyle: const TextStyle(color: Colors.white, fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold), - ), - ), - LocaleKeys.timeLeftToday.tr().toText12(color: Colors.white), - 9.height, - ClipRRect( - borderRadius: const BorderRadius.all(Radius.circular(20)), - child: LinearProgressIndicator( - value: model.progress, - minHeight: 8, - valueColor: const AlwaysStoppedAnimation(Colors.white), - backgroundColor: const Color(0xff196D73), - ), - ), + LocaleKeys.checkIn.tr().toText12(color: Colors.white), + (model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn) + .toString() + .toText14(color: Colors.white, isBold: true), + 4.height, ], + ).paddingOnly(left: 12, right: 12), + ), + Container( + margin: EdgeInsets.only(top: AppState().isArabic(context) ? 6 : 0), + width: 45, + height: 45, + padding: const EdgeInsets.only(left: 10, right: 10), + decoration: BoxDecoration( + color: Color(0xff259EA4), + borderRadius: BorderRadius.only( + bottomRight: AppState().isArabic(context) ? Radius.circular(0) : Radius.circular(15), + bottomLeft: AppState().isArabic(context) ? Radius.circular(15) : Radius.circular(0), + ), ), + child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/attendance.svg" : "assets/images/attendance.svg"), + ).onPress(() { + showMyBottomSheet( + context, + callBackFunc: () {}, + child: MarkAttendanceWidget(model, isFromDashboard: true), + ); + }), ], - ).paddingOnly(top: 12, right: 15, left: 12), - ), - Row( - children: [ - Expanded( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - LocaleKeys.checkIn.tr().toText12(color: Colors.white), - (model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn) - .toString() - .toText14(color: Colors.white, isBold: true), - 4.height, - ], - ).paddingOnly(left: 12, right: 12), - ), - Container( - margin: EdgeInsets.only(top: AppState().isArabic(context) ? 6 : 0), - width: 45, - height: 45, - padding: const EdgeInsets.only(left: 10, right: 10), - decoration: BoxDecoration( - color: Color(0xff259EA4), - borderRadius: BorderRadius.only( - bottomRight: AppState().isArabic(context) ? Radius.circular(0) : Radius.circular(15), - bottomLeft: AppState().isArabic(context) ? Radius.circular(15) : Radius.circular(0), - ), - ), - child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/attendance.svg" : "assets/images/attendance.svg"), - ).onPress(() { - showMyBottomSheet( - context, - callBackFunc: () {}, - child: MarkAttendanceWidget(model, isFromDashboard: true), - ); - }), - ], - ), - ], - ), - ], - ), - ).onPress( - () { - Navigator.pushNamed(context, AppRoutes.todayAttendance); - }, - )) - .animatedSwither(); - }, + ), + ], + ), + ], + ), + ).onPress( + () { + Navigator.pushNamed(context, AppRoutes.todayAttendance); + }, + )) + .animatedSwither(); + }, + ), ), ), - ), - if (env["dashboard"]["attendance"]) 9.width, + if (env.dashboard.attendance) 9.width, Expanded( child: MenusWidget(), ), @@ -389,102 +393,105 @@ class _DashboardScreenState extends State with WidgetsBindingOb ), ], ).paddingOnly(left: 21, right: 21, top: 7, bottom: 21), - Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - LocaleKeys.offers.tr().toText12(), - Row( - children: [ - LocaleKeys.discounts.tr().toText24(isBold: true), - 6.width, - Container( - padding: const EdgeInsets.only(left: 8, right: 8), - decoration: BoxDecoration( - color: MyColors.yellowColor, - borderRadius: BorderRadius.circular(10), - ), - child: LocaleKeys.newString.tr().toText10(isBold: true)), - ], - ), - ], + Visibility( + visible: env.offersDiscount, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + LocaleKeys.offers.tr().toText12(), + Row( + children: [ + LocaleKeys.discounts.tr().toText24(isBold: true), + 6.width, + Container( + padding: const EdgeInsets.only(left: 8, right: 8), + decoration: BoxDecoration( + color: MyColors.yellowColor, + borderRadius: BorderRadius.circular(10), + ), + child: LocaleKeys.newString.tr().toText10(isBold: true)), + ], + ), + ], + ), ), - ), - LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() { - Navigator.pushNamed(context, AppRoutes.offersAndDiscounts); - }) - ], - ).paddingOnly(left: 21, right: 21), - Consumer( - builder: (BuildContext context, DashboardProviderModel model, Widget? child) { - return SizedBox( - height: 103 + 33, - child: ListView.separated( - shrinkWrap: true, - physics: const BouncingScrollPhysics(), - padding: const EdgeInsets.only(left: 21, right: 21, top: 13), - scrollDirection: Axis.horizontal, - itemBuilder: (BuildContext cxt, int index) { - return model.isOffersLoading - ? const OffersShimmerWidget() - : InkWell( - onTap: () { - navigateToDetails(data.getOffersList[index]); - }, - child: SizedBox( - width: 73, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: 73, - height: 73, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: const BorderRadius.all( - Radius.circular(100), - ), - border: Border.all(color: MyColors.lightGreyE3Color, width: 1), - ), - child: ClipRRect( - borderRadius: const BorderRadius.all( - Radius.circular(50), + LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() { + Navigator.pushNamed(context, AppRoutes.offersAndDiscounts); + }) + ], + ).paddingOnly(left: 21, right: 21), + Consumer( + builder: (BuildContext context, DashboardProviderModel model, Widget? child) { + return SizedBox( + height: 103 + 33, + child: ListView.separated( + shrinkWrap: true, + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.only(left: 21, right: 21, top: 13), + scrollDirection: Axis.horizontal, + itemBuilder: (BuildContext cxt, int index) { + return model.isOffersLoading + ? const OffersShimmerWidget() + : InkWell( + onTap: () { + navigateToDetails(data.getOffersList[index]); + }, + child: SizedBox( + width: 73, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 73, + height: 73, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: const BorderRadius.all( + Radius.circular(100), + ), + border: Border.all(color: MyColors.lightGreyE3Color, width: 1), ), - child: Hero( - tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!, - transitionOnUserGestures: true, - child: Image.network( - data.getOffersList[index].logo!, - fit: BoxFit.contain, + child: ClipRRect( + borderRadius: const BorderRadius.all( + Radius.circular(50), + ), + child: Hero( + tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!, + transitionOnUserGestures: true, + child: Image.network( + data.getOffersList[index].logo!, + fit: BoxFit.contain, + ), ), ), ), - ), - 4.height, - Expanded( - child: AppState().isArabic(context) - ? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1) - : data.getOffersList[index].titleEn!.toText12(isCenter: true, maxLine: 1), - ), - ], + 4.height, + Expanded( + child: AppState().isArabic(context) + ? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1) + : data.getOffersList[index].titleEn!.toText12(isCenter: true, maxLine: 1), + ), + ], + ), ), - ), - ); - }, - separatorBuilder: (BuildContext cxt, int index) => 8.width, - itemCount: 9), - ); - }, - ), - ], + ); + }, + separatorBuilder: (BuildContext cxt, int index) => 8.width, + itemCount: 9), + ); + }, + ), + ], + ), ), Container( width: double.infinity, @@ -497,9 +504,8 @@ class _DashboardScreenState extends State with WidgetsBindingOb child: Column( mainAxisSize: MainAxisSize.min, children: [ - - if (env["marathon"]) - context.watch().isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 8), + if (env.marathon) + context.watch().isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 8), ServicesWidget(), ], ), @@ -514,116 +520,116 @@ class _DashboardScreenState extends State with WidgetsBindingOb drawer: SafeArea( child: AppDrawer(onLanguageChange: _onRefresh), ), - bottomNavigationBar:!env["bottomBar"] + bottomNavigationBar: !env.bottomBar ? null : SizedBox( - height: Platform.isAndroid ? 70 : 100, - child: BottomNavigationBar( - items: [ - BottomNavigationBarItem( - icon: SvgPicture.asset( - "assets/icons/home.svg", - color: currentIndex == 0 ? MyColors.grey3AColor : MyColors.grey98Color, - ).paddingAll(4), - label: LocaleKeys.home.tr(), - ), - BottomNavigationBarItem( - icon: SvgPicture.asset( - "assets/icons/create_req.svg", - color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color, - ).paddingAll(4), - label: LocaleKeys.mowadhafhiRequest.tr(), - ), - BottomNavigationBarItem( - icon: Stack( - alignment: Alignment.centerLeft, - children: [ - SvgPicture.asset( - "assets/icons/work_list.svg", - color: currentIndex == 2 ? MyColors.grey3AColor : MyColors.grey98Color, - ).paddingAll(4), - Consumer( - builder: (BuildContext cxt, DashboardProviderModel data, Widget? child) { - if (data.workListCounter == 0) { - return const SizedBox(); - } - return Positioned( - right: 0, - top: 0, - child: Container( - padding: const EdgeInsets.only(left: 4, right: 4), - alignment: Alignment.center, - decoration: BoxDecoration(color: MyColors.redColor, borderRadius: BorderRadius.circular(17)), - child: data.workListCounter.toString().toText10(color: Colors.white), + height: Platform.isAndroid ? 70 : 100, + child: BottomNavigationBar( + items: [ + BottomNavigationBarItem( + icon: SvgPicture.asset( + "assets/icons/home.svg", + color: currentIndex == 0 ? MyColors.grey3AColor : MyColors.grey98Color, + ).paddingAll(4), + label: LocaleKeys.home.tr(), + ), + BottomNavigationBarItem( + icon: SvgPicture.asset( + "assets/icons/create_req.svg", + color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color, + ).paddingAll(4), + label: LocaleKeys.mowadhafhiRequest.tr(), + ), + BottomNavigationBarItem( + icon: Stack( + alignment: Alignment.centerLeft, + children: [ + SvgPicture.asset( + "assets/icons/work_list.svg", + color: currentIndex == 2 ? MyColors.grey3AColor : MyColors.grey98Color, + ).paddingAll(4), + Consumer( + builder: (BuildContext cxt, DashboardProviderModel data, Widget? child) { + if (data.workListCounter == 0) { + return const SizedBox(); + } + return Positioned( + right: 0, + top: 0, + child: Container( + padding: const EdgeInsets.only(left: 4, right: 4), + alignment: Alignment.center, + decoration: BoxDecoration(color: MyColors.redColor, borderRadius: BorderRadius.circular(17)), + child: data.workListCounter.toString().toText10(color: Colors.white), + ), + ); + }, ), - ); - }, + ], + ), + label: LocaleKeys.workList.tr(), ), - ], - ), - label: LocaleKeys.workList.tr(), - ), - BottomNavigationBarItem( - icon: SvgPicture.asset( - "assets/icons/item_for_sale.svg", - color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color, - ).paddingAll(4), - label: LocaleKeys.itemsForSale.tr(), - ), - BottomNavigationBarItem( - icon: Stack( - alignment: Alignment.centerLeft, - children: [ - SvgPicture.asset( - "assets/icons/chat/chat.svg", - color: currentIndex == 4 - ? MyColors.grey3AColor - : cProvider.disbaleChatForThisUser - ? MyColors.lightGreyE3Color - : MyColors.grey98Color, - ).paddingAll(4), - Consumer( - builder: (BuildContext cxt, ChatProviderModel data, Widget? child) { - return Positioned( - right: 0, - top: 0, - child: Container( - padding: const EdgeInsets.only(left: 4, right: 4), - alignment: Alignment.center, - decoration: BoxDecoration(color: cProvider.disbaleChatForThisUser ? MyColors.pinkDarkColor : MyColors.redColor, borderRadius: BorderRadius.circular(17)), - child: data.chatUConvCounter.toString().toText10(color: Colors.white), + BottomNavigationBarItem( + icon: SvgPicture.asset( + "assets/icons/item_for_sale.svg", + color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color, + ).paddingAll(4), + label: LocaleKeys.itemsForSale.tr(), + ), + BottomNavigationBarItem( + icon: Stack( + alignment: Alignment.centerLeft, + children: [ + SvgPicture.asset( + "assets/icons/chat/chat.svg", + color: currentIndex == 4 + ? MyColors.grey3AColor + : cProvider.disbaleChatForThisUser + ? MyColors.lightGreyE3Color + : MyColors.grey98Color, + ).paddingAll(4), + Consumer( + builder: (BuildContext cxt, ChatProviderModel data, Widget? child) { + return Positioned( + right: 0, + top: 0, + child: Container( + padding: const EdgeInsets.only(left: 4, right: 4), + alignment: Alignment.center, + decoration: BoxDecoration(color: cProvider.disbaleChatForThisUser ? MyColors.pinkDarkColor : MyColors.redColor, borderRadius: BorderRadius.circular(17)), + child: data.chatUConvCounter.toString().toText10(color: Colors.white), + ), + ); + }, ), - ); - }, + ], + ), + label: LocaleKeys.chat.tr(), ), ], + currentIndex: currentIndex, + selectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey3AColor, fontWeight: FontWeight.w600), + unselectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey98Color, fontWeight: FontWeight.w600), + type: BottomNavigationBarType.fixed, + selectedItemColor: MyColors.grey3AColor, + backgroundColor: MyColors.backgroundColor, + selectedIconTheme: const IconThemeData(color: MyColors.grey3AColor, size: 28), + unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28), + onTap: (int index) { + if (index == 1) { + Navigator.pushNamed(context, AppRoutes.mowadhafhi); + } else if (index == 2) { + Navigator.pushNamed(context, AppRoutes.workList); + } else if (index == 3) { + Navigator.pushNamed(context, AppRoutes.itemsForSale); + } else if (index == 4) { + if (!cProvider.disbaleChatForThisUser) { + Navigator.pushNamed(context, AppRoutes.chat); + } + } + }, ), - label: LocaleKeys.chat.tr(), ), - ], - currentIndex: currentIndex, - selectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey3AColor, fontWeight: FontWeight.w600), - unselectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey98Color, fontWeight: FontWeight.w600), - type: BottomNavigationBarType.fixed, - selectedItemColor: MyColors.grey3AColor, - backgroundColor: MyColors.backgroundColor, - selectedIconTheme: const IconThemeData(color: MyColors.grey3AColor, size: 28), - unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28), - onTap: (int index) { - if (index == 1) { - Navigator.pushNamed(context, AppRoutes.mowadhafhi); - } else if (index == 2) { - Navigator.pushNamed(context, AppRoutes.workList); - } else if (index == 3) { - Navigator.pushNamed(context, AppRoutes.itemsForSale); - } else if (index == 4) { - if (!cProvider.disbaleChatForThisUser) { - Navigator.pushNamed(context, AppRoutes.chat); - } - } - }, - ), - ), ); } diff --git a/lib/ui/landing/widget/app_drawer.dart b/lib/ui/landing/widget/app_drawer.dart index 7df697c..eac55e5 100644 --- a/lib/ui/landing/widget/app_drawer.dart +++ b/lib/ui/landing/widget/app_drawer.dart @@ -117,9 +117,10 @@ class _AppDrawerState extends State { Navigator.pushNamed(context, drawerMenuItemList[index].routeName); }); }), - menuItem("assets/images/drawer/employee_id.svg", LocaleKeys.employeeDigitalID.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: EmployeeDigitialIdDialog())), - if (AppState().businessCardPrivilege) - menuItem("assets/images/drawer/view_business_card.svg", LocaleKeys.viewBusinessCard.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: BusinessCardDialog())), + // menuItem("assets/images/drawer/employee_id.svg", LocaleKeys.employeeDigitalID.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: EmployeeDigitialIdDialog())), + // if (AppState().businessCardPrivilege) + // menuItem("assets/images/drawer/view_business_card.svg", LocaleKeys.viewBusinessCard.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: BusinessCardDialog())), + // menuItem("assets/images/drawer/logout.svg", LocaleKeys.logout.tr(), "", color: MyColors.redA3Color, closeDrawer: false, onPress: performLogout), // menuItem("assets/images/drawer/logout.svg", LocaleKeys.logout.tr(), "", color: MyColors.redA3Color, closeDrawer: false, onPress: () {Navigator.pushNamed(context, AppRoutes.survey,); ], diff --git a/lib/ui/landing/widget/menus_widget.dart b/lib/ui/landing/widget/menus_widget.dart index 51cb3c7..2a0f2be 100644 --- a/lib/ui/landing/widget/menus_widget.dart +++ b/lib/ui/landing/widget/menus_widget.dart @@ -53,7 +53,7 @@ class MenusWidget extends StatelessWidget { ).onPress(() { Navigator.pushNamed(context, AppRoutes.workList); }), - if(env["dashboard"]["missingSwipe"]) + if(env.dashboard.missingSwipe) data.isMissingSwipeLoading ? MenuShimmer().onPress(() { data.fetchWorkListCounter(context); @@ -108,7 +108,7 @@ class MenusWidget extends StatelessWidget { ).onPress(() { Navigator.pushNamed(context, AppRoutes.leaveBalance); }), - if(env["dashboard"]["ticketBalance"]) + if(env.dashboard.ticketBalance) data.isLeaveTicketBalanceLoading ? MenuShimmer().onPress(() { data.fetchWorkListCounter(context); diff --git a/lib/ui/landing/widget/services_widget.dart b/lib/ui/landing/widget/services_widget.dart index cf79e70..b93035f 100644 --- a/lib/ui/landing/widget/services_widget.dart +++ b/lib/ui/landing/widget/services_widget.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:easy_localization/src/public_ext.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -69,7 +71,10 @@ class ServicesWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - SvgPicture.asset(AppState().isArabic(context) ? getMenuIconAr(data.homeMenus![parentIndex].menuEntiesList[index].prompt!) : getMenuIconEn(data.homeMenus![parentIndex].menuEntiesList[index].prompt!)), + Image.memory( + Base64Decoder().convert(data.homeMenus![parentIndex].menuEntiesList[index].icon ?? ""), + scale: 1.25, + ), Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart index d513868..416784c 100644 --- a/lib/ui/login/login_screen.dart +++ b/lib/ui/login/login_screen.dart @@ -125,7 +125,7 @@ class _LoginScreenState extends State { Future checkPrefs() async { String username = await Utils.getStringFromPrefs(SharedPrefsConsts.username); - if (username.isNotEmpty) { + if (!username.isNotEmpty) { // for test purpose i added ! String password = await Utils.getStringFromPrefs(SharedPrefsConsts.password); // String firebaseToken = await Utils.getStringFromPrefs(SharedPrefsConsts.firebaseToken); // print("firebaseToken:$firebaseToken"); @@ -166,22 +166,29 @@ class _LoginScreenState extends State { } } - @override Widget build(BuildContext context) { if (isAppOpenBySystem == null) { isAppOpenBySystem = (ModalRoute.of(context)!.settings.arguments ?? true) as bool; if (!kReleaseMode) { - // username.text = "15444"; // Maha User - // username.text = "15153"; // Tamer User - // password.text = "Abcd@1234"; - - - username.text = "SRCA4779T"; // Hashim User - password.text = "a12345"; + username.text = "1100313582"; // Tamer User + password.text = "moe123456"; - username.text = "SRCA04101"; // Hashim User - password.text = "a123456"; + // 1) Normal user : + // Username: 1100313582 + // Employee # and Name: 210624 - شهد خالد ابراهيم الشامخ + // Password: moe123456 + // + // 2) Normal user : + // Username: 1002528733 + // Employee # and Name: 221142 - فؤاد محمدامين بكر موسى + // moe123456 + // + // + // 3) HR User Account + // Username: 1087779144 + // Employee # and Name: 190089 - عبدالله عبدالرحمن محمد الشهري + // Password: moe123456 } if (isAppOpenBySystem!) checkFirebaseToken(); } @@ -232,7 +239,7 @@ class _LoginScreenState extends State { 12.height, InputWidget(LocaleKeys.password.tr(), "xxxxxx", password, isTextIsPassword: true), 9.height, - if (env["login"]["forgetPassword"]) + if (env.login.forgetPassword) Align( alignment: Alignment.centerRight, child: LocaleKeys.forgotPassword.tr().toText12(isUnderLine: true, color: MyColors.textMixColor).onPress(() { diff --git a/lib/ui/login/verify_last_login_screen.dart b/lib/ui/login/verify_last_login_screen.dart index 6892dd1..c704fa4 100644 --- a/lib/ui/login/verify_last_login_screen.dart +++ b/lib/ui/login/verify_last_login_screen.dart @@ -11,6 +11,7 @@ import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/date_uitl.dart'; import 'package:mohem_flutter_app/classes/utils.dart'; +import 'package:mohem_flutter_app/config/env.dart'; import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/dialogs/otp_dialog.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart'; @@ -141,7 +142,7 @@ class _VerifyLastLoginScreenState extends State { children: [ if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(3), if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(4), - getButton(2), + if (env.login.verificationMethod.whatsapp) getButton(2), getButton(1), ], ) diff --git a/lib/ui/login/verify_login_screen.dart b/lib/ui/login/verify_login_screen.dart index 6cce7c1..a06560a 100644 --- a/lib/ui/login/verify_login_screen.dart +++ b/lib/ui/login/verify_login_screen.dart @@ -79,7 +79,7 @@ class _VerifyLoginScreenState extends State { children: [ if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(3), if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(4), - if (env["login"]["verificationMethod"]["whatsapp"]) getButton(2), + if (env.login.verificationMethod.whatsapp) getButton(2), getButton(1), ], ) @@ -620,7 +620,7 @@ class _VerifyLoginScreenState extends State { int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""), (value, TextEditingController _pinPutController) async { Utils.showLoading(context); - try { + try { GenericResponseModel? genericResponseModel = await LoginApiClient().checkActivationCode(true, AppState().memberLoginList?.pMOBILENUMBER, value, AppState().getUserName); GenericResponseModel? genericResponseModel1 = await LoginApiClient().insertMobileLoginInfoNEW( AppState().memberLoginList?.pEMAILADDRESS ?? "", @@ -638,13 +638,13 @@ class _VerifyLoginScreenState extends State { AppState().setMemberInformationListModel = genericResponseModel.memberInformationList?.first; MemberInformationListModel.saveToPrefs(genericResponseModel.memberInformationList ?? []); PrivilegeListModel.saveToPrefs(genericResponseModel.privilegeList ?? []); - AppState().setMohemmWifiSSID = genericResponseModel.mohemmWifiSSID; - AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword; - AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword; + // AppState().setMohemmWifiSSID = genericResponseModel.mohemmWifiSSID; + // AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword; + // AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword; Utils.saveStringFromPrefs(SharedPrefsConsts.username, AppState().getUserName!); Utils.saveStringFromPrefs(SharedPrefsConsts.password, AppState().password!); - Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiSSID, genericResponseModel.mohemmWifiSSID!); - Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiPassword, genericResponseModel.mohemmWifiPassword!); + // Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiSSID, genericResponseModel.mohemmWifiSSID ?? ""); + // Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiPassword, genericResponseModel.mohemmWifiPassword!); } Utils.hideLoading(context); Navigator.pop(context); diff --git a/lib/ui/profile/contact_details.dart b/lib/ui/profile/contact_details.dart index 749978e..c8631a7 100644 --- a/lib/ui/profile/contact_details.dart +++ b/lib/ui/profile/contact_details.dart @@ -5,6 +5,7 @@ import 'package:mohem_flutter_app/api/profile_api_client.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/utils.dart'; +import 'package:mohem_flutter_app/config/env.dart'; import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart'; @@ -100,6 +101,7 @@ class _ContactDetailsState extends State { ), separatorBuilder: (cxt, index) => 12.height, itemCount: getEmployeePhonesList.length), + if(env.canEdit) if (menuEntriesPhone.updateButton == 'Y') AppState().isArabic(context) ? Positioned( @@ -131,6 +133,7 @@ class _ContactDetailsState extends State { ), separatorBuilder: (cxt, index) => 12.height, itemCount: getEmployeeAddressList.length), + if(env.canEdit) if (menuEntriesAddress.updateButton == 'Y') AppState().isArabic(context) ? Positioned( @@ -148,6 +151,7 @@ class _ContactDetailsState extends State { else Stack( children: [ + if(env.canEdit) if (menuEntriesAddress.addButton == 'Y') AppState().isArabic(context) ? Positioned( diff --git a/lib/ui/profile/widgets/profile_info.dart b/lib/ui/profile/widgets/profile_info.dart index 73635d8..999b7cf 100644 --- a/lib/ui/profile/widgets/profile_info.dart +++ b/lib/ui/profile/widgets/profile_info.dart @@ -29,7 +29,7 @@ class ProfileInFo extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ 16.height, - memberInfo.eMPLOYEENAME!.toText22(), + memberInfo.eMPLOYEENAME!.toText22(isCentered: true), ("${memberInfo.eMPLOYEENUMBER!} | ${memberInfo.getPositionName()}").toText13(color: MyColors.grey80Color), memberInfo.eMPLOYEEEMAILADDRESS!.toText13(), 12.height, diff --git a/lib/widgets/app_logo.dart b/lib/widgets/app_logo.dart index 3140c29..37c7997 100644 --- a/lib/widgets/app_logo.dart +++ b/lib/widgets/app_logo.dart @@ -13,7 +13,7 @@ class AppLogo extends StatelessWidget { return Row( children: [ SvgPicture.asset( - "assets/mohemm_logo.svg", + "assets/moe_logo.svg", height: 48, width: 48, alignment: Alignment.centerRight, diff --git a/lib/widgets/loading_dialog.dart b/lib/widgets/loading_dialog.dart index 9c88a39..4e71581 100644 --- a/lib/widgets/loading_dialog.dart +++ b/lib/widgets/loading_dialog.dart @@ -36,7 +36,7 @@ class _LoadingDialogState extends State { textDirection: TextDirection.rtl, child: Center( child: Image.asset( - "assets/images/logos/loading_mohemm_logo.gif", + "assets/images/logos/loading_moe.gif", height: 96.0, width: 96.0, ),