File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
WooCommerce/Classes/POS/Presentation Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,21 @@ struct CartView: View {
4747 ScrollViewReader { proxy in
4848 ScrollView {
4949 VStack ( spacing: Constants . cartItemSpacing) {
50+
51+ /// WIP: Behind the feature flag
52+ if posModel. cart. coupons. isNotEmpty {
53+ ForEach ( posModel. cart. coupons, id: \. id) { couponItem in
54+ CouponRowView ( couponItem: couponItem,
55+ onItemRemoveTapped: posModel. orderStage == . building ? {
56+ posModel. remove ( cartItem: couponItem)
57+ } : nil )
58+ . id ( couponItem. id)
59+ . transition ( . opacity)
60+ }
61+
62+ Spacer ( minLength: 64 )
63+ }
64+
5065 ForEach ( posModel. cart. items, id: \. id) { cartItem in
5166 ItemRowView ( cartItem: cartItem,
5267 showImage: $shouldShowItemImages,
@@ -59,6 +74,7 @@ struct CartView: View {
5974 }
6075 }
6176 . animation ( Constants . cartAnimation, value: posModel. cart. items. map ( \. id) )
77+ . animation ( Constants . cartAnimation, value: posModel. cart. coupons. map ( \. id) )
6278 . background ( GeometryReader { geometry in
6379 Color . clear. preference ( key: ScrollOffSetPreferenceKey . self,
6480 value: geometry. frame ( in: coordinateSpace) . origin. y)
You can’t perform that action at this time.
0 commit comments