fix lakum issues

merge-requests/482/head
Fatimah Alshammari 4 years ago
parent 9cececf3f1
commit 78fc77159c

@ -19,12 +19,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// // Pharmacy Production URLs // // Pharmacy Production URLs
const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; // const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; // const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';

@ -490,6 +490,8 @@ const Map localizedValues = {
"noLocationAvailable": {"en": "No Location Available", "ar": "لا يوجد موقع"}, "noLocationAvailable": {"en": "No Location Available", "ar": "لا يوجد موقع"},
"orders": {"en": "Orders", "ar": "الطلبات"}, "orders": {"en": "Orders", "ar": "الطلبات"},
"lakum": {"en": "Lakum", "ar": "برنامج لكم"}, "lakum": {"en": "Lakum", "ar": "برنامج لكم"},
"lakumMsg": {"en": "No Details of Points Are There", "ar": " لاتوجد تفاصيل عن النقاط"},
"lakumPoint": {"en": "Point", "ar": "نقطه"},
"wishlist": {"en": "Wishlist", "ar": "المفضلة"}, "wishlist": {"en": "Wishlist", "ar": "المفضلة"},
"products": {"en": "Products", "ar": "المنتجات"}, "products": {"en": "Products", "ar": "المنتجات"},
"reviews": {"en": "Reviews", "ar": "التقيمات"}, "reviews": {"en": "Reviews", "ar": "التقيمات"},
@ -606,10 +608,19 @@ const Map localizedValues = {
"gained": {"en": "GAINED", "ar": "المكتسب"}, "gained": {"en": "GAINED", "ar": "المكتسب"},
"consumed": {"en": "Consumed", "ar": "المستهلك"}, "consumed": {"en": "Consumed", "ar": "المستهلك"},
"transferred": {"en": "TRANSFERRED", "ar": "المحول"}, "transferred": {"en": "TRANSFERRED", "ar": "المحول"},
"RIYAL": {"en": "RIYAL", "ar": "ريال"},
"MEMBERSINCE": {"en": "MEMBER SINCE", "ar": "تاريخ العضوية"},
"IDENTIFICATION": {"en": "IDENTIFICATION", "ar": "رقم الهوية"},
"lakumMobile": {"en": "lakum Mobile", "ar": "رقم الجوال"},
"Waitinggained": {"en": "Waiting gained", "ar": " بأنتظار التفعيل"},
"Expired": {"en": "Expired", "ar": "منتهية الصلاحيه"},
"WillBeExpired": {"en": "Will Be Expired", "ar": "ستنتهي صلاحيتها"},
"LakumPoint": {"en": "Lakum Points", "ar": "نقاط لكم"},
"ActivateLAKUMAccount": {"en": "Activate LAKUM Account", "ar": "تفعيل لكم"},
"checkBeneficiary": {"en": "CHECK BENEFICIARY", "ar": "تحقق من المستفيد"}, "checkBeneficiary": {"en": "CHECK BENEFICIARY", "ar": "تحقق من المستفيد"},
"beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"}, "beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"},
"accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"}, "accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"},
"lakumTransfer": {"en": "Lakum Transfer", "ar": "تفعيل الحساب"}, "lakumTransfer": {"en": "Lakum Transfer", "ar": "تحويل نقاط لكم"},
"acceptLbl": {"en": "Accept", "ar": "موافقة"}, "acceptLbl": {"en": "Accept", "ar": "موافقة"},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"}, "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."}, "i-am-a": {"en": "I am a ...", "ar": "أنا ..."},

@ -23,6 +23,8 @@ class LacumService extends BaseService{
await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION, await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
lacumInformation = LacumAccountInformation.fromJson(response); lacumInformation = LacumAccountInformation.fromJson(response);
print("Test Lacum Account Information");
print(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
@ -45,6 +47,8 @@ class LacumService extends BaseService{
await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, await baseAppClient.post(GET_LACUM_GROUP_INFORMATION,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
lacumGroupInformation = LacumAccountInformation.fromJson(response); lacumGroupInformation = LacumAccountInformation.fromJson(response);
print("Test Lacum Group Information");
print(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -112,8 +112,8 @@ class _LakumSettingPageState extends State<LakumSettingPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts( Texts(TranslationBase.of(context).ActivateLAKUMAccount,
"Activate LAKUM Account", // "Activate LAKUM Account",
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black, color: Colors.black,

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-setting-page
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-transfer-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-transfer-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-points-year-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-points-year-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -47,7 +48,7 @@ class LakumMainPage extends StatelessWidget {
Column( Column(
children: [ children: [
SizedBox( SizedBox(
height: mediaQuery.size.height * 0.05, height: mediaQuery.size.height * 0.02,
), ),
Container( Container(
width: mediaQuery.size.width * 1, width: mediaQuery.size.width * 1,
@ -65,7 +66,7 @@ class LakumMainPage extends StatelessWidget {
height: 20, height: 20,
), ),
Container( Container(
height: 100, height: 125,
margin: EdgeInsets.symmetric(horizontal: 16), margin: EdgeInsets.symmetric(horizontal: 16),
child: ListView( child: ListView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
@ -174,15 +175,15 @@ class LakumMainPage extends StatelessWidget {
Padding( Padding(
padding: padding:
EdgeInsets.symmetric(horizontal: 8), EdgeInsets.symmetric(horizontal: 8),
child: Texts( child: Texts(TranslationBase.of(context).Expired,
"Expired", // "Expired",
fontSize: 14, fontSize: 14,
), ),
) )
], ],
), ),
Texts( Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} Points", "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints}${TranslationBase.of(context).lakumPoint} " ,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
@ -214,15 +215,15 @@ class LakumMainPage extends StatelessWidget {
Padding( Padding(
padding: padding:
EdgeInsets.symmetric(horizontal: 8), EdgeInsets.symmetric(horizontal: 8),
child: Texts( child: Texts(TranslationBase.of(context).Waitinggained,
"Waiting gained", // "Waiting gained",
fontSize: 14, fontSize: 14,
), ),
) )
], ],
), ),
Texts( Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points", "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
@ -254,15 +255,15 @@ class LakumMainPage extends StatelessWidget {
Padding( Padding(
padding: padding:
EdgeInsets.symmetric(horizontal: 8), EdgeInsets.symmetric(horizontal: 8),
child: Texts( child: Texts(TranslationBase.of(context).WillBeExpired,
"Will Be Expired", // "Will Be Expired",
fontSize: 14, fontSize: 14,
), ),
) )
], ],
), ),
Texts( Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsWillBeExpired} Points", "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsWillBeExpired} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
@ -441,13 +442,16 @@ class LacumPointsWidget extends StatelessWidget {
Navigator.push(context, Navigator.push(context,
FadePage(page: LakumPointsYearPage(pointsAmountPerYear))); FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
} else { } else {
AppToast.showErrorToast(
message: TranslationBase.of(context)
.lakumMsg);
// show snackBar No Details Points are there // show snackBar No Details Points are there
} }
} }
}, },
child: Container( child: Container(
width: mediaQuery.size.width / 2 - 16, width: mediaQuery.size.width / 2 - 25,
padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 4), padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 2),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -493,8 +497,8 @@ class LacumPointsWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(TranslationBase.of(context).RIYAL,
"RIYAL", // "RIYAL",
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: pointType == 1 ? Colors.white : Colors.black, color: pointType == 1 ? Colors.white : Colors.black,
@ -520,12 +524,12 @@ class LacumPointsWidget extends StatelessWidget {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(left: 4), margin: EdgeInsets.only(left: 8, right: 8),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(TranslationBase.of(context).point,
"POINT", // "POINT",
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: pointType == 1 ? Colors.white : Colors.black, color: pointType == 1 ? Colors.white : Colors.black,

@ -26,7 +26,7 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
return BaseView<LacumViewModel>( return BaseView<LacumViewModel>(
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Lakum points", title: TranslationBase.of(context).LakumPoint,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerYear.d
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lakum-point-table-row-widget.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lakum-point-table-row-widget.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -26,7 +27,7 @@ class _LakumPointsYearPageState extends State<LakumPointsYearPage> {
return BaseView<LacumViewModel>( return BaseView<LacumViewModel>(
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Lakum points", title: TranslationBase.of(context).LakumPoint,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
@ -143,8 +144,8 @@ class LacumPointsYearWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(TranslationBase.of(context).point,
"POINT", // "POINT",
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: isSelected ? Colors.white : Colors.black, color: isSelected ? Colors.white : Colors.black,
@ -172,8 +173,8 @@ class LacumPointsYearWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Texts( Texts(TranslationBase.of(context).RIYAL,
"RIYAL", // "RIYAL",
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: isSelected ? Colors.white : Colors.black, color: isSelected ? Colors.white : Colors.black,

@ -10,7 +10,7 @@ class OrderPreviewPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<OrderPreviewViewModel>( return BaseView<OrderPreviewViewModel>(
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
title: "Shopping Cart", title: TranslationBase.of(context).shoppingCart,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
baseViewModel: model, baseViewModel: model,

@ -125,8 +125,8 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(TranslationBase.of(context).IDENTIFICATION,
"IDENTIFICATION #", // "IDENTIFICATION #",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
@ -143,8 +143,8 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Texts( Texts(TranslationBase.of(context).MEMBERSINCE,
"MEMBER SINCE", // "MEMBER SINCE",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
@ -168,8 +168,8 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(TranslationBase.of(context).lakumMobile,
"MOBILE #", // "MOBILE #",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,

@ -941,6 +941,28 @@ class TranslationBase {
String get lakum => localizedValues['lakum'][locale.languageCode]; String get lakum => localizedValues['lakum'][locale.languageCode];
String get lakumMsg => localizedValues['lakumMsg'][locale.languageCode];
String get lakumPoint => localizedValues['lakumPoint'][locale.languageCode];
String get MEMBERSINCE => localizedValues['MEMBERSINCE'][locale.languageCode];
String get IDENTIFICATION => localizedValues['IDENTIFICATION'][locale.languageCode];
String get lakumMobile => localizedValues['lakumMobile'][locale.languageCode];
String get Waitinggained => localizedValues['Waitinggained'][locale.languageCode];
String get Expired => localizedValues['Expired'][locale.languageCode];
String get WillBeExpired => localizedValues['WillBeExpired'][locale.languageCode];
String get RIYAL => localizedValues['RIYAL'][locale.languageCode];
String get LakumPoint => localizedValues['LakumPoint'][locale.languageCode];
String get ActivateLAKUMAccount => localizedValues['ActivateLAKUMAccount'][locale.languageCode];
String get wishlist => localizedValues['wishlist'][locale.languageCode]; String get wishlist => localizedValues['wishlist'][locale.languageCode];
String get brands => localizedValues['brands'][locale.languageCode]; String get brands => localizedValues['brands'][locale.languageCode];

Loading…
Cancel
Save