diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 3f1461b..5f40cbc 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -1,7 +1,7 @@ { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "تسجيل الدخول", "pleaseEnterLoginDetails": "الرجاء إدخال التفاصيل أدناه لتسجيل الدخول", "username": "اسم المستخدم", diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 23b7d3e..c0cf46d 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1,7 +1,7 @@ { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "Login", "pleaseEnterLoginDetails": "Please enter the detail below to login", "username": "Username", diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 564a61f..645aaf8 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/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index f48e420..4688cd3 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -17,7 +17,7 @@ class CodegenLoader extends AssetLoader{ static const Map ar_SA = { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "تسجيل الدخول", "pleaseEnterLoginDetails": "الرجاء إدخال التفاصيل أدناه لتسجيل الدخول", "username": "اسم المستخدم", @@ -27,6 +27,7 @@ class CodegenLoader extends AssetLoader{ "lastLoginDetails": "تفاصيل تسجيل الدخول الأخير:", "verificationType": "نوع التحقق:", "pleaseVerify": "ارجوك تحقق", + "pleaseVerifyForBio": "الرجاء التحقق من تسجيل الدخول باستخدام أحد هذه الخيارات", "verifyThroughFace": "تحقق من خلال الوجه", "verifyThroughFingerprint": "تحقق من خلال بصمة الإصبع", "verifyThroughSMS": "تحقق من خلال الرسائل القصيرة", @@ -420,7 +421,7 @@ class CodegenLoader extends AssetLoader{ "addFavoriteList": "هل تريد اضافة {name} لقائمة المفضله", "feedbackUserExperience": "هذا للحصول على تعليقات حول تجربة المستخدم", "rateUI": ".1 كيف تريد تقييم التطبيق", - "Submit Survey": "ارسال الاستبيان", + "submitSurvey": "ارسال الاستبيان", "typeHere": "اكتب هنا", "profile": { "reset_password": { @@ -459,7 +460,7 @@ class CodegenLoader extends AssetLoader{ static const Map en_US = { "mohemm": "Mohemm", "english": "English", - "arabic": "Arabic", + "arabic": "عربي", "login": "Login", "pleaseEnterLoginDetails": "Please enter the detail below to login", "username": "Username", @@ -469,6 +470,7 @@ static const Map en_US = { "lastLoginDetails": "Last Login Details:", "verificationType": "Verification Type:", "pleaseVerify": "Please Verify", + "pleaseVerifyForBio": "Please verify login with one of the following options", "verifyThroughFace": "Verify Through Face", "verifyThroughFingerprint": "Verify Through Fingerprint", "verifyThroughSMS": "Verify Through SMS", @@ -862,7 +864,7 @@ static const Map en_US = { "addFavoriteList": "Do you want to add {name} in your favorite list", "feedbackUserExperience": "This is to get the feedback about the user experience", "rateUI": "1. How would you rate this UI?", - "Submit Survey": "Submit Survey", + "submitSurvey": "Submit Survey", "typeHere": "Type here", "profile": { "reset_password": { diff --git a/lib/ui/landing/widget/app_drawer.dart b/lib/ui/landing/widget/app_drawer.dart index d2203f9..ea6343b 100644 --- a/lib/ui/landing/widget/app_drawer.dart +++ b/lib/ui/landing/widget/app_drawer.dart @@ -124,7 +124,7 @@ class _AppDrawerState extends State { 9.width, title.toText14(color: color).expanded ], - ).paddingOnly(left: 21, top: 10, bottom: 10).onPress(closeDrawer + ).paddingOnly(left: 21, top: 10, bottom: 10, right: 21).onPress(closeDrawer ? () async { Navigator.pop(context); Future.delayed(const Duration(microseconds: 200), onPress); diff --git a/lib/ui/landing/widget/menus_widget.dart b/lib/ui/landing/widget/menus_widget.dart index 91723ee..6e550ec 100644 --- a/lib/ui/landing/widget/menus_widget.dart +++ b/lib/ui/landing/widget/menus_widget.dart @@ -1,6 +1,7 @@ import 'package:easy_localization/src/public_ext.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; @@ -43,7 +44,11 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), + ], ) ], @@ -70,7 +75,10 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), ], ) ], @@ -97,7 +105,10 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.leaveBalance.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), ], ) ], @@ -124,7 +135,10 @@ class MenusWidget extends StatelessWidget { Expanded( child: data.ticketBalance.toString().toText16(color: Colors.white, isBold: true, maxlines: 1), ), - SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white) + ), ], ) ], diff --git a/lib/ui/landing/widget/services_widget.dart b/lib/ui/landing/widget/services_widget.dart index 28b505f..7a6e976 100644 --- a/lib/ui/landing/widget/services_widget.dart +++ b/lib/ui/landing/widget/services_widget.dart @@ -1,6 +1,7 @@ import 'package:easy_localization/src/public_ext.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:mohem_flutter_app/app_state/app_state.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'; @@ -75,7 +76,11 @@ class ServicesWidget extends StatelessWidget { Expanded( child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText10(isBold: true), ), - SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4) + ), + ], ) ], diff --git a/lib/ui/my_attendance/services_menu_list_screen.dart b/lib/ui/my_attendance/services_menu_list_screen.dart index 4e4745a..fe82058 100644 --- a/lib/ui/my_attendance/services_menu_list_screen.dart +++ b/lib/ui/my_attendance/services_menu_list_screen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.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/routes.dart'; @@ -39,7 +40,7 @@ class ServicesMenuListScreen extends StatelessWidget { ? Utils.getNoDataWidget(context) : ListView.separated( padding: const EdgeInsets.all(21), - itemBuilder: (cxt, index) => itemView("assets/images/pdf.svg", servicesMenuData.list[index].prompt!).onPress(() { + itemBuilder: (cxt, index) => itemView("assets/images/pdf.svg", servicesMenuData.list[index].prompt!, context).onPress(() { if (servicesMenuData.list[index].parentMenuName == "MBL_PERINFO_SS") { if (servicesMenuData.list[index].requestType == "BASIC_DETAILS") { Navigator.pushNamed(context, AppRoutes.basicDetails); @@ -63,15 +64,15 @@ class ServicesMenuListScreen extends StatelessWidget { ); } - Widget itemView(String icon, String title) { + Widget itemView(String icon, String title, context) { return Row( children: [ (title).toText16().expanded, 12.width, - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2 : 4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.darkIconColor), + ), ], ).objectContainerView(); } diff --git a/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart b/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart index 0002c51..da54cf7 100644 --- a/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart +++ b/lib/ui/screens/mowadhafhi/mowadhafhi_home.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:mohem_flutter_app/api/mowadhafhi/mowadhafhi_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/routes.dart'; @@ -53,44 +54,44 @@ class _MowadhafhiHomeState extends State { body: Column( children: [ (getTicketsByEmployeeList == null - ? const SizedBox() - : (getTicketsByEmployeeList!.isEmpty) - ? Utils.getNoDataWidget(context) - : ListView.separated( - physics: const BouncingScrollPhysics(), - padding: const EdgeInsets.all(21), - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.pushNamed(context, AppRoutes.mowadhafhiDetails, arguments: getTicketsByEmployeeList![index].ticketId); - }, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - getTicketsByEmployeeList![index].ticketTypeName!.toText14(color: MyColors.darkTextColor).expanded, - getTicketsByEmployeeList![index].created!.split(" ")[0].toText12(color: MyColors.grey70Color), - ], - ), - getTicketsByEmployeeList![index].description!.toText12(color: MyColors.grey57Color), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - getTicketsByEmployeeList![index].ticketStatusInternalName!.toText14(color: MyColors.textMixColor), - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) - ], - ), - ], - ).objectContainerView(), - ); - }, - separatorBuilder: (BuildContext context, int index) => 12.height, - itemCount: getTicketsByEmployeeList!.length)) + ? const SizedBox() + : (getTicketsByEmployeeList!.isEmpty) + ? Utils.getNoDataWidget(context) + : ListView.separated( + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.all(21), + itemBuilder: (BuildContext context, int index) { + return InkWell( + onTap: () { + Navigator.pushNamed(context, AppRoutes.mowadhafhiDetails, arguments: getTicketsByEmployeeList![index].ticketId); + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + getTicketsByEmployeeList![index].ticketTypeName!.toText14(color: MyColors.darkTextColor).expanded, + getTicketsByEmployeeList![index].created!.split(" ")[0].toText12(color: MyColors.grey70Color), + ], + ), + getTicketsByEmployeeList![index].description!.toText12(color: MyColors.grey57Color), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + getTicketsByEmployeeList![index].ticketStatusInternalName!.toText14(color: MyColors.textMixColor), + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2 : 4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.darkIconColor), + ), + ], + ), + ], + ).objectContainerView(), + ); + }, + separatorBuilder: (BuildContext context, int index) => 12.height, + itemCount: getTicketsByEmployeeList!.length)) .expanded, DefaultButton(LocaleKeys.createRequest.tr(), () async { await Navigator.pushNamed(context, AppRoutes.mowadhafhiHRRequest); diff --git a/lib/ui/work_list/work_list_screen.dart b/lib/ui/work_list/work_list_screen.dart index e3231fa..dcdd580 100644 --- a/lib/ui/work_list/work_list_screen.dart +++ b/lib/ui/work_list/work_list_screen.dart @@ -41,7 +41,7 @@ class _WorkListScreenState extends State { key: 'HRSSA', disable: false), WorkListItemTypeModelData( - value: 0, name: 'MO', fullName: LocaleKeys.moveOrder.tr(), active: false, color: [Color(0xff58DCFA), Color(0xff3CB9D5)], icon: "assets/images/miss_swipe.svg", key: 'INVMOA', disable: false), + value: 0, name: 'MR', fullName: LocaleKeys.moveOrder.tr(), active: false, color: [Color(0xff58DCFA), Color(0xff3CB9D5)], icon: "assets/images/miss_swipe.svg", key: 'INVMOA', disable: false), WorkListItemTypeModelData( value: 0, name: 'PR', @@ -321,10 +321,10 @@ class _WorkListScreenState extends State { Row( children: [ DateUtil.formatDateToDate(DateUtil.convertStringToDate(requestDetails.modifiedDate!), false).toText10(color: MyColors.lightTextColor).expanded, - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color:MyColors.darkIconColor) + ), ], ), ], @@ -403,10 +403,11 @@ class _WorkListScreenState extends State { Row( children: [ DateUtil.formatDateToDate(DateUtil.convertSimpleStringDateToDate(workData.bEGINDATE!), false).toText10(color: MyColors.lightTextColor).expanded, - SvgPicture.asset( - "assets/images/arrow_next.svg", - color: MyColors.darkIconColor, - ) + RotatedBox( + quarterTurns: AppState().isArabic(context) ? 2:4, + child: SvgPicture.asset("assets/images/arrow_next.svg", color:MyColors.darkIconColor) + ), + ], ), ], diff --git a/lib/ui/work_list/worklist_detail_screen.dart b/lib/ui/work_list/worklist_detail_screen.dart index 07f69da..9a32d30 100644 --- a/lib/ui/work_list/worklist_detail_screen.dart +++ b/lib/ui/work_list/worklist_detail_screen.dart @@ -223,8 +223,8 @@ class _WorkListDetailScreenState extends State { poLinesList: getPoNotificationBody?.pOLines ?? [], itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [], ), - ActionsFragment(workListData!.nOTIFICATIONID, actionHistoryList), - AttachmentsFragment(getAttachmentList), + actionHistoryList.isEmpty ? Utils.getNoDataWidget(context) : ActionsFragment(workListData!.nOTIFICATIONID, actionHistoryList), + getAttachmentList.isEmpty ? Utils.getNoDataWidget(context) : AttachmentsFragment(getAttachmentList), ], ).expanded, if (isApproveAvailable || isRejectAvailable || isCloseAvailable) @@ -233,10 +233,7 @@ class _WorkListDetailScreenState extends State { decoration: const BoxDecoration( color: Colors.white, border: Border( - top: BorderSide( - color: MyColors.lightGreyEFColor, - width: 1.0, - ), + top: BorderSide(color: MyColors.lightGreyEFColor, width: 1.0), ), ), child: Row( @@ -245,29 +242,20 @@ class _WorkListDetailScreenState extends State { DefaultButton( LocaleKeys.reject.tr(), () => performAction("REJECTED"), - colors: const [ - Color(0xffE47A7E), - Color(0xffDE6D71), - ], + colors: const [Color(0xffE47A7E), Color(0xffDE6D71)], ).expanded, if (isApproveAvailable && isRejectAvailable) 8.width, if (isApproveAvailable) DefaultButton( LocaleKeys.approve.tr(), () => performAction("APPROVED"), - colors: const [ - Color(0xff28C884), - Color(0xff1BB271), - ], + colors: const [Color(0xff28C884), Color(0xff1BB271)], ).expanded, if (isCloseAvailable) DefaultButton( LocaleKeys.ok.tr(), () => performAction("CLOSE"), - colors: const [ - Color(0xff32D892), - Color(0xff1AB170), - ], + colors: const [Color(0xff32D892), Color(0xff1AB170)], ).expanded, 8.width, Container(