Skip to content

Commit

Permalink
[Woo POS] Fix order sync from passing empty items for the products (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclync authored Jul 1, 2024
2 parents 375de31 + e0a7ed4 commit d3ac155
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ final class PointOfSaleDashboardViewModel: ObservableObject {

let itemSelectorViewModel: ItemSelectorViewModel

@Published private(set) var items: [POSItem] = []
@Published private(set) var itemsInCart: [CartItem] = [] {
didSet {
checkIfCartEmpty()
Expand Down Expand Up @@ -345,8 +344,8 @@ private extension PointOfSaleDashboardViewModel {
do {
isSyncingOrder = true
let order = try await orderService.syncOrder(cart: cart,
order: order,
allProducts: items)
order: order,
allProducts: itemSelectorViewModel.items)
self.order = order
isSyncingOrder = false
// TODO: this is temporary solution
Expand Down

0 comments on commit d3ac155

Please sign in to comment.