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/';
// Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const PHARMACY_BASE_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/';
// // Pharmacy Production URLs
const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PHARMACY_BASE_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 PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';

@ -490,6 +490,8 @@ const Map localizedValues = {
"noLocationAvailable": {"en": "No Location Available", "ar": "لا يوجد موقع"},
"orders": {"en": "Orders", "ar": "الطلبات"},
"lakum": {"en": "Lakum", "ar": "برنامج لكم"},
"lakumMsg": {"en": "No Details of Points Are There", "ar": " لاتوجد تفاصيل عن النقاط"},
"lakumPoint": {"en": "Point", "ar": "نقطه"},
"wishlist": {"en": "Wishlist", "ar": "المفضلة"},
"products": {"en": "Products", "ar": "المنتجات"},
"reviews": {"en": "Reviews", "ar": "التقيمات"},
@ -606,10 +608,19 @@ const Map localizedValues = {
"gained": {"en": "GAINED", "ar": "المكتسب"},
"consumed": {"en": "Consumed", "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": "تحقق من المستفيد"},
"beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"},
"accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"},
"lakumTransfer": {"en": "Lakum Transfer", "ar": "تفعيل الحساب"},
"lakumTransfer": {"en": "Lakum Transfer", "ar": "تحويل نقاط لكم"},
"acceptLbl": {"en": "Accept", "ar": "موافقة"},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."},

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

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

@ -26,7 +26,7 @@ class _LakumPointsMonthPageState extends State<LakumPointMonthPage> {
return BaseView<LacumViewModel>(
builder: (_, model, wi) => AppScaffold(
title: "Lakum points",
title: TranslationBase.of(context).LakumPoint,
isShowAppBar: true,
isShowDecPage: false,
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/pages/base/base_view.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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -26,7 +27,7 @@ class _LakumPointsYearPageState extends State<LakumPointsYearPage> {
return BaseView<LacumViewModel>(
builder: (_, model, wi) => AppScaffold(
title: "Lakum points",
title: TranslationBase.of(context).LakumPoint,
isShowAppBar: true,
isShowDecPage: false,
backgroundColor: Colors.white,
@ -143,8 +144,8 @@ class LacumPointsYearWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"POINT",
Texts(TranslationBase.of(context).point,
// "POINT",
fontSize: 12,
fontWeight: FontWeight.bold,
color: isSelected ? Colors.white : Colors.black,
@ -172,8 +173,8 @@ class LacumPointsYearWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(
"RIYAL",
Texts(TranslationBase.of(context).RIYAL,
// "RIYAL",
fontSize: 13,
fontWeight: FontWeight.bold,
color: isSelected ? Colors.white : Colors.black,

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

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

@ -941,6 +941,28 @@ class TranslationBase {
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 brands => localizedValues['brands'][locale.languageCode];

Loading…
Cancel
Save