Skip to content

Commit ad61ab0

Browse files
committed
Reorder data properties in NewOrderViewModel
1 parent 21c7ae0 commit ad61ab0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Creation/NewOrderViewModel.swift

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ final class NewOrderViewModel: ObservableObject {
4646
///
4747
@Published var shouldShowOrderStatusList: Bool = false
4848

49-
/// Representation of customer data display properties.
50-
///
51-
@Published private(set) var customerDataViewModel: CustomerDataViewModel = .init(billingAddress: nil, shippingAddress: nil)
52-
53-
/// Assign this closure to be notified when a new order is created
54-
///
55-
var onOrderCreated: (Order) -> Void = { _ in }
56-
5749
/// Status Results Controller.
5850
///
5951
private lazy var statusResultsController: ResultsController<StorageOrderStatus> = {
@@ -139,6 +131,12 @@ final class NewOrderViewModel: ObservableObject {
139131
configureProductRowViewModels()
140132
}
141133

134+
// MARK: Customer data properties
135+
136+
/// Representation of customer data display properties.
137+
///
138+
@Published private(set) var customerDataViewModel: CustomerDataViewModel = .init(billingAddress: nil, shippingAddress: nil)
139+
142140
/// Creates a view model to be used in Address Form for customer address.
143141
///
144142
func createOrderAddressFormViewModel() -> CreateOrderAddressFormViewModel {
@@ -170,6 +168,10 @@ final class NewOrderViewModel: ObservableObject {
170168
}
171169
stores.dispatch(action)
172170
}
171+
172+
/// Assign this closure to be notified when a new order is created
173+
///
174+
var onOrderCreated: (Order) -> Void = { _ in }
173175
}
174176

175177
// MARK: - Types

0 commit comments

Comments
 (0)