diff --git a/assets/images/pharmacy_module/lakum/akum_transfer.png b/assets/images/pharmacy_module/lakum/akum_transfer.png new file mode 100644 index 00000000..30785b08 Binary files /dev/null and b/assets/images/pharmacy_module/lakum/akum_transfer.png differ diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 1778603f..0ec2c7cd 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -246,6 +246,7 @@ const Map localizedValues = { "companyName": {"en": "Company Name:", "ar": "اسم الشركة: "}, "receiptOn": {"en": "Receipt on:", "ar": "تاريخ الفاتورة: "}, "expiryDate": {"en": "Expiry Date:", "ar": "تاريخ الانتهاء: "}, + "expiryPoints": {"en": "Expired", "ar": " منتهية الصلاحية"}, "expiryOn": {"en": "Expiry on:", "ar": "تاريخ الانتهاء: "}, "procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"}, "procedure": {"en": "Procedure", "ar": "اسم الاجراء:"}, diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index 4e50cecc..20257b18 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -63,7 +63,8 @@ class LakumMainPage extends StatelessWidget { SizedBox( 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: EdgeInsets.symmetric(horizontal: 8), child: Texts( - TranslationBase.of(context).expiryDate, + TranslationBase.of(context).expiryPoints, // "Expired", fontSize: 14, ), @@ -151,7 +152,7 @@ class LakumMainPage extends StatelessWidget { ], ), Texts( - "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints}${TranslationBase.of(context).lakumPoint} ", + "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} ${TranslationBase.of(context).lakumPoint} ", fontWeight: FontWeight.bold, fontSize: 14, ), @@ -340,7 +341,8 @@ class LakumHomeButtons extends StatelessWidget { child: Row( children: [ 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, width: 35, height: 30, @@ -379,9 +381,10 @@ class LacumPointsWidget extends StatelessWidget { if (pointType == 1) { titleColor = Color(0xffefefef); } else if (pointType == 2) { - titleColor = Color(0xff004bcc); - } else if (pointType == 3) { + // titleColor = Color(0xff004bcc); titleColor = Color(0xff339933); + } else if (pointType == 3) { + titleColor = Colors.grey; } else { titleColor = Color(0xffffa500); } @@ -410,7 +413,7 @@ class LacumPointsWidget extends StatelessWidget { color: Color(0xffe1e1e1), width: 0.4, )), - color: pointType == 1 ? Color(0xff004bcc) : Color(0xffefefef), + color: pointType == 1 ? Color(0xff339933) : Color(0xffefefef), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/pharmacies/screens/product-details/availability_info.dart b/lib/pages/pharmacies/screens/product-details/availability_info.dart index 2c10c8bf..a5ba0956 100644 --- a/lib/pages/pharmacies/screens/product-details/availability_info.dart +++ b/lib/pages/pharmacies/screens/product-details/availability_info.dart @@ -19,61 +19,64 @@ class AvailabilityInfo extends StatelessWidget { TranslationBase.of(context).noLocationAvailable, ), ) - : ListView.builder( - physics: ScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: previousModel.productLocationService.length, - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - flex: 1, - child: Image.network(previousModel.productLocationService[index].projectImageUrl), - ), - SizedBox( - width: 10, - ), - Expanded( - flex: 4, - child: Text( - previousModel.productLocationService[index].locationDescription + "\n" + previousModel.productLocationService[index].cityName.toString(), - style: TextStyle(fontSize: 12), + : Container( + margin: EdgeInsets.only(bottom: 40), + child: ListView.builder( + physics: ScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: previousModel.productLocationService.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(8), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Image.network(previousModel.productLocationService[index].projectImageUrl), ), - ), - Expanded( - flex: 1, - child: IconButton( - icon: Icon(Icons.location_on), - color: Colors.red, - onPressed: () { - MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].latitude), previousModel.productLocationService[index].locationDescription); - }, + SizedBox( + width: 10, ), - ), - Expanded( - flex: 1, - child: IconButton( - icon: Icon(Icons.phone), - color: Colors.red, - onPressed: () { - launch("tel://" + previousModel.productLocationService[index].phoneNumber); - }, + Expanded( + flex: 4, + child: Text( + previousModel.productLocationService[index].locationDescription + "\n" + previousModel.productLocationService[index].cityName.toString(), + style: TextStyle(fontSize: 12), + ), ), - ), - ], - ), - Divider(height: 1.2, color: Colors.grey) - ], - ), - ); - }, - ); + Expanded( + flex: 1, + child: IconButton( + icon: Icon(Icons.location_on), + color: Colors.red, + onPressed: () { + MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription); + }, + ), + ), + Expanded( + flex: 1, + child: IconButton( + icon: Icon(Icons.phone), + color: Colors.red, + onPressed: () { + launch("tel://" + previousModel.productLocationService[index].phoneNumber); + }, + ), + ), + ], + ), + Divider(height: 1.2, color: Colors.grey) + ], + ), + ); + }, + ), + ); } convertCityName(txt) { diff --git a/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart index 2d9a3489..3520b305 100644 --- a/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart +++ b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart @@ -133,7 +133,7 @@ class _FooterWidgetState extends State { height: 20, ), Container( - height: 58, + height: 55, child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart b/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart index 0f25b236..f71c92a4 100644 --- a/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart +++ b/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart' import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -57,22 +58,32 @@ class _ProductNameAndPriceState extends State { // SizedBox(width: 20), if (widget.authenticatedUserObject.isLogin) !widget.isStockAvailable && widget.customerId != null - ? InkWell( - onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id), - child: Row(children: [ - Texts( + ?BorderedButton( TranslationBase.of(context).notifyMe, - decoration: TextDecoration.underline, - color: Colors.blue, - ), - SizedBox(width: 4), - Icon( - FontAwesomeIcons.bell, - color: Colors.blue, - size: 15.0, - ) - ]), - ) + hasBorder: true, + borderColor: Colors.green, + textColor: Colors.green, + fontWeight: FontWeight.bold, + vPadding: 6, + hPadding: 14, + handler: () => widget.notifyMeWhenAvailable(context, widget.item.id), + ) +// 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( icon: !widget.isInWishList ? Icons.favorite_border : Icons.favorite, color: !widget.isInWishList ? Colors.white : Colors.red[800], diff --git a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart index 60ca4693..d4b4bab7 100644 --- a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart +++ b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart @@ -59,7 +59,7 @@ class _LakumBannerWidgetState extends State { height: widget.mediaQuery.size.width * 1.0, ), Container( - margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + margin: EdgeInsets.fromLTRB(12, 75, 12, 0), child: Column( children: [ Row( @@ -70,13 +70,13 @@ class _LakumBannerWidgetState extends State { children: [ Texts( widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.memberName, - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( "${widget.model.lacumInformation.yahalaAccountNo}", - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -117,7 +117,7 @@ class _LakumBannerWidgetState extends State { ], ), SizedBox( - height: 10, + height: 5, ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -127,14 +127,14 @@ class _LakumBannerWidgetState extends State { children: [ Texts(TranslationBase.of(context).identificationNumber, // "IDENTIFICATION #", - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.lacumInformation .identificationNo, - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -145,13 +145,13 @@ class _LakumBannerWidgetState extends State { children: [ Texts(TranslationBase.of(context).MEMBERSINCE, // "MEMBER SINCE", - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.formatCreatedDateToString(), - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -160,7 +160,7 @@ class _LakumBannerWidgetState extends State { ], ), SizedBox( - height: 10, + height: 5, ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -170,13 +170,13 @@ class _LakumBannerWidgetState extends State { children: [ Texts(TranslationBase.of(context).lakumMobile, // "MOBILE #", - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.lacumGroupInformation.lakumInquiryInformationObjVersion.mobileNumber, - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -187,16 +187,16 @@ class _LakumBannerWidgetState extends State { children: [ Texts( TranslationBase.of(context).language, - fontSize: 14, + fontSize: 13, fontWeight: FontWeight.bold, color: Colors.black, ), Texts( widget.model.lacumInformation.prefLang == - "1" + "2" ? TranslationBase.of(context).lanEnglish : TranslationBase.of(context).lanArabic, - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.normal, color: Colors.black, ), @@ -231,7 +231,7 @@ class _LakumBannerWidgetState extends State { ), Center( child: Container( - margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + margin: EdgeInsets.fromLTRB(20, 70, 20, 4), child: widget.model.convertBase64ToBarCodeImage() != null ? Image.memory( diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 0ce07ec4..98f43101 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -531,6 +531,8 @@ class TranslationBase { String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; + String get expiryPoints => localizedValues['expiryPoints'][locale.languageCode]; + String get procedureName => localizedValues['procedureName'][locale.languageCode]; String get procedure => localizedValues['procedure'][locale.languageCode];