Skip to content

Commit 08251c7

Browse files
authored
[Woo POS][Barcodes] Start a new cart when scanning on success screen (#15870)
2 parents 300a2f9 + 35c21f9 commit 08251c7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [*] POS: icon button with confirmation step used for clearing the cart [https://github.com/woocommerce/woocommerce-ios/pull/15829]
88
- [*] Shipping Labels: Fixed a portion of layout issues caused by bigger accessibility content size categories. [https://github.com/woocommerce/woocommerce-ios/pull/15844]
99
- [*] Shipping Labels: Enable the confirm button on the payment method sheet even when there are no changes. [https://github.com/woocommerce/woocommerce-ios/pull/15856]
10+
- [*] POS: start a new cart by scanning a barcode on the payment success screen [https://github.com/woocommerce/woocommerce-ios/pull/15870]
1011
- [*] Watch app: Fixed connection issue upon fresh install [https://github.com/woocommerce/woocommerce-ios/pull/15867]
1112

1213
22.7

WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Reader Messages/PointOfSalePaymentSuccessView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import SwiftUI
44
struct PointOfSalePaymentSuccessView: View {
55
let viewModel: PointOfSalePaymentSuccessViewModel
66
@Environment(\.dynamicTypeSize) var dynamicTypeSize
7+
@Environment(PointOfSaleAggregateModel.self) private var posModel
78

89
@State private var isShowingSendReceiptView: Bool = false
910
@State private var isShowingReceiptNotEligibleBanner: Bool = false
@@ -24,6 +25,10 @@ struct PointOfSalePaymentSuccessView: View {
2425
}
2526
.padding([.leading, .trailing], dynamicTypeSize.isAccessibilitySize ? nil : POSPadding.small)
2627
.background(Color.posSurfaceBright)
28+
.barcodeScanning { barcode in
29+
posModel.startNewCart()
30+
posModel.barcodeScanned(barcode)
31+
}
2732
}
2833
}
2934
.onAppear {

0 commit comments

Comments
 (0)