diff --git a/assets/icons/mazaya_brand.svg b/assets/icons/mazaya_brand.svg
new file mode 100755
index 0000000..52fb265
--- /dev/null
+++ b/assets/icons/mazaya_brand.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index d840a9b..d874779 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -548,8 +548,6 @@
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"open": "يفتح",
-<<<<<<< HEAD
-=======
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"generate": "يولد",
@@ -577,7 +575,6 @@
"versionStatus": "حالة الإصدار",
"supplierNo": "رقم المورد",
"general": "عام",
->>>>>>> master
"requesterOperatingUnit":"وحدة تشغيل مقدم الطلب",
"prepareEmpNum":"إعداد رقم الموظف",
"supplierInfo" : "معلومات المورد",
@@ -591,9 +588,6 @@
"patientName" : "اسم المريض",
"invoiceDate" : "تاريخ الفاتورة",
"refundInvoice" :"فاتورة الاسترجاع",
-<<<<<<< HEAD
- "hospitalClinic" : "عيادة المستشفى"
-=======
"hospitalClinic" : "عيادة المستشفى",
"graphicalAnalysis": "التحليل الرسومي",
"itemHistoryAnalysis": "تحليل تاريخ العنصر",
@@ -621,6 +615,9 @@
"searchByUserName": "البحث بواسطة اسم المستخدم",
"shareScreen": "مشاركة الشاشة",
"start":"يبدأ",
- "about":"عن"
->>>>>>> master
+ "about":"عن",
+ "explore": "يستكشف",
+ "mazaya": "مازيا",
+ "benefits": "فوائد",
+ "mazayaDesc": "اكتشف الخصومات والعروض الخاصة المتاحة للموظفين"
}
\ No newline at end of file
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 2ab3649..ae4dcbc 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -566,8 +566,6 @@
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
"requesterOperatingUnit":"Requester Operating Unit",
-<<<<<<< HEAD
-=======
"generate": "Generate",
"paymentRequest": "Pay Request",
"paymentDetails": "Payment Details",
@@ -593,7 +591,6 @@
"versionStatus": "Version Status",
"supplierNo": "Supplier No",
"general": "General",
->>>>>>> master
"prepareEmpNum":"Prepare Employee Num",
"supplierInfo" : "Supplier Information",
"supplierAcNo": "Supplier Account No",
@@ -606,9 +603,6 @@
"patientName" : "Patient Name",
"invoiceDate" : "Invoice Date",
"refundInvoice" :"Refund Invoice",
-<<<<<<< HEAD
- "hospitalClinic" : "Hospital Clinic"
-=======
"hospitalClinic" : "Hospital Clinic",
"graphicalAnalysis": "Graphical Analysis",
"itemHistoryAnalysis": "Item History Analysis",
@@ -619,6 +613,10 @@
"bonusQty": "Bonus Qty.",
"balQty": "Bal. Qty.",
"start":"Start",
- "about":"About"
->>>>>>> master
+ "about":"About",
+ "explore": "Explore",
+ "mazaya": "MAZAYA",
+ "benefits": "Benefits",
+ "mazayaDesc": "Discover special Discounts and offers available to Employees"
+
}
\ No newline at end of file
diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart
index 0545518..9753744 100644
--- a/lib/classes/consts.dart
+++ b/lib/classes/consts.dart
@@ -10,14 +10,14 @@ class ApiConsts {
// static String baseUrl = "https://mohemm.hmg.com";
// static String baseUrl = "https://hmgwebservices.com"; // Live server
- // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
+ static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.201.204.101:2024";
// 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://uat.hmgwebservices.com"; // UAT ser343622ver
+ // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.20.200.111:1010/";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart
index afdf1a8..918affc 100644
--- a/lib/generated/codegen_loader.g.dart
+++ b/lib/generated/codegen_loader.g.dart
@@ -1,6 +1,6 @@
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
-// ignore_for_file: prefer_single_quotes, avoid_renaming_method_parameters
+// ignore_for_file: prefer_single_quotes, avoid_renaming_method_parameters, constant_identifier_names
import 'dart:ui';
@@ -1798,7 +1798,12 @@ class CodegenLoader extends AssetLoader {
"contactDetails": "Contact Details",
"familyDetails": "Family Members",
"effectiveDate": "Effective Date",
- "country": "Country"
+ "country": "Country",
+ "explore": "Explore",
+ "mazaya": "MAZAYA",
+ "benefits": "Benefits",
+ "mazayaDesc": "Discover special Discounts and offers available to Employees"
+
};
diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart
index 01a085a..57de239 100644
--- a/lib/generated/locale_keys.g.dart
+++ b/lib/generated/locale_keys.g.dart
@@ -1,5 +1,7 @@
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
+// ignore_for_file: constant_identifier_names
+
abstract class LocaleKeys {
static const mohemm = 'mohemm';
static const english = 'english';
@@ -101,6 +103,7 @@ abstract class LocaleKeys {
static const reject = 'reject';
static const approve = 'approve';
static const cancel = 'cancel';
+ static const generate = 'generate';
static const requestedItems = 'requestedItems';
static const request = 'request';
static const myRequest = 'myRequest';
@@ -552,7 +555,6 @@ abstract class LocaleKeys {
static const pleaseClickButtonToJoinMarathon ='pleaseClickButtonToJoinMarathon';
static const youCannotJoinTheMarathon ='youCannotJoinTheMarathon';
static const open ='open';
- static const generate = 'generate';
static const paymentDetails ='paymentDetails';
static const requestNo ='requestNo';
static const requesterEmpNum ='requesterEmpNum';
@@ -578,6 +580,7 @@ abstract class LocaleKeys {
static const versionStatus ='versionStatus';
static const supplierNo ='supplierNo';
static const general ="general";
+ static const paymentRequest = 'paymentRequest';
static const supplierInfo = 'supplierInfo';
static const supplierAcNo = 'supplierAcNo';
static const supplierAcName = 'supplierAcName';
@@ -590,7 +593,6 @@ abstract class LocaleKeys {
static const invoiceDate = 'Invoice Date';
static const refundInvoice = 'Refund Invoice';
static const hospitalClinic = 'Hospital Clinic';
- static const paymentRequest = 'paymentRequest';
static const graphicalAnalysis = 'graphicalAnalysis';
static const itemHistoryAnalysis = 'itemHistoryAnalysis';
static const pOno = 'pOno';
@@ -599,8 +601,11 @@ abstract class LocaleKeys {
static const qtyReceived = 'qtyReceived';
static const bonusQty = 'bonusQty';
static const balQty = 'balQty';
- static const Attendance = 'Attendance';
static const start = 'start';
- static const about ='about';
+ static const about = 'about';
+ static const explore = 'explore';
+ static const mazaya = 'mazaya';
+ static const benefits = 'benefits';
+ static const mazayaDesc = 'mazayaDesc';
}
diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart
index bce1f0e..9131b8e 100644
--- a/lib/ui/landing/dashboard_screen.dart
+++ b/lib/ui/landing/dashboard_screen.dart
@@ -176,10 +176,11 @@ class _DashboardScreenState extends State with WidgetsBindingOb
if (list[ermIndex].notificationType == "Survey") {
await Navigator.pushNamed(context, AppRoutes.survey, arguments: response.mohemmItgResponseItem!.result!.data!.first);
} else {
- await Navigator.pushNamed(context, AppRoutes.advertisement, arguments: {
- "masterId": list[ermIndex].notificationMasterId,
- "advertisement": response.mohemmItgResponseItem!.result!.data!.first.advertisement,
- });
+ await Navigator.pushNamed(
+ context,
+ AppRoutes.advertisement,
+ arguments: {"masterId": list[ermIndex].notificationMasterId, "advertisement": response.mohemmItgResponseItem!.result!.data!.first.advertisement},
+ );
}
}
ermIndex++;
@@ -242,53 +243,44 @@ class _DashboardScreenState extends State with WidgetsBindingOb
children: [
Row(
children: [
- Builder(builder: (BuildContext context) {
- return Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Image.memory(
- Utils.dataFromBase64String(
- AppState().memberInformationList!.eMPLOYEEIMAGE ?? "",
- ),
- errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) {
- return SvgPicture.asset(
- "assets/images/user.svg",
- height: 34,
- width: 34,
- );
- },
- width: 34,
- height: 34,
- fit: BoxFit.cover,
- ).circle(50),
- // 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(() {
- _scaffoldState.currentState!.openDrawer();
- });
- }),
+ Builder(
+ builder: (BuildContext context) {
+ return Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Image.memory(
+ Utils.dataFromBase64String(AppState().memberInformationList!.eMPLOYEEIMAGE ?? ""),
+ errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) {
+ return SvgPicture.asset("assets/images/user.svg", height: 34, width: 34);
+ },
+ width: 34,
+ height: 34,
+ fit: BoxFit.cover,
+ ).circle(50),
+ // 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(() {
+ _scaffoldState.currentState!.openDrawer();
+ });
+ },
+ ),
Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded,
- SvgPicture.asset(
- "assets/images/announcements.svg",
- matchTextDirection: true,
- ).onPress(() async {
+ 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(
child: SmartRefresher(
enablePullDown: true,
enablePullUp: false,
- header: const MaterialClassicHeader(
- color: MyColors.gradiantEndColor,
- ),
+ header: const MaterialClassicHeader(color: MyColors.gradiantEndColor),
controller: _refreshController,
onRefresh: () {
_onRefresh(false);
@@ -312,220 +304,328 @@ class _DashboardScreenState extends State with WidgetsBindingOb
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,
- ]),
+ 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(
+ ),
+ 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: [
- Expanded(
- child: Column(
+ 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: [
- LocaleKeys.checkIn.tr().toText12(color: Colors.white),
- (model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn)
- .toString()
- .toText14(color: Colors.white, isBold: true),
- 4.height,
+ 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(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/biometrics.svg" : "assets/images/biometrics.svg"),
- ).onPress(() {
- showMyBottomSheet(
- context,
- callBackFunc: () {},
- child: MarkAttendanceWidget(model, isFromDashboard: true),
- );
- }),
],
- ),
- ],
- ),
- ],
- ),
- ).onPress(
- () {
- Navigator.pushNamed(context, AppRoutes.todayAttendance);
- },
- ))
+ ).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: const Color(0xff259EA4),
+ borderRadius: BorderRadius.only(
+ bottomRight: AppState().isArabic(context) ? const Radius.circular(0) : const Radius.circular(15),
+ bottomLeft: AppState().isArabic(context) ? const Radius.circular(15) : const Radius.circular(0),
+ ),
+ ),
+ child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/biometrics.svg" : "assets/images/biometrics.svg"),
+ ).onPress(() {
+ showMyBottomSheet(context, callBackFunc: () {}, child: MarkAttendanceWidget(model, isFromDashboard: true));
+ }),
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ ).onPress(() {
+ Navigator.pushNamed(context, AppRoutes.todayAttendance);
+ }))
.animatedSwither();
},
),
),
),
9.width,
- Expanded(
- child: MenusWidget(),
- ),
+ Expanded(child: MenusWidget()),
],
),
],
).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
eventActivityWidget(context),
- Consumer(builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
- if (!model.isOffersLoading && model.getOffersList.isEmpty) {
- return const SizedBox();
- }
- return 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)),
- ],
- ),
- ],
+ Consumer(
+ builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
+ if (!model.isOffersLoading && model.getOffersList.isEmpty) {
+ return const SizedBox();
+ }
+ return Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Directionality(
+ textDirection: AppState().isArabic(context) ? ui.TextDirection.rtl : ui.TextDirection.ltr,
+ child: Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(20),
+ gradient: const LinearGradient(colors: [Color(0xFF91C481), Color(0xFF7CCED7)], begin: Alignment.centerLeft, end: Alignment.centerRight),
),
- ),
- 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),
- ),
- 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),
+ child: Padding(
+ padding: const EdgeInsets.all(3.0), // This creates the border width
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(17), // Slightly less than outer radius
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Expanded(
+ flex: 4,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Expanded(
+ flex: 2,
+ child: RichText(
+ text:
+ AppState().isArabic(context)
+ ? const TextSpan(
+ children: [
+ TextSpan(
+ text: 'اطلع على مميزات',
+ style: TextStyle(fontSize: 16, letterSpacing: -0.2, fontWeight: FontWeight.w700, height: 24 / 16, color: Color(0xFF5D5E5E)),
+ ),
+ TextSpan(
+ text: ' مزايا',
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.w700,
+ letterSpacing: -0.2,
+ height: 24 / 16,
+ color: Color(0xFFED1C2B), // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
+ ),
+ ),
+ ],
+ )
+ : TextSpan(
+ children: [
+ TextSpan(
+ text: LocaleKeys.explore.tr() + ' ',
+ style: const TextStyle(fontSize: 16, letterSpacing: -0.2, fontWeight: FontWeight.w700, height: 24 / 16, color: Color(0xFF5D5E5E)),
+ ),
+ TextSpan(
+ text: LocaleKeys.mazaya.tr(),
+ style: const TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.w700,
+ letterSpacing: -0.2,
+ height: 24 / 16,
+ color: Color(0xFFED1C2B), // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
+ ),
+ ),
+ TextSpan(
+ text: ' ' + LocaleKeys.benefits.tr(),
+ style: const TextStyle(fontSize: 16, letterSpacing: -0.2, fontWeight: FontWeight.w700, height: 24 / 16, color: Color(0xFF5D5E5E)),
+ ),
+ ],
+ ),
),
- ],
- ),
+ ),
+ const Expanded(flex: 1, child: SizedBox()),
+ ],
),
- );
- },
- separatorBuilder: (BuildContext cxt, int index) => 8.width,
- itemCount: 9),
- );
- },
- ),
- ],
- );
- }),
+ const SizedBox(height: 8),
+ LocaleKeys.mazayaDesc.tr().toText11(color: const Color(0xFF5D5E5E)),
+ ],
+ ),
+ ),
+ Expanded(
+ flex: 2,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ SvgPicture.asset("assets/icons/mazaya_brand.svg", width: 90, height: 47),
+ const SizedBox(height: 28),
+ LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true, color: const Color(0xFF3B3D4A)).onPress(() {
+ Navigator.pushNamed(context, AppRoutes.offersAndDiscounts);
+ }),
+ ],
+ ),
+ ),
+ ],
+ ).paddingOnly(left: 21, right: 21, top: 14, bottom: 14),
+ ),
+ ),
+ ).paddingOnly(left: 21, right: 21, top: 0, bottom: 21),
+ ),
+
+ // Container(
+ // height: 121,
+ // decoration: BoxDecoration(
+ // borderRadius: BorderRadius.circular(12),
+ // border: Border.all(width: 3, color: Colors.red),
+ // ),
+ // child: Padding(padding: const EdgeInsets.all(4.0), child: Container(decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white))),
+ // ).paddingOnly(left: 21, right: 21, bottom: 21),
+
+ // 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),
+ // ),
+ // 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),
+ // ),
+ // ],
+ // ),
+ // ),
+ // );
+ // },
+ // separatorBuilder: (BuildContext cxt, int index) => 8.width,
+ // itemCount: 9),
+ // );
+ // },
+ // ),
+ ],
+ );
+ },
+ ),
Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 31),
@@ -589,38 +689,24 @@ class _DashboardScreenState extends State with WidgetsBindingOb
),
),
),
- )
+ ),
],
),
- drawer: SafeArea(
- child: AppDrawer(onLanguageChange: _onRefresh),
- ),
+ drawer: SafeArea(child: AppDrawer(onLanguageChange: _onRefresh)),
bottomNavigationBar: 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/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),
+ 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),
+ 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) {
@@ -643,10 +729,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb
label: LocaleKeys.workList.tr(),
),
BottomNavigationBarItem(
- icon: SvgPicture.asset(
- "assets/icons/item_for_sale.svg",
- color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color,
- ).paddingAll(4),
+ icon: SvgPicture.asset("assets/icons/item_for_sale.svg", color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4),
label: LocaleKeys.itemsForSale.tr(),
),
BottomNavigationBarItem(
@@ -655,28 +738,29 @@ class _DashboardScreenState extends State with WidgetsBindingOb
children: [
SvgPicture.asset(
"assets/icons/chat/chat.svg",
- color: !checkIfPrivilegedForChat()
- ? MyColors.lightGreyE3Color
- : currentIndex == 4
+ color:
+ !checkIfPrivilegedForChat()
+ ? MyColors.lightGreyE3Color
+ : currentIndex == 4
? MyColors.grey3AColor
: cProvider.disbaleChatForThisUser
- ? MyColors.lightGreyE3Color
- : MyColors.grey98Color,
+ ? MyColors.lightGreyE3Color
+ : MyColors.grey98Color,
).paddingAll(4),
Consumer(
builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
return !checkIfPrivilegedForChat()
? const SizedBox()
: 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),
- ),
- );
+ 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),
+ ),
+ );
},
),
],
@@ -714,8 +798,8 @@ class _DashboardScreenState extends State with WidgetsBindingOb
return (context.watch().isEventLoadingLoading)
? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
: (context.watch().eventActivity != null && context.watch().eventActivity!.isActive == true)
- ? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
- : const SizedBox();
+ ? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
+ : const SizedBox();
}
void navigateToDetails(OffersListModel offersListModelObj) {
diff --git a/lib/ui/landing/widget/services_widget.dart b/lib/ui/landing/widget/services_widget.dart
index 7c19b58..319c36d 100644
--- a/lib/ui/landing/widget/services_widget.dart
+++ b/lib/ui/landing/widget/services_widget.dart
@@ -1,20 +1,56 @@
+import 'dart:convert';
+import 'dart:developer';
+
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:flutter_svg/svg.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
+import 'package:mohem_flutter_app/classes/inAppWebView.dart';
+import 'package:mohem_flutter_app/classes/utils.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';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
+import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
+import 'package:mohem_flutter_app/models/generic_response_model.dart';
+import 'package:mohem_flutter_app/models/sso_auth_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/services_menu_list_screen.dart';
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
+import 'package:mohem_flutter_app/widgets/sso_webview_widget.dart';
import 'package:provider/provider.dart';
+import 'package:url_launcher/url_launcher.dart';
class ServicesWidget extends StatelessWidget {
+ MyInAppBrowser? myInAppBrowser;
+ var inAppBrowserOptions = InAppBrowserClassSettings(
+ webViewSettings: InAppWebViewSettings(
+ useShouldOverrideUrlLoading: false,
+ transparentBackground: false,
+ isInspectable: false,
+ applePayAPIEnabled: true,
+ cacheEnabled: false,
+ allowsBackForwardNavigationGestures: false,
+ ),
+ browserSettings: InAppBrowserSettings(
+ hideUrlBar: true,
+ hideTitleBar: true,
+ hideDefaultMenuItems: true,
+ hideToolbarBottom: true,
+ hideToolbarTop: false,
+ hideCloseButton: false,
+ allowGoBackWithBackButton: false,
+ toolbarBottomBackgroundColor: Colors.black,
+ closeButtonColor: Colors.white,
+ presentationStyle: ModalPresentationStyle.FULL_SCREEN,
+ // toolbarTopBackgroundColor: Colors.black
+ ),
+ );
+
@override
Widget build(BuildContext context) {
List namesT = [LocaleKeys.monthlyAttendance.tr(), LocaleKeys.workFromHome.tr(), LocaleKeys.ticketRequest.tr(), LocaleKeys.monthlyAttendance.tr()];
@@ -26,7 +62,7 @@ class ServicesWidget extends StatelessWidget {
"assets/images/vacation_rule.svg",
"assets/images/ticket_request.svg",
"assets/images/ticket_request.svg",
- "assets/images/ticket_request.svg"
+ "assets/images/ticket_request.svg",
];
return Consumer(
@@ -34,72 +70,69 @@ class ServicesWidget extends StatelessWidget {
return data.isServicesMenusLoading
? whileLoading()
: ListView.separated(
- padding: const EdgeInsets.only(top: 0),
- itemBuilder: (context, parentIndex) {
- return Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: [
- data.homeMenus![parentIndex].menuEntry.prompt!.toSectionHeading().paddingOnly(left: 21, right: 21),
- SizedBox(
- height: 105 + 26,
- child: ListView.separated(
- shrinkWrap: true,
- physics: const BouncingScrollPhysics(),
- padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
- scrollDirection: Axis.horizontal,
- itemBuilder: (cxt, index) {
- return AspectRatio(
- aspectRatio: 105 / 105,
- child: data.isServicesMenusLoading
+ padding: const EdgeInsets.only(top: 0),
+ itemBuilder: (context, parentIndex) {
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ data.homeMenus![parentIndex].menuEntry.prompt!.toSectionHeading().paddingOnly(left: 21, right: 21),
+ SizedBox(
+ height: 105 + 26,
+ child: ListView.separated(
+ shrinkWrap: true,
+ physics: const BouncingScrollPhysics(),
+ padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
+ scrollDirection: Axis.horizontal,
+ itemBuilder: (cxt, index) {
+ return AspectRatio(
+ aspectRatio: 105 / 105,
+ child:
+ data.isServicesMenusLoading
? ServicesMenuShimmer()
: Container(
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.circular(15),
- boxShadow: [
- BoxShadow(
- color: const Color(0xff000000).withOpacity(.05),
- blurRadius: 26,
- offset: const Offset(0, -3),
- ),
- ],
- ),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- SvgPicture.asset(AppState().isArabic(context)
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(15),
+ boxShadow: [BoxShadow(color: const Color(0xff000000).withOpacity(.05), blurRadius: 26, offset: const Offset(0, -3))],
+ ),
+ child: Column(
+ 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!)),
- Row(
- crossAxisAlignment: CrossAxisAlignment.end,
- children: [
- Expanded(
- child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText11(isBold: true),
- ),
- RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
- ],
- )
- ],
- ).paddingOnly(left: 10, right: 10, bottom: 10, top: 12),
- ).onPress(() {
- handleOnPress(context, data.homeMenus![parentIndex].menuEntiesList[index]);
- }),
- );
- },
- separatorBuilder: (cxt, index) => 9.width,
- itemCount: data.homeMenus![parentIndex].menuEntiesList.length),
+ : getMenuIconEn(data.homeMenus![parentIndex].menuEntiesList[index].prompt!),
+ ),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Expanded(child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText11(isBold: true)),
+ RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
+ ],
+ ),
+ ],
+ ).paddingOnly(left: 10, right: 10, bottom: 10, top: 12),
+ ).onPress(() {
+ handleOnPress(context, data.homeMenus![parentIndex].menuEntiesList[index]);
+ }),
+ );
+ },
+ separatorBuilder: (cxt, index) => 9.width,
+ itemCount: data.homeMenus![parentIndex].menuEntiesList.length,
),
- ],
- );
- },
- separatorBuilder: (context, index) {
- return 12.height;
- },
- shrinkWrap: true,
- physics: const NeverScrollableScrollPhysics(),
- itemCount: data.homeMenus!.length);
+ ),
+ ],
+ );
+ },
+ separatorBuilder: (context, index) {
+ return 12.height;
+ },
+ shrinkWrap: true,
+ physics: const NeverScrollableScrollPhysics(),
+ itemCount: data.homeMenus!.length,
+ );
},
);
}
diff --git a/lib/ui/screens/offers_and_discounts/offers_and_discounts_home.dart b/lib/ui/screens/offers_and_discounts/offers_and_discounts_home.dart
index fd2c19e..f67a835 100644
--- a/lib/ui/screens/offers_and_discounts/offers_and_discounts_home.dart
+++ b/lib/ui/screens/offers_and_discounts/offers_and_discounts_home.dart
@@ -39,7 +39,7 @@ class _OffersAndDiscountsHomeState extends State {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
- appBar: AppBarWidget(context, title: LocaleKeys.offerAndDiscounts.tr(), showHomeButton: true),
+ appBar: AppBarWidget(context, title: LocaleKeys.offerAndDiscounts.tr(), showHomeButton: true, showLogo: true, logoPath: "assets/icons/mazaya_brand.svg"),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
diff --git a/lib/widgets/app_bar_widget.dart b/lib/widgets/app_bar_widget.dart
index 6737945..277a414 100644
--- a/lib/widgets/app_bar_widget.dart
+++ b/lib/widgets/app_bar_widget.dart
@@ -1,18 +1,23 @@
import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/classes/colors.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';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
-AppBar AppBarWidget(BuildContext context,
- {required String title,
- bool showHomeButton = true,
- bool showWorkListSettingButton = false,
- bool showMemberButton = false,
- List? actions,
- void Function()? onHomeTapped,
- void Function()? onBackTapped}) {
+AppBar AppBarWidget(
+ BuildContext context, {
+ required String title,
+ bool showHomeButton = true,
+ bool showLogo = false,
+ String? logoPath,
+ bool showWorkListSettingButton = false,
+ bool showMemberButton = false,
+ List? actions,
+ void Function()? onHomeTapped,
+ void Function()? onBackTapped,
+}) {
return AppBar(
leadingWidth: 0,
automaticallyImplyLeading: false,
@@ -26,8 +31,10 @@ AppBar AppBarWidget(BuildContext context,
}, context),
child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
),
+ if (showLogo) 4.width,
+ if (showLogo) SvgPicture.asset(logoPath!),
4.width,
- title.toText24(color: MyColors.darkTextColor, isBold: true).expanded,
+ if (!showLogo)title.toText24(color: MyColors.darkTextColor, isBold: true).expanded,
],
),
centerTitle: false,
@@ -55,7 +62,7 @@ AppBar AppBarWidget(BuildContext context,
},
icon: const Icon(Icons.people, color: MyColors.textMixColor),
),
- ...actions ?? []
+ ...actions ?? [],
],
);
}