From fedd76fc67497762ce52eaefe2964d288dafc0c2 Mon Sep 17 00:00:00 2001 From: Anthony Date: Mon, 3 Jul 2023 07:46:19 +0100 Subject: [PATCH] v6.8.0 --- LabelStoreMax/CHANGELOG.md | 8 + LabelStoreMax/README.md | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 3 + LabelStoreMax/ios/Runner/Info.plist | 4 +- LabelStoreMax/lib/app/models/user.dart | 2 +- .../lib/app/providers/firebase_provider.dart | 4 +- .../lib/bootstrap/data/order_wc.dart | 3 +- LabelStoreMax/lib/config/decoders.dart | 2 + LabelStoreMax/lib/config/events.dart | 1 + .../pages/account_order_detail_page.dart | 280 +++++++++--------- .../pages/checkout_confirmation_page.dart | 221 +++++++------- .../resources/pages/checkout_status_page.dart | 3 +- .../lib/resources/pages/coupon_page.dart | 4 +- .../resources/pages/product_detail_page.dart | 2 +- .../resources/themes/styles/color_styles.dart | 14 + .../checkout_select_coupon_widget.dart | 9 +- .../lib/resources/widgets/woosignal_ui.dart | 107 ++++--- LabelStoreMax/pubspec.lock | 32 +- LabelStoreMax/pubspec.yaml | 12 +- README.md | 2 +- 20 files changed, 375 insertions(+), 340 deletions(-) diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index fcfedd3..3bad642 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,11 @@ +## [6.8.0] - 2023-07-03 + +* UI fixes. +* Fix price on coupon page error alerts. +* Fix issue where IOS builds were not using the correct build version. +* Small refactor to the project. +* Pubspec.yaml dependency updates. + ## [6.7.0] - 2023-06-20 * Refactor project for Nylo 5.x. diff --git a/LabelStoreMax/README.md b/LabelStoreMax/README.md index 5b960c3..26d7255 100644 --- a/LabelStoreMax/README.md +++ b/LabelStoreMax/README.md @@ -43,7 +43,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/label-st - Browse products, make orders, customer login (via WordPress) - Change app name, logo, customize default language, currency + more - Light and dark mode -- Stripe, Cash On Delivery, PayPal +- Stripe, Cash On Delivery, PayPal, RazorPay - Localized for en, es, pt, it, hi, fr, zh, tr, nl, de - Orders show as normal in WooCommerce diff --git a/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj b/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj index fcc1016..773787e 100644 --- a/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj +++ b/LabelStoreMax/ios/Runner.xcodeproj/project.pbxproj @@ -373,6 +373,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.flutter.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -511,6 +512,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.flutter.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -543,6 +545,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.flutter.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/LabelStoreMax/ios/Runner/Info.plist b/LabelStoreMax/ios/Runner/Info.plist index 0e62598..b5ea6ea 100644 --- a/LabelStoreMax/ios/Runner/Info.plist +++ b/LabelStoreMax/ios/Runner/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleURLTypes @@ -34,7 +34,7 @@ CFBundleVersion - $(FLUTTER_BUILD_NUMBER) + $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS MinimumOSVersion diff --git a/LabelStoreMax/lib/app/models/user.dart b/LabelStoreMax/lib/app/models/user.dart index 0cc5660..0adaa13 100644 --- a/LabelStoreMax/lib/app/models/user.dart +++ b/LabelStoreMax/lib/app/models/user.dart @@ -19,7 +19,7 @@ class User extends Model { toJson() => {"token": token, "user_id": userId}; - fromJson(dynamic data) { + User.fromJson(dynamic data) { token = data['token']; userId = data['user_id']; } diff --git a/LabelStoreMax/lib/app/providers/firebase_provider.dart b/LabelStoreMax/lib/app/providers/firebase_provider.dart index 463c897..866e533 100644 --- a/LabelStoreMax/lib/app/providers/firebase_provider.dart +++ b/LabelStoreMax/lib/app/providers/firebase_provider.dart @@ -6,13 +6,15 @@ import 'package:woosignal/woosignal.dart'; class FirebaseProvider implements NyProvider { + @override boot(Nylo nylo) async { return null; } + @override afterBoot(Nylo nylo) async { - if (getEnv('FCM_ENABLED') != true) return; + if (getEnv('FCM_ENABLED', defaultValue: false) != true) return; await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, diff --git a/LabelStoreMax/lib/bootstrap/data/order_wc.dart b/LabelStoreMax/lib/bootstrap/data/order_wc.dart index 074cd8c..60ff2e0 100644 --- a/LabelStoreMax/lib/bootstrap/data/order_wc.dart +++ b/LabelStoreMax/lib/bootstrap/data/order_wc.dart @@ -15,6 +15,7 @@ import 'package:flutter_app/app/models/cart.dart'; import 'package:flutter_app/app/models/cart_line_item.dart'; import 'package:flutter_app/app/models/checkout_session.dart'; import 'package:flutter_app/bootstrap/app_helper.dart'; +import 'package:flutter_app/bootstrap/helpers.dart'; import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart'; import 'package:woosignal/models/payload/order_wc.dart'; import 'package:woosignal/models/response/tax_rate.dart'; @@ -51,7 +52,7 @@ Future buildOrderWC({TaxRate? taxRate, bool markPaid = true}) async { tmpLineItem.variationId = cartItem.variationId; } - tmpLineItem.subtotal = cartItem.subtotal; + tmpLineItem.subtotal = (parseWcPrice(cartItem.subtotal) * parseWcPrice(cartItem.quantity.toString())).toString(); lineItems.add(tmpLineItem); } diff --git a/LabelStoreMax/lib/config/decoders.dart b/LabelStoreMax/lib/config/decoders.dart index 714c54d..0d7cd3e 100644 --- a/LabelStoreMax/lib/config/decoders.dart +++ b/LabelStoreMax/lib/config/decoders.dart @@ -1,3 +1,4 @@ +import 'package:flutter_app/app/models/user.dart'; import 'package:flutter_app/app/networking/api_service.dart'; import 'package:flutter_app/app/networking/dio/base_api_service.dart'; @@ -12,6 +13,7 @@ import 'package:flutter_app/app/networking/dio/base_api_service.dart'; final Map modelDecoders = { // ... + User: (data) => User.fromJson(data) }; /* diff --git a/LabelStoreMax/lib/config/events.dart b/LabelStoreMax/lib/config/events.dart index d6c697a..5a40d4c 100644 --- a/LabelStoreMax/lib/config/events.dart +++ b/LabelStoreMax/lib/config/events.dart @@ -15,4 +15,5 @@ import 'package:nylo_framework/nylo_framework.dart'; final Map events = { LoginEvent: LoginEvent(), LogoutEvent: LogoutEvent(), + AuthUserEvent: AuthUserEvent(), }; diff --git a/LabelStoreMax/lib/resources/pages/account_order_detail_page.dart b/LabelStoreMax/lib/resources/pages/account_order_detail_page.dart index b1d9e49..71215df 100644 --- a/LabelStoreMax/lib/resources/pages/account_order_detail_page.dart +++ b/LabelStoreMax/lib/resources/pages/account_order_detail_page.dart @@ -8,10 +8,10 @@ // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_app/app/controllers/account_order_detail_controller.dart'; import 'package:flutter_app/bootstrap/helpers.dart'; -import 'package:flutter_app/resources/widgets/app_loader_widget.dart'; import 'package:flutter_app/resources/widgets/safearea_widget.dart'; import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; import 'package:nylo_framework/nylo_framework.dart'; @@ -29,10 +29,14 @@ class AccountOrderDetailPage extends NyStatefulWidget { class _AccountOrderDetailPageState extends NyState { int? _orderId; Order? _order; - bool _isLoading = true; @override init() async { + super.init(); + } + + @override + boot() async { _orderId = widget.controller.data(); await _fetchOrder(); } @@ -48,149 +52,160 @@ class _AccountOrderDetailPageState extends NyState { ), margin: EdgeInsets.only(left: 0), ), - title: Text("${trans("Order").capitalize()} #${_orderId.toString()}"), + title: afterNotNull(_orderId, child: () => Text("${trans("Order").capitalize()} #${_orderId.toString()}"), loadingPlaceholder: CupertinoActivityIndicator()), centerTitle: true, ), resizeToAvoidBottomInset: false, body: SafeAreaWidget( - child: _isLoading - ? AppLoaderWidget() - : Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, + child: afterLoad(child: () => Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(top: 8), + child: Text( + "${trans("Date Ordered").capitalize()}: ${dateFormatted( + date: _order?.dateCreated ?? "", + formatType: formatForDateTime(FormatType.date), + )}", + ), + ), + Container( + margin: EdgeInsets.only(top: 10, bottom: 10), + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Padding( - padding: EdgeInsets.only(top: 8), + Flexible( + child: Text("${trans("Ships to").capitalize()}:"), + ), + Flexible( child: Text( - "${trans("Date Ordered").capitalize()}: ${dateFormatted( - date: _order?.dateCreated ?? "", - formatType: formatForDateTime(FormatType.date), - )}", + [ + [ + _order!.shipping!.firstName, + _order!.shipping!.lastName + ].where((t) => t != null).toList().join(" "), + _order!.shipping!.address1, + _order!.shipping!.address2, + _order!.shipping!.city, + _order!.shipping!.state, + _order!.shipping!.postcode, + _order!.shipping!.country, + ] + .where((t) => (t != "" && t != null)) + .toList() + .join("\n"), + textAlign: TextAlign.right, ), ), - Container( - margin: EdgeInsets.only(top: 10, bottom: 10), - padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: Text("${trans("Ships to").capitalize()}:"), - ), - Flexible( - child: Text( - [ - [ - _order!.shipping!.firstName, - _order!.shipping!.lastName - ].where((t) => t != null).toList().join(" "), - _order!.shipping!.address1, - _order!.shipping!.address2, - _order!.shipping!.city, - _order!.shipping!.state, - _order!.shipping!.postcode, - _order!.shipping!.country, - ] - .where((t) => (t != "" && t != null)) - .toList() - .join("\n"), - textAlign: TextAlign.right, + ], + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + boxShadow: + (Theme.of(context).brightness == Brightness.light) + ? wsBoxShadow() + : null, + color: (Theme.of(context).brightness == Brightness.light) + ? Colors.white + : Color(0xFF2C2C2C), + ), + ), + Expanded( + child: ListView.builder( + itemBuilder: (cxt, i) { + LineItems lineItem = _order!.lineItems![i]; + return Card( + child: ListTile( + contentPadding: EdgeInsets.only( + top: 5, bottom: 5, left: 8, right: 6), + title: Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Color(0xFFFCFCFC), width: 1), ), ), - ], - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - boxShadow: - (Theme.of(context).brightness == Brightness.light) - ? wsBoxShadow() - : null, - color: (Theme.of(context).brightness == Brightness.light) - ? Colors.white - : Color(0xFF2C2C2C), - ), - ), - Expanded( - child: ListView.builder( - itemBuilder: (cxt, i) { - LineItems lineItem = _order!.lineItems![i]; - return Card( - child: ListTile( - contentPadding: EdgeInsets.only( - top: 5, bottom: 5, left: 8, right: 6), - title: Container( - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Color(0xFFFCFCFC), width: 1), - ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Flexible( + child: Text( + lineItem.name!, + maxLines: 2, + overflow: TextOverflow.ellipsis, ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: Text( - lineItem.name!, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ), - Text( - formatStringCurrency(total: lineItem.price) - .capitalize(), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ], + ), + Container( + width: 70, + alignment: Alignment.topRight, + child: Text( + formatStringCurrency(total: lineItem.total) + .capitalize(), + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: FontWeight.bold + ), ), ), - subtitle: Padding( - padding: const EdgeInsets.only(top: 10), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - formatStringCurrency( - total: lineItem.total, - ), - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith( - fontWeight: FontWeight.w600, - ), - textAlign: TextAlign.left, - ), - Text( - "x${lineItem.quantity.toString()}", - style: Theme.of(context) - .textTheme - .bodyLarge, - textAlign: TextAlign.left, - ), - ], + ], + ), + ), + subtitle: Container( + decoration: BoxDecoration( + border: Border( + top: BorderSide(color: Colors.grey[100]!) + ) + ), + padding: const EdgeInsets.only(top: 10), + margin: EdgeInsets.only(top: 4), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + formatStringCurrency( + total: lineItem.price, ), - ], - ), + style: Theme.of(context) + .textTheme + .bodyMedium! + .copyWith( + fontWeight: FontWeight.w600, + ), + textAlign: TextAlign.left, + ), + Text( + "x ${lineItem.quantity.toString()}", + style: Theme.of(context) + .textTheme + .bodyLarge, + textAlign: TextAlign.left, + ), + ], ), - ), - ); - }, - itemCount: _order!.lineItems!.length, + ], + ), + ), ), - ), - ], + ); + }, + itemCount: _order?.lineItems?.length ?? 0, ), + ), + ], + )), ), ); } @@ -201,13 +216,6 @@ class _AccountOrderDetailPageState extends NyState { } _fetchOrder() async { - _order = await (appWooSignal((api) { - return api.retrieveOrder(_orderId!); - })); - if (_order != null) { - setState(() { - _isLoading = false; - }); - } + _order = await (appWooSignal((api) => api.retrieveOrder(_orderId!))); } } diff --git a/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart b/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart index 728fcdc..fc7b500 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_confirmation_page.dart @@ -58,7 +58,6 @@ class CheckoutConfirmationPageState extends NyState { CheckoutSession.getInstance.paymentType = paymentTypes.firstWhere( (paymentType) => paymentType?.id == 20, orElse: () => paymentTypes.first); - print(CheckoutSession.getInstance.paymentType?.name); } _getTaxes(); } @@ -203,126 +202,124 @@ class CheckoutConfirmationPageState extends NyState { resizeToAvoidBottomInset: false, body: SafeAreaWidget( child: Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, + child: ListView( + shrinkWrap: true, children: [ - Expanded( - child: ListView( - shrinkWrap: true, - children: [ - CheckoutStoreHeadingWidget(), - CheckoutUserDetailsWidget( - context: context, - checkoutSession: checkoutSession, - resetState: () { - setState(() { - _showFullLoader = true; - }); - _getTaxes(); - }, - ), - CheckoutPaymentTypeWidget( + ListView( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + children: [ + CheckoutStoreHeadingWidget(), + CheckoutUserDetailsWidget( + context: context, + checkoutSession: checkoutSession, + resetState: () { + setState(() { + _showFullLoader = true; + }); + _getTaxes(); + }, + ), + CheckoutPaymentTypeWidget( + context: context, + checkoutSession: checkoutSession, + resetState: () => setState(() {}), + ), + CheckoutShippingTypeWidget( + context: context, + checkoutSession: checkoutSession, + resetState: () => setState(() {}), + wooSignalApp: _wooSignalApp, + ), + if (_wooSignalApp!.couponEnabled == true) + CheckoutSelectCouponWidget( context: context, checkoutSession: checkoutSession, resetState: () => setState(() {}), ), - CheckoutShippingTypeWidget( - context: context, - checkoutSession: checkoutSession, - resetState: () => setState(() {}), - wooSignalApp: _wooSignalApp, + Container( + decoration: BoxDecoration( + boxShadow: wsBoxShadow(), + color: Colors.white, + // borderRadius: BorderRadius.circular(16) ), - if (_wooSignalApp!.couponEnabled == true) - CheckoutSelectCouponWidget( - context: context, - checkoutSession: checkoutSession, - resetState: () => setState(() {}), - ), - Container( - decoration: BoxDecoration( - boxShadow: wsBoxShadow(), - color: Colors.white, - // borderRadius: BorderRadius.circular(16) - ), - padding: EdgeInsets.symmetric(vertical: 16), - margin: EdgeInsets.only(top: 20), - child: Column( - children: [ - Container( - padding: EdgeInsets.symmetric(horizontal: 8), - child: Row( - children: [ - Icon(Icons.receipt), - Padding(padding: EdgeInsets.only(right: 8),), - Text(trans("Order Summary")).fontWeightBold() - ], - ), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.end, + padding: EdgeInsets.symmetric(vertical: 16), + margin: EdgeInsets.only(top: 20), + child: Column( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Row( children: [ - Padding(padding: EdgeInsets.only(top: 16)), - CheckoutSubtotal( - title: trans("Subtotal"), - ), - CheckoutCouponAmountWidget( - checkoutSession: checkoutSession), - if (_wooSignalApp!.disableShipping != 1) - CheckoutMetaLine( - title: trans("Shipping fee"), - amount: CheckoutSession - .getInstance.shippingType == - null - ? trans("Select shipping") - : CheckoutSession - .getInstance.shippingType! - .getTotal(withFormatting: true)), - if (_taxRate != null) - CheckoutTaxTotal(taxRate: _taxRate), - Padding(padding: EdgeInsets.only(top: 8, left: 8, right: 8)), - Padding(padding: EdgeInsets.symmetric(horizontal: 8), child: RichText( - textAlign: TextAlign.left, - text: TextSpan( - text: - '${trans('By completing this order, I agree to all')} ', - style: Theme.of(context).textTheme.bodySmall!.copyWith( - fontSize: 12, - ), - children: [ - TextSpan( - recognizer: TapGestureRecognizer()..onTap = _openTermsLink, - text: trans("Terms and conditions").toLowerCase(), - style: Theme.of(context) - .textTheme - .bodySmall! - .copyWith( - color: ThemeColor.get(context) - .primaryAccent, - fontSize: 12, - ), - ), - TextSpan( - text: ".", - style: Theme.of(context) - .textTheme - .bodySmall! - .copyWith( - color: Colors.black87, - fontSize: 12, - ), - ), - ], - ), - )), + Icon(Icons.receipt), + Padding(padding: EdgeInsets.only(right: 8),), + Text(trans("Order Summary")).fontWeightBold() ], ), - ], - ), - ) - ], - ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding(padding: EdgeInsets.only(top: 16)), + CheckoutSubtotal( + title: trans("Subtotal"), + ), + CheckoutCouponAmountWidget( + checkoutSession: checkoutSession), + if (_wooSignalApp!.disableShipping != 1) + CheckoutMetaLine( + title: trans("Shipping fee"), + amount: CheckoutSession + .getInstance.shippingType == + null + ? trans("Select shipping") + : CheckoutSession + .getInstance.shippingType! + .getTotal(withFormatting: true)), + if (_taxRate != null) + CheckoutTaxTotal(taxRate: _taxRate), + Padding(padding: EdgeInsets.only(top: 8, left: 8, right: 8)), + Padding(padding: EdgeInsets.symmetric(horizontal: 8), child: RichText( + textAlign: TextAlign.left, + text: TextSpan( + text: + '${trans('By completing this order, I agree to all')} ', + style: Theme.of(context).textTheme.bodySmall!.copyWith( + fontSize: 12, + ), + children: [ + TextSpan( + recognizer: TapGestureRecognizer()..onTap = _openTermsLink, + text: trans("Terms and conditions").toLowerCase(), + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith( + color: ThemeColor.get(context) + .primaryAccent, + fontSize: 12, + ), + ), + TextSpan( + text: ".", + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith( + color: Colors.black87, + fontSize: 12, + ), + ), + ], + ), + )), + ], + ), + ], + ), + ) + ], ), Container( decoration: BoxDecoration( diff --git a/LabelStoreMax/lib/resources/pages/checkout_status_page.dart b/LabelStoreMax/lib/resources/pages/checkout_status_page.dart index aff054f..0e0268d 100644 --- a/LabelStoreMax/lib/resources/pages/checkout_status_page.dart +++ b/LabelStoreMax/lib/resources/pages/checkout_status_page.dart @@ -34,6 +34,7 @@ class _CheckoutStatusState extends NyState { _order = widget.controller.data(); await Cart.getInstance.clear(); CheckoutSession.getInstance.clear(); + setState(() { }); } @override @@ -161,7 +162,7 @@ class _CheckoutStatusState extends NyState { ), Text( formatStringCurrency( - total: lineItem.total.toString(), + total: lineItem.subtotal.toString(), ), style: Theme.of(context).textTheme.bodyLarge, ) diff --git a/LabelStoreMax/lib/resources/pages/coupon_page.dart b/LabelStoreMax/lib/resources/pages/coupon_page.dart index fe898b7..dbffe3c 100644 --- a/LabelStoreMax/lib/resources/pages/coupon_page.dart +++ b/LabelStoreMax/lib/resources/pages/coupon_page.dart @@ -179,7 +179,7 @@ class _CouponPageState extends State { if (minimumAmount != 0 && doubleSubtotal < minimumAmount) { _showAlert( message: trans("Spend a minimum of minimumAmount to redeem", - arguments: {"minimumAmount": minimumAmount.toString()}), + arguments: {"minimumAmount": formatStringCurrency(total: minimumAmount.toString())}), style: ToastNotificationStyleType.DANGER); return; } @@ -189,7 +189,7 @@ class _CouponPageState extends State { if (maximumAmount != 0 && doubleSubtotal > maximumAmount) { _showAlert( message: trans("Spend less than maximumAmount to redeem", - arguments: {"maximumAmount": maximumAmount.toString()}), + arguments: {"maximumAmount": formatStringCurrency(total: maximumAmount.toString())}), style: ToastNotificationStyleType.DANGER); return; } diff --git a/LabelStoreMax/lib/resources/pages/product_detail_page.dart b/LabelStoreMax/lib/resources/pages/product_detail_page.dart index 0733fe1..da7e925 100644 --- a/LabelStoreMax/lib/resources/pages/product_detail_page.dart +++ b/LabelStoreMax/lib/resources/pages/product_detail_page.dart @@ -84,7 +84,7 @@ class _ProductDetailState extends NyState { "${trans("Select a")} ${_product!.attributes[attributeIndex].name}", bodyWidget: ListView.separated( itemCount: _product!.attributes[attributeIndex].options!.length, - separatorBuilder: (BuildContext context, int index) => Divider(), + separatorBuilder: (BuildContext context, int index) => Divider(color: Colors.black12), itemBuilder: (BuildContext context, int index) { return ListTile( title: Text( diff --git a/LabelStoreMax/lib/resources/themes/styles/color_styles.dart b/LabelStoreMax/lib/resources/themes/styles/color_styles.dart index 15c29db..e03a07f 100644 --- a/LabelStoreMax/lib/resources/themes/styles/color_styles.dart +++ b/LabelStoreMax/lib/resources/themes/styles/color_styles.dart @@ -6,31 +6,45 @@ import 'package:nylo_framework/nylo_framework.dart'; /// light_theme_colors.dart and dark_theme_colors.dart. abstract class ColorStyles extends BaseColorStyles { // general + @override Color get background; Color get backgroundContainer; + @override Color get primaryContent; + @override Color get primaryAccent; + @override Color get surfaceBackground; + @override Color get surfaceContent; // app bar + @override Color get appBarBackground; + @override Color get appBarPrimaryContent; // buttons + @override Color get buttonBackground; + @override Color get buttonPrimaryContent; // bottom tab bar + @override Color get bottomTabBarBackground; // bottom tab bar - icons + @override Color get bottomTabBarIconSelected; + @override Color get bottomTabBarIconUnselected; // bottom tab bar - label + @override Color get bottomTabBarLabelUnselected; + @override Color get bottomTabBarLabelSelected; Color get inputPrimaryContent; diff --git a/LabelStoreMax/lib/resources/widgets/checkout_select_coupon_widget.dart b/LabelStoreMax/lib/resources/widgets/checkout_select_coupon_widget.dart index 6990551..614a7d5 100644 --- a/LabelStoreMax/lib/resources/widgets/checkout_select_coupon_widget.dart +++ b/LabelStoreMax/lib/resources/widgets/checkout_select_coupon_widget.dart @@ -27,10 +27,11 @@ class CheckoutSelectCouponWidget extends StatelessWidget { @override Widget build(BuildContext context) { bool hasCoupon = checkoutSession.coupon != null; - return InkWell( - onTap: _actionCoupon, - child: Container( - padding: EdgeInsets.symmetric(vertical: 5), + return Container( + height: 50, + padding: EdgeInsets.symmetric(vertical: 5), + child: InkWell( + onTap: _actionCoupon, child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, diff --git a/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart b/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart index 47a1ae5..1ae2bb3 100644 --- a/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart +++ b/LabelStoreMax/lib/resources/widgets/woosignal_ui.dart @@ -138,72 +138,69 @@ class CheckoutRowLine extends StatelessWidget { final bool showBorderBottom; @override - Widget build(BuildContext context) => Flexible( - child: InkWell( - child: Container( - height: 125, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, + Widget build(BuildContext context) => Container( + height: 125, + padding: EdgeInsets.all(8), + decoration: showBorderBottom == true + ? BoxDecoration( + border: Border( + bottom: BorderSide(color: Colors.black12, width: 1), + ), + ) + : BoxDecoration(), + child: InkWell( + onTap: action, + borderRadius: BorderRadius.circular(8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + child: Text( + heading, + style: Theme.of(context) + .textTheme + .bodyMedium! + .copyWith(fontSize: 16, fontWeight: FontWeight.bold), + ), + padding: EdgeInsets.only(bottom: 8), + ), + Flexible( + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Padding( - child: Text( - heading, - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(fontSize: 16, fontWeight: FontWeight.bold), - ), - padding: EdgeInsets.only(bottom: 8), - ), Flexible( child: Row( crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.start, children: [ - Flexible( - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - leadImage, - Expanded( - child: Container( - child: Text( - leadTitle!, - style: - Theme.of(context).textTheme.titleMedium, - maxLines: 2, - overflow: TextOverflow.ellipsis, - softWrap: false, - ), - padding: EdgeInsets.only(left: 15), - margin: EdgeInsets.only(right: 10), - ), - ), - ], + leadImage, + Expanded( + child: Container( + child: Text( + leadTitle!, + style: + Theme.of(context).textTheme.titleMedium, + maxLines: 2, + overflow: TextOverflow.ellipsis, + softWrap: false, + ), + padding: EdgeInsets.only(left: 15), + margin: EdgeInsets.only(right: 10), ), ), - Icon(Icons.arrow_forward_ios), ], ), - ) + ), + Icon(Icons.arrow_forward_ios), ], ), - padding: EdgeInsets.all(8), - decoration: showBorderBottom == true - ? BoxDecoration( - border: Border( - bottom: BorderSide(color: Colors.black12, width: 1), - ), - ) - : BoxDecoration(), - ), - onTap: action, - borderRadius: BorderRadius.circular(8), - ), - flex: 3, - ); + ) + ], + ), + ), + ); } class TextEditingRow extends StatelessWidget { diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index 098a12b..3dffc04 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: device_info_plus - sha256: "499c61743e13909c13374a8c209075385858c614b9c0f2487b5f9995eeaf7369" + sha256: "2c35b6d1682b028e42d07b3aee4b98fa62996c10bc12cb651ec856a80d6a761b" url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "9.0.2" device_info_plus_platform_interface: dependency: transitive description: @@ -269,10 +269,10 @@ packages: dependency: "direct main" description: name: firebase_messaging - sha256: "77d93f897c893fa7c8de433f6950123bd9c56f27fd7f88a032a53102ca23fcee" + sha256: "7a09d8c21147f009882a27c96de1918ea283f974d73cb6fae1d234bb9ec18d8b" url: "https://pub.dev" source: hosted - version: "14.6.3" + version: "14.6.4" firebase_messaging_platform_interface: dependency: transitive description: @@ -457,10 +457,10 @@ packages: dependency: "direct main" description: name: flutter_widget_from_html_core - sha256: "77f05cd7a738078dcdbe07741140d58b2fe7509197f3855a91269fb5a90f4bee" + sha256: "60485f3c562c46783ea3e6cd344dc3fc2d51444bda42ffc4b8e11abdc10837e1" url: "https://pub.dev" source: hosted - version: "0.10.1" + version: "0.10.2" fluttertoast: dependency: transitive description: @@ -617,18 +617,18 @@ packages: dependency: "direct main" description: name: nylo_framework - sha256: "905f0f013413ab07433b37aeab2ac05865dea0dc7c2cf93336b881cd5eeb32e4" + sha256: a10e1ea240e04aa64a90a6170bc2eebd585b9c0f85b1557e323c5a49312add2b url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.1.1" nylo_support: dependency: transitive description: name: nylo_support - sha256: "7324d3fccb315619a28ce292d15f8ac1150aa6111faddbf1de991305fdf80479" + sha256: "09c5eace0c4fa4cef5148b3b7820fd0a8b24154c964c34c1396372315ef815d6" url: "https://pub.dev" source: hosted - version: "5.3.0" + version: "5.3.1" octo_image: dependency: transitive description: @@ -817,10 +817,10 @@ packages: dependency: transitive description: name: shared_preferences - sha256: "16d3fb6b3692ad244a695c0183fca18cf81fd4b821664394a781de42386bf022" + sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.2.0" shared_preferences_android: dependency: transitive description: @@ -849,10 +849,10 @@ packages: dependency: transitive description: name: shared_preferences_platform_interface - sha256: fb5cf25c0235df2d0640ac1b1174f6466bd311f621574997ac59018a6664548d + sha256: "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" shared_preferences_web: dependency: transitive description: @@ -1142,10 +1142,10 @@ packages: dependency: "direct main" description: name: woosignal - sha256: "985313603ad26dbb48420ce1b9029ebec7b6681861bab094c5f89d1710281ac3" + sha256: "2daf353de3ff3e6b2087bf886fc9cd66effc8e78e3e1c71eee755ec978204a6b" url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "3.6.1" wp_json_api: dependency: "direct main" description: diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index 821126c..9aa2916 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,7 +1,7 @@ # Official WooSignal App Template for WooCommerce # Label StoreMax -# Version: 6.7.0 +# Version: 6.8.0 # Author: Anthony Gordon # Homepage: https://woosignal.com # Documentation: https://woosignal.com/docs/app/label-storemax @@ -29,14 +29,14 @@ dependencies: google_fonts: ^4.0.5 analyzer: ^5.12.0 intl: ^0.18.0 - nylo_framework: ^5.1.0 - woosignal: ^3.5.0 + nylo_framework: ^5.1.1 + woosignal: ^3.6.1 wp_json_api: ^3.3.2 cached_network_image: ^3.2.3 package_info_plus: ^4.0.2 money_formatter: ^0.0.3 flutter_web_browser: ^0.17.1 - webview_flutter: ^3.0.4 + webview_flutter: 3.0.4 pull_to_refresh_flutter3: 2.0.1 url_launcher: ^6.1.6 bubble_tab_indicator: ^0.1.5 @@ -46,11 +46,11 @@ dependencies: flutter_spinkit: ^5.1.0 auto_size_text: ^3.0.0 html: ^0.15.1 - flutter_widget_from_html_core: ^0.10.0 + flutter_widget_from_html_core: ^0.10.2 flutter_rating_bar: ^4.0.1 flutter_staggered_grid_view: ^0.6.2 flutter_swiper_view: ^1.1.8 - firebase_messaging: ^14.6.3 + firebase_messaging: ^14.6.4 firebase_core: ^2.14.0 flutter: sdk: flutter diff --git a/README.md b/README.md index 44f27b6..de25398 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/ios/labe - Change app name, logo, customize default language, currency + more - Light and dark mode - Theme customization -- Stripe, Cash On Delivery, PayPal +- Stripe, Cash On Delivery, PayPal, RazorPay - Localized for en, es, pt, it, hi, fr, zh, tr, nl - Orders show as normal in WooCommerce