Skip to content

Commit fc0fa07

Browse files
committed
Marked code need to change presenting product detail
1 parent b6a03c3 commit fc0fa07

File tree

12 files changed

+18
-0
lines changed

12 files changed

+18
-0
lines changed

WooCommerce/Classes/ViewModels/Order Details/OrderDetailsViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ extension OrderDetailsViewModel {
510510
viewController.present(navController, animated: true, completion: nil)
511511
case .aggregateOrderItem:
512512
let item = dataSource.aggregateOrderItems[indexPath.row]
513+
// TODO: Replace with ProductDetailRouter
513514
let loaderViewController = ProductLoaderViewController(model: .init(aggregateOrderItem: item),
514515
siteID: order.siteID,
515516
forceReadOnly: false)

WooCommerce/Classes/ViewModels/Order Details/Refund Details/RefundDetailsViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ extension RefundDetailsViewModel {
128128

129129
case .orderItem:
130130
let item = refund.items[indexPath.row]
131+
// TODO: Replace with ProductDetailRouter, native
131132
let loaderViewController = ProductLoaderViewController(model: .init(orderItemRefund: item),
132133
siteID: refund.siteID,
133134
forceReadOnly: true)

WooCommerce/Classes/ViewRelated/Dashboard/ProductStock/ProductStockDashboardCard.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ private extension ProductStockDashboardCard {
189189
.product(productID: item.productID)
190190
}
191191
}()
192+
// TODO: Replace with ProductDetailRouter
192193
let loaderViewController = ProductLoaderViewController(model: model,
193194
siteID: viewModel.siteID,
194195
forceReadOnly: false)

WooCommerce/Classes/ViewRelated/Dashboard/TopPerformers/TopPerformerDataViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ private extension TopPerformerDataViewController {
176176
/// Presents the product details for a given TopEarnerStatsItem.
177177
///
178178
func presentProductDetails(statsItem: TopEarnerStatsItem) {
179+
// TODO: Replace with ProductDetailRouter
179180
let loaderViewController = ProductLoaderViewController(model: .init(topEarnerStatsItem: statsItem),
180181
siteID: siteID,
181182
forceReadOnly: false)

WooCommerce/Classes/ViewRelated/Dashboard/TopPerformers/TopPerformersDashboardView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ private extension TopPerformersDashboardView {
181181
}
182182

183183
func productDetailView(for item: TopEarnerStatsItem) -> UIViewController {
184+
// TODO: Replace with ProductDetailRouter
184185
let loaderViewController = ProductLoaderViewController(model: .init(topEarnerStatsItem: item),
185186
siteID: viewModel.siteID,
186187
forceReadOnly: false)

WooCommerce/Classes/ViewRelated/MainTabBarController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,7 @@ private extension MainTabBarController {
10361036
return .productVariation(productID: productID, variationID: variationID)
10371037
}
10381038
}()
1039+
// TODO: Replace with ProductDetailRouter
10391040
let productViewController = ProductLoaderViewController(model: model,
10401041
siteID: error.siteID,
10411042
forceReadOnly: false)

WooCommerce/Classes/ViewRelated/Orders/Order Details/Product List Section/Product Details/AggregatedProductListViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ private extension AggregatedProductListViewController {
122122
/// Displays the product details screen for the provided AggregateOrderItem
123123
///
124124
func productWasPressed(orderItem: AggregateOrderItem) {
125+
// TODO: Replace with ProductDetailRouter, native
125126
let loaderViewController = ProductLoaderViewController(model: .init(aggregateOrderItem: orderItem),
126127
siteID: viewModel.order.siteID,
127128
forceReadOnly: true)

WooCommerce/Classes/ViewRelated/Products/Product Loader/ProductLoaderView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ struct ProductLoaderView: UIViewControllerRepresentable {
99
let forceReadOnly: Bool
1010

1111
func makeUIViewController(context: Context) -> UINavigationController {
12+
// TODO: Replace with ProductDetailRouter
1213
let viewController = ProductLoaderViewController(model: model,
1314
siteID: siteID,
1415
forceReadOnly: forceReadOnly)

WooCommerce/Classes/ViewRelated/Products/Product Loader/ProductLoaderViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ private extension ProductLoaderViewController {
227227
/// Presents the ProductFormViewController, as a childViewController, for a given Product.
228228
///
229229
func presentProductDetails(for product: Product) {
230+
// TODO: Replace with ProductDetailRouter
230231
ProductDetailsFactory.productDetails(product: product,
231232
presentationStyle: .contained(containerViewController: { [weak self] in self }),
232233
forceReadOnly: forceReadOnly) { [weak self] viewController in

WooCommerce/Classes/ViewRelated/Products/ProductsSplitViewCoordinator.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ private extension ProductsSplitViewCoordinator {
122122
}
123123

124124
func showProductForm(product: Product) {
125+
// TODO: Replace with ProductDetailRouter
125126
ProductDetailsFactory.productDetails(product: product,
126127
presentationStyle: .navigationStack,
127128
forceReadOnly: false,

0 commit comments

Comments
 (0)