fixed issues

merge-requests/539/head
Fatimah Alshammari 4 years ago
parent ffc2f2b4bb
commit a858d8764a

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": "اسم الاجراء:"},

@ -63,7 +63,8 @@ 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)),
], ],
) )
], ],
@ -143,7 +144,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,
), ),
@ -151,7 +152,7 @@ class LakumMainPage extends StatelessWidget {
], ],
), ),
Texts( Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints}${TranslationBase.of(context).lakumPoint} ", "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} ${TranslationBase.of(context).lakumPoint} ",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
@ -340,7 +341,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,
@ -379,9 +381,10 @@ class LacumPointsWidget extends StatelessWidget {
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);
} }
@ -410,7 +413,7 @@ class LacumPointsWidget extends StatelessWidget {
color: Color(0xffe1e1e1), color: Color(0xffe1e1e1),
width: 0.4, width: 0.4,
)), )),
color: pointType == 1 ? Color(0xff004bcc) : 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,

@ -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,7 +231,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
), ),
Center( Center(
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4), margin: EdgeInsets.fromLTRB(20, 70, 20, 4),
child: widget.model.convertBase64ToBarCodeImage() != child: widget.model.convertBase64ToBarCodeImage() !=
null null
? Image.memory( ? Image.memory(

@ -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