Merge branch 'Fatima-New-Design' into 'development_new_design_2.0'

Fatima new design

See merge request Cloud_Solution/diplomatic-quarter!539
merge-update-with-lab-changes
haroon amjad 5 years ago
commit 17d569216d

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -246,6 +246,7 @@ const Map localizedValues = {
"companyName": {"en": "Company Name:", "ar": "اسم الشركة: "}, "companyName": {"en": "Company Name:", "ar": "اسم الشركة: "},
"receiptOn": {"en": "Receipt on:", "ar": "تاريخ الفاتورة: "}, "receiptOn": {"en": "Receipt on:", "ar": "تاريخ الفاتورة: "},
"expiryDate": {"en": "Expiry Date:", "ar": "تاريخ الانتهاء: "}, "expiryDate": {"en": "Expiry Date:", "ar": "تاريخ الانتهاء: "},
"expiryPoints": {"en": "Expired", "ar": " منتهية الصلاحية"},
"expiryOn": {"en": "Expiry on:", "ar": "تاريخ الانتهاء: "}, "expiryOn": {"en": "Expiry on:", "ar": "تاريخ الانتهاء: "},
"procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"}, "procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"},
"procedure": {"en": "Procedure", "ar": "اسم الاجراء:"}, "procedure": {"en": "Procedure", "ar": "اسم الاجراء:"},

@ -71,7 +71,8 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
color: Color(0xffe1e1e1), color: Color(0xffe1e1e1),
width: 0.4, width: 0.4,
)), )),
color: Color(0xff6294ed), color: Colors.green
//(0xff6294ed),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:

@ -28,11 +28,13 @@ class LakumMainPage extends StatelessWidget {
return BaseView<LacumViewModel>( return BaseView<LacumViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
await model.getLacumData(); await model.getLacumData();
if (model.lacumInformation.yahalaAccountNo == 0 || model.lacumInformation.yahalaAccountNo == null) { if (model.lacumInformation.yahalaAccountNo == 0 ||
model.lacumInformation.yahalaAccountNo == null) {
navigateToLakumRegister(context); navigateToLakumRegister(context);
} else { } else {
if (model.lacumInformation.status == "Hold") { if (model.lacumInformation.status == "Hold") {
Navigator.pushReplacement(context, FadePage(page: LakumActivationVidaPage())); Navigator.pushReplacement(
context, FadePage(page: LakumActivationVidaPage()));
} }
} }
}, },
@ -49,7 +51,10 @@ class LakumMainPage extends StatelessWidget {
body: Container( body: Container(
width: double.infinity, width: double.infinity,
child: SingleChildScrollView( child: SingleChildScrollView(
child: (model.lacumGroupInformation != null && model.lacumGroupInformation.lakumInquiryInformationObjVersion != null) child: (model.lacumGroupInformation != null &&
model.lacumGroupInformation
.lakumInquiryInformationObjVersion !=
null)
? Column( ? Column(
children: [ children: [
Stack( Stack(
@ -63,7 +68,11 @@ class LakumMainPage extends StatelessWidget {
SizedBox( SizedBox(
height: mediaQuery.size.height * 0.02, height: mediaQuery.size.height * 0.02,
), ),
Container(width: mediaQuery.size.width * 1, child: LakumBannerWidget(model, mediaQuery, true)), Container(
width: mediaQuery.size.width * 1,
height: mediaQuery.size.width * .6,
child: LakumBannerWidget(
model, mediaQuery, true)),
], ],
) )
], ],
@ -76,18 +85,44 @@ class LakumMainPage extends StatelessWidget {
height: 12, height: 12,
), ),
Container( Container(
height: 100, height: 110,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 12.0), margin: EdgeInsets.symmetric(
horizontal: 16, vertical: 12.0),
child: ListView( child: ListView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: <Widget>[ children: <Widget>[
LacumPointsWidget(mediaQuery, 1, TranslationBase.of(context).balance, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount, LacumPointsWidget(
model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance, null), mediaQuery,
1,
TranslationBase.of(context).balance,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalance,
null),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount, LacumPointsWidget(
model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear), mediaQuery,
2,
TranslationBase.of(context).gained,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPointsAmountPerYear),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
@ -95,16 +130,40 @@ class LakumMainPage extends StatelessWidget {
mediaQuery, mediaQuery,
3, 3,
TranslationBase.of(context).consumed, TranslationBase.of(context).consumed,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null model
? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount) .lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount !=
null
? int.parse(model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount)
: 0, : 0,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints, model
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear), .lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmountPerYear),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
LacumPointsWidget(mediaQuery, 4, TranslationBase.of(context).transferred, 0, model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPoints, LacumPointsWidget(
model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPointsAmountPerYear), mediaQuery,
4,
TranslationBase.of(context).transferred,
0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPointsAmountPerYear),
], ],
), ),
), ),
@ -128,7 +187,8 @@ class LakumMainPage extends StatelessWidget {
), ),
), ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -143,7 +203,7 @@ class LakumMainPage extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 8), padding: EdgeInsets.symmetric(horizontal: 8),
child: Texts( child: Texts(
TranslationBase.of(context).expiryDate, TranslationBase.of(context).expiryPoints,
// "Expired", // "Expired",
fontSize: 14, fontSize: 14,
), ),
@ -164,8 +224,11 @@ class LakumMainPage extends StatelessWidget {
// fontSize: 14, // fontSize: 14,
// ), // ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), margin:
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row( Row(
children: [ children: [
Image.asset( Image.asset(
@ -175,9 +238,11 @@ class LakumMainPage extends StatelessWidget {
height: 25, height: 25,
), ),
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 8), padding:
EdgeInsets.symmetric(horizontal: 8),
child: Texts( child: Texts(
TranslationBase.of(context).Waitinggained, TranslationBase.of(context)
.Waitinggained,
// "Waiting gained", // "Waiting gained",
fontSize: 14, fontSize: 14,
), ),
@ -196,7 +261,8 @@ class LakumMainPage extends StatelessWidget {
// fontSize: 14, // fontSize: 14,
// ), // ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -249,7 +315,11 @@ class LakumMainPage extends StatelessWidget {
} }
navigateToLakumRegister(BuildContext context) { navigateToLakumRegister(BuildContext context) {
Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel.user.patientIdentificationNo))); Navigator.pushReplacement(
context,
FadePage(
page: LakumRegistrationPage(
projectViewModel.user.patientIdentificationNo)));
} }
} }
@ -259,7 +329,12 @@ List<Widget> _buildAppBarICons(BuildContext context, LacumViewModel model) {
icon: Icon(Icons.settings), icon: Icon(Icons.settings),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()}); Navigator.push(
context,
FadePage(
page: LakumSettingPage(
model.lacumInformation, model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
}, },
), ),
]; ];
@ -281,7 +356,9 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("Account activate click"); print("Account activate click");
Navigator.push(context, FadePage(page: LakumActivationVidaPage())).then((result) => {model.getLacumGroupData()}); Navigator.push(
context, FadePage(page: LakumActivationVidaPage()))
.then((result) => {model.getLacumGroupData()});
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 8), padding: EdgeInsets.symmetric(horizontal: 8),
@ -324,7 +401,12 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("Lacum transfer click"); print("Lacum transfer click");
Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()}); Navigator.push(
context,
FadePage(
page: LacumTransferPage(model.lacumInformation,
model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 8), padding: EdgeInsets.symmetric(horizontal: 8),
@ -340,7 +422,8 @@ class LakumHomeButtons extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset(
"assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png", "assets/images/pharmacy_module/lakum/akum_transfer.png",
// "assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png",
fit: BoxFit.fill, fit: BoxFit.fill,
width: 35, width: 35,
height: 30, height: 30,
@ -375,13 +458,15 @@ class LacumPointsWidget extends StatelessWidget {
Color titleColor; Color titleColor;
final List<PointsAmountPerYear> pointsAmountPerYear; final List<PointsAmountPerYear> pointsAmountPerYear;
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, this.point, this.pointsAmountPerYear) { LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal,
this.point, this.pointsAmountPerYear) {
if (pointType == 1) { if (pointType == 1) {
titleColor = Color(0xffefefef); titleColor = Color(0xffefefef);
} else if (pointType == 2) { } else if (pointType == 2) {
titleColor = Color(0xff004bcc); // titleColor = Color(0xff004bcc);
} else if (pointType == 3) {
titleColor = Color(0xff339933); titleColor = Color(0xff339933);
} else if (pointType == 3) {
titleColor = Colors.grey;
} else { } else {
titleColor = Color(0xffffa500); titleColor = Color(0xffffa500);
} }
@ -393,9 +478,11 @@ class LacumPointsWidget extends StatelessWidget {
onTap: () { onTap: () {
if (pointType != 1) { if (pointType != 1) {
if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) { if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) {
Navigator.push(context, FadePage(page: LakumPointsYearPage(pointsAmountPerYear))); Navigator.push(context,
FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).lakumMsg); AppToast.showErrorToast(
message: TranslationBase.of(context).lakumMsg);
// show snackBar No Details Points are there // show snackBar No Details Points are there
} }
} }
@ -410,7 +497,7 @@ class LacumPointsWidget extends StatelessWidget {
color: Color(0xffe1e1e1), color: Color(0xffe1e1e1),
width: 0.4, width: 0.4,
)), )),
color: pointType == 1 ? Colors.green : Color(0xffefefef), color: pointType == 1 ? Color(0xff339933) : Color(0xffefefef),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -19,14 +19,16 @@ class AvailabilityInfo extends StatelessWidget {
TranslationBase.of(context).noLocationAvailable, TranslationBase.of(context).noLocationAvailable,
), ),
) )
: ListView.builder( : Container(
margin: EdgeInsets.only(bottom: 40),
child: ListView.builder(
physics: ScrollPhysics(), physics: ScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
itemCount: previousModel.productLocationService.length, itemCount: previousModel.productLocationService.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Padding( return Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -52,7 +54,7 @@ class AvailabilityInfo extends StatelessWidget {
icon: Icon(Icons.location_on), icon: Icon(Icons.location_on),
color: Colors.red, color: Colors.red,
onPressed: () { onPressed: () {
MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].latitude), previousModel.productLocationService[index].locationDescription); MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription);
}, },
), ),
), ),
@ -73,6 +75,7 @@ class AvailabilityInfo extends StatelessWidget {
), ),
); );
}, },
),
); );
} }

@ -133,7 +133,7 @@ class _FooterWidgetState extends State<FooterWidget> {
height: 20, height: 20,
), ),
Container( Container(
height: 58, height: 55,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -290,18 +290,19 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
product: widget.product, product: widget.product,
previousModel: model, previousModel: model,
) )
: isAvailability && widget.product.stockAvailability != "Out of stock" : isAvailability
//&& widget.product.stockAvailability != "Out of stock"
? AvailabilityInfo(previousModel: model) ? AvailabilityInfo(previousModel: model)
: isAvailability && widget.product.stockAvailability == "Out of stock" // : isAvailability && widget.product.stockAvailability == "Out of stock"
? Container( // ? Container(
// padding: EdgeInsets.all(15), // // padding: EdgeInsets.all(15),
padding: EdgeInsets.fromLTRB(15, 15, 15, 20), // padding: EdgeInsets.fromLTRB(15, 15, 15, 20),
margin: EdgeInsets.only(bottom: 20), // margin: EdgeInsets.only(bottom: 20),
alignment: Alignment.center, // alignment: Alignment.center,
child: Text( // child: Text(
TranslationBase.of(context).noLocationAvailable, // TranslationBase.of(context).noLocationAvailable,
), // ),
) // )
: Container(), : Container(),
], ],
), ),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@ -57,22 +58,32 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
// SizedBox(width: 20), // SizedBox(width: 20),
if (widget.authenticatedUserObject.isLogin) if (widget.authenticatedUserObject.isLogin)
!widget.isStockAvailable && widget.customerId != null !widget.isStockAvailable && widget.customerId != null
? InkWell( ?BorderedButton(
onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id),
child: Row(children: [
Texts(
TranslationBase.of(context).notifyMe, TranslationBase.of(context).notifyMe,
decoration: TextDecoration.underline, hasBorder: true,
color: Colors.blue, borderColor: Colors.green,
), textColor: Colors.green,
SizedBox(width: 4), fontWeight: FontWeight.bold,
Icon( vPadding: 6,
FontAwesomeIcons.bell, hPadding: 14,
color: Colors.blue, handler: () => widget.notifyMeWhenAvailable(context, widget.item.id),
size: 15.0,
)
]),
) )
// InkWell(
// onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id),
// child: Row(children: [
// Texts(
// TranslationBase.of(context).notifyMe,
// decoration: TextDecoration.underline,
// color: Colors.blue,
// ),
// SizedBox(width: 4),
// Icon(
// FontAwesomeIcons.bell,
// color: Colors.blue,
// size: 15.0,
// )
// ]),
// )
: IconWithBg( : IconWithBg(
icon: !widget.isInWishList ? Icons.favorite_border : Icons.favorite, icon: !widget.isInWishList ? Icons.favorite_border : Icons.favorite,
color: !widget.isInWishList ? Colors.white : Colors.red[800], color: !widget.isInWishList ? Colors.white : Colors.red[800],

@ -59,7 +59,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
height: widget.mediaQuery.size.width * 1.0, height: widget.mediaQuery.size.width * 1.0,
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4), margin: EdgeInsets.fromLTRB(12, 75, 12, 0),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -70,13 +70,13 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [ children: [
Texts( Texts(
widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.memberName, widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.memberName,
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
), ),
Texts( Texts(
"${widget.model.lacumInformation.yahalaAccountNo}", "${widget.model.lacumInformation.yahalaAccountNo}",
fontSize: 16, fontSize: 13,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black, color: Colors.black,
), ),
@ -117,7 +117,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
], ],
), ),
SizedBox( SizedBox(
height: 10, height: 5,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -127,14 +127,14 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [ children: [
Texts(TranslationBase.of(context).identificationNumber, Texts(TranslationBase.of(context).identificationNumber,
// "IDENTIFICATION #", // "IDENTIFICATION #",
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
), ),
Texts( Texts(
widget.model.lacumInformation widget.model.lacumInformation
.identificationNo, .identificationNo,
fontSize: 16, fontSize: 13,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black, color: Colors.black,
), ),
@ -145,13 +145,13 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [ children: [
Texts(TranslationBase.of(context).MEMBERSINCE, Texts(TranslationBase.of(context).MEMBERSINCE,
// "MEMBER SINCE", // "MEMBER SINCE",
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
), ),
Texts( Texts(
widget.model.formatCreatedDateToString(), widget.model.formatCreatedDateToString(),
fontSize: 16, fontSize: 13,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black, color: Colors.black,
), ),
@ -160,7 +160,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
], ],
), ),
SizedBox( SizedBox(
height: 10, height: 5,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -170,13 +170,13 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [ children: [
Texts(TranslationBase.of(context).lakumMobile, Texts(TranslationBase.of(context).lakumMobile,
// "MOBILE #", // "MOBILE #",
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
), ),
Texts( Texts(
widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.mobileNumber, widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.mobileNumber,
fontSize: 16, fontSize: 13,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black, color: Colors.black,
), ),
@ -187,16 +187,16 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
children: [ children: [
Texts( Texts(
TranslationBase.of(context).language, TranslationBase.of(context).language,
fontSize: 14, fontSize: 13,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
), ),
Texts( Texts(
widget.model.lacumInformation.prefLang == widget.model.lacumInformation.prefLang ==
"1" "2"
? TranslationBase.of(context).lanEnglish ? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic, : TranslationBase.of(context).lanArabic,
fontSize: 16, fontSize: 13,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black, color: Colors.black,
), ),
@ -231,11 +231,15 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
), ),
Center( Center(
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4), margin: EdgeInsets.fromLTRB(5, 70, 5, 4),
child: widget.model.convertBase64ToBarCodeImage() != child: widget.model.convertBase64ToBarCodeImage() !=
null null
? Image.memory( ? Image.memory(
widget.model.convertBase64ToBarCodeImage()) widget.model.convertBase64ToBarCodeImage(),
fit: BoxFit.fill,
height: 100.0,
width: 180.0
)
: Container(), : Container(),
), ),
), ),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -16,6 +17,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/image.dart' as flutterImage; import 'package:flutter/src/widgets/image.dart' as flutterImage;
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
dynamic languageID; dynamic languageID;
@ -67,6 +69,8 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
ProjectViewModel projectViewModel = Provider.of(context);
this.context = context; this.context = context;
return BaseView<OrderModelViewModel>( return BaseView<OrderModelViewModel>(
onModelReady: (model) { onModelReady: (model) {
@ -132,7 +136,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
), ),
) )
: Text( : Text(
languageID == "ar" ? model.orderListModel[0].orderStatusn.toString() : model.orderListModel[0].orderStatus.toString(), projectProvider.isArabic ? model.orderListModel[0].orderStatusn.toString() : model.orderListModel[0].orderStatus.toString(),
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 13.0, fontSize: 13.0,
@ -337,7 +341,9 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
child: productTile( child: productTile(
productName: model.orderListModel[0].orderItems[index].product.name.toString(), productName: projectViewModel.isArabic ?
model.orderListModel[0].orderItems[index].product.namen.toString()
:model.orderListModel[0].orderItems[index].product.name.toString(),
productPrice: model.orderListModel[0].orderItems[index].product.price.toString(), productPrice: model.orderListModel[0].orderItems[index].product.price.toString(),
productRate: model.orderListModel[0].orderItems[index].product.approvedRatingSum.toDouble(), productRate: model.orderListModel[0].orderItems[index].product.approvedRatingSum.toDouble(),
productReviews: model.orderListModel[0].orderItems[index].product.approvedTotalReviews, productReviews: model.orderListModel[0].orderItems[index].product.approvedTotalReviews,

@ -531,6 +531,8 @@ class TranslationBase {
String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; String get expiryDate => localizedValues['expiryDate'][locale.languageCode];
String get expiryPoints => localizedValues['expiryPoints'][locale.languageCode];
String get procedureName => localizedValues['procedureName'][locale.languageCode]; String get procedureName => localizedValues['procedureName'][locale.languageCode];
String get procedure => localizedValues['procedure'][locale.languageCode]; String get procedure => localizedValues['procedure'][locale.languageCode];

Loading…
Cancel
Save