Merge branch 'fatima-new' into 'development'

Fatima new

See merge request Cloud_Solution/diplomatic-quarter!451
merge-update-with-lab-changes
haroon amjad 4 years ago
commit a40cd6ccd2

@ -20,7 +20,7 @@ class PharmacyProduct {
bool allowCustomerReviews; bool allowCustomerReviews;
int approvedRatingSum; int approvedRatingSum;
int notApprovedRatingSum; int notApprovedRatingSum;
int approvedTotalReviews; dynamic approvedTotalReviews;
int notApprovedTotalReviews; int notApprovedTotalReviews;
dynamic sku; dynamic sku;
bool isRx; bool isRx;

@ -24,7 +24,7 @@ class OrdersModel {
class Orders { class Orders {
String id; String id;
int productCount; int productCount;
double orderTotal; dynamic orderTotal;
String createdOnUtc; String createdOnUtc;
int orderStatusId; int orderStatusId;
String orderStatus; String orderStatus;
@ -32,9 +32,9 @@ class Orders {
bool canCancel; bool canCancel;
bool canRefund; bool canRefund;
dynamic customerId; dynamic customerId;
double orderSubtotalExclTax; dynamic orderSubtotalExclTax;
dynamic orderShippingExclTax; dynamic orderShippingExclTax;
double orderTax; dynamic orderTax;
Orders( Orders(
@ -64,9 +64,9 @@ class Orders {
canCancel = json['can_cancel']; canCancel = json['can_cancel'];
canRefund = json['can_refund']; canRefund = json['can_refund'];
customerId = json['customer_id']; customerId = json['customer_id'];
orderSubtotalExclTax= json["order_subtotal_excl_tax"].toDouble(); orderSubtotalExclTax= json["order_subtotal_excl_tax"];
orderShippingExclTax= json["order_shipping_excl_tax"]; orderShippingExclTax= json["order_shipping_excl_tax"];
orderTax= json["order_tax"].toDouble(); orderTax= json["order_tax"];
}catch(e){ }catch(e){
print(e); print(e);
} }

@ -621,19 +621,18 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.finalProducts[index].rxMessage == null){ if(model.finalProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.finalProducts[index].id); await addToCartFunction(1, model.finalProducts[index].id);
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));
);
} }
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
} }
GifLoaderDialogUtils.hideDialog(context); //
} }
), ),

@ -1175,18 +1175,18 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.parentProducts[index].rxMessage == null){ if(model.parentProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.parentProducts[index].id); await addToCartFunction(1, model.parentProducts[index].id);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));
);
} }
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
} }
GifLoaderDialogUtils.hideDialog(context);
} }
), ),

@ -32,6 +32,7 @@ class _ProductCheckTypeWidgetState extends State<ProductCheckTypeWidget> {
: widget.model.wishListList[index].product.name, : widget.model.wishListList[index].product.name,
productPrice: widget.model.wishListList[index].subtotal, productPrice: widget.model.wishListList[index].subtotal,
productRate: double.parse(widget.model.wishListList[index].subtotalVatRate), productRate: double.parse(widget.model.wishListList[index].subtotalVatRate),
approvedTotalReviews:widget.model.wishListList[index].product.approvedTotalReviews,
productImage: widget.model.wishListList[index].product.images[0].src, productImage: widget.model.wishListList[index].product.images[0].src,
productID: widget.model.wishListList[index].product.id, productID: widget.model.wishListList[index].product.id,
onDelete: deleteWishListItem, onDelete: deleteWishListItem,

@ -4,6 +4,7 @@ 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:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class ProductOrderItem extends StatefulWidget { class ProductOrderItem extends StatefulWidget {
@ -39,7 +40,7 @@ class _ProductOrderItemState extends State<ProductOrderItem> {
leading: InkWell( leading: InkWell(
onTap: () => {widget.deleteCartItems()}, onTap: () => {widget.deleteCartItems()},
child: Icon( child: Icon(
Icons.delete_outline_sharp, FontAwesomeIcons.trashAlt,size: 15,
color: Colors.grey.shade700, color: Colors.grey.shade700,
), ),
), ),

@ -70,6 +70,7 @@ class _OrderPageState extends State<OrderPage>
TabBar( TabBar(
labelPadding: EdgeInsets.only(left: 3.0, right: 3.0), labelPadding: EdgeInsets.only(left: 3.0, right: 3.0),
labelColor: Colors.black, labelColor: Colors.black,
indicatorColor: Colors.green,
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).delivered), Tab(text: TranslationBase.of(context).delivered),
Tab(text: TranslationBase.of(context).processing), Tab(text: TranslationBase.of(context).processing),
@ -127,7 +128,18 @@ class _OrderPageState extends State<OrderPage>
return Container( return Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
deliveredOrderList[
index]),
));
},
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
@ -196,17 +208,6 @@ class _OrderPageState extends State<OrderPage>
), ),
Container( Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
deliveredOrderList[
index]),
));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -215,9 +216,9 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
),
], ],
), ),
),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],
height: 20, height: 20,
@ -394,7 +395,17 @@ class _OrderPageState extends State<OrderPage>
return Container( return Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
processingOrderList[
index])));
},
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
@ -463,16 +474,6 @@ class _OrderPageState extends State<OrderPage>
), ),
Container( Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
processingOrderList[
index])));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -481,9 +482,9 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
),
], ],
), ),
),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],
height: 20, height: 20,
@ -837,7 +838,17 @@ class _OrderPageState extends State<OrderPage>
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
pendingOrderList[
index])));
},
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
@ -908,16 +919,6 @@ class _OrderPageState extends State<OrderPage>
), ),
Container( Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
pendingOrderList[
index])));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -926,9 +927,9 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
),
], ],
), ),
),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],
height: 20, height: 20,
@ -1106,7 +1107,17 @@ class _OrderPageState extends State<OrderPage>
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
cancelledOrderList[
index])));
},
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
@ -1177,16 +1188,6 @@ class _OrderPageState extends State<OrderPage>
), ),
Container( Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
cancelledOrderList[
index])));
},
child: SvgPicture.asset( child: SvgPicture.asset(
languageID == "ar" languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg' ? 'assets/images/pharmacy/arrow_left.svg'
@ -1195,9 +1196,9 @@ class _OrderPageState extends State<OrderPage>
width: 20, width: 20,
), ),
), ),
),
], ],
), ),
),
Divider( Divider(
color: Colors.grey[350], color: Colors.grey[350],
height: 20, height: 20,

@ -321,8 +321,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
margin: EdgeInsets.only(bottom: 10.0, top: 10.0), margin: EdgeInsets.only(bottom: 10.0, top: 10.0),
child: Text( child: Text(
model.orderListModel[0].paymentName model.orderListModel[0].paymentName
.toString() .toString(),
.substring(12),
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

@ -1072,18 +1072,17 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.subProducts[index].rxMessage == null){ if(model.subProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.subProducts[index].id); await addToCartFunction(1, model.subProducts[index].id);
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));}
);}
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
} }
GifLoaderDialogUtils.hideDialog(context);
} }
), ),

@ -45,9 +45,9 @@ class BottomNavHomeItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox( // SizedBox(
height: 15, // height: 15,
), // ),
currentIndex == index currentIndex == index
? Divider( ? Divider(
// color: Color(0xff5AB145), // color: Color(0xff5AB145),
@ -57,20 +57,25 @@ class BottomNavHomeItem extends StatelessWidget {
thickness: 0, thickness: 0,
), ),
Container( Container(
margin: EdgeInsets.only(bottom: 5.0),
child: Image.asset( child: Image.asset(
'assets/images/habib-logo.png', 'assets/images/habib-logo.png',
), ),
height: 22.0, height: 22.0,
), ),
SizedBox( SizedBox(
height: 9, height: 5,
), ),
Texts( Container(
margin: EdgeInsets.only(bottom: 7.0),
child: Texts(
title, title,
textAlign: TextAlign.start, textAlign: TextAlign.start,
color: currentIndex == index ? Colors.grey : Colors.grey, color: currentIndex == index ? Colors.grey : Colors.grey,
fontSize: 11, fontSize: 11,
), ),
),
// Added TextAlign Property // Added TextAlign Property
], ],
), ),

@ -39,7 +39,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
return Expanded( return Expanded(
child: SizedBox( child: SizedBox(
// height: 72.0, height: 66.0,
child: Stack( child: Stack(
clipBehavior: Clip.none, clipBehavior: Clip.none,
children: [ children: [
@ -63,17 +63,18 @@ class BottomNavPharmacyItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox( // SizedBox(
height: 15, // height: 15,
), // ),
currentIndex == index currentIndex == index
? Divider( ? Divider(
color: Color(0xff5AB145), color: Color(0xff5AB133),
thickness: 3.5, thickness: 3.5,
) )
: Divider( : Divider(
thickness: 0, thickness: 0,
), ),
Container( Container(
child: Icon(currentIndex == index ? activeIcon : icon, child: Icon(currentIndex == index ? activeIcon : icon,
color: isHome color: isHome
@ -81,7 +82,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
: currentIndex == index : currentIndex == index
? Colors.grey ? Colors.grey
: Colors.grey, : Colors.grey,
size: 22.0), size: 20.0),
), ),
SizedBox( SizedBox(
height: 11, height: 11,
@ -93,7 +94,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: currentIndex == index ? Colors.grey : Colors.grey, color: currentIndex == index ? Colors.grey : Colors.grey,
fontWeight: currentIndex == index fontWeight: currentIndex == index
? FontWeight.bold ? FontWeight.normal
: FontWeight.w400, : FontWeight.w400,
fontSize: currentIndex == index ? 13 : 11, fontSize: currentIndex == index ? 13 : 11,
), ),
@ -108,13 +109,13 @@ class BottomNavPharmacyItem extends StatelessWidget {
0) 0)
Positioned( Positioned(
top: 11.5, top: 11.5,
right: -4.5, right: -3.5,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.red, color: Colors.red,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
), ),
padding: EdgeInsets.only(left: 7, right: 6.5), padding: EdgeInsets.only(left: 6.5, right: 6.5),
height: 18, height: 18,
child: Center( child: Center(
child: Texts( child: Texts(

@ -25,6 +25,7 @@ class productTile extends StatelessWidget {
final PharmacyProduct product; final PharmacyProduct product;
final dynamic productID; final dynamic productID;
final Function onDelete; final Function onDelete;
final dynamic approvedTotalReviews;
// final VoidCallback deleteWishlistItems; // final VoidCallback deleteWishlistItems;
productTile( productTile(
@ -43,6 +44,8 @@ class productTile extends StatelessWidget {
this.product, this.product,
this.productID, this.productID,
this.onDelete, this.onDelete,
this.approvedTotalReviews,
}); });
@override @override
@ -112,7 +115,10 @@ class productTile extends StatelessWidget {
), ),
), ),
this.isOrderDetails == false this.isOrderDetails == false
? Container( ? Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
@ -127,6 +133,14 @@ class productTile extends StatelessWidget {
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
), ),
),
Text( '$approvedTotalReviews',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.grey,
fontSize: 13),
),
],
) )
: Container(), : Container(),
], ],
@ -150,7 +164,9 @@ class productTile extends StatelessWidget {
height: 50, height: 50,
), ),
IconButton( IconButton(
icon: Icon(FontAwesomeIcons.shoppingCart, size: 15), icon: Icon(Icons.shopping_cart,
size: 18,
color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, productID); await addToCartFunction(1, productID);

Loading…
Cancel
Save