@@ -8,7 +8,6 @@ struct PointOfSaleEntryPointView: View {
88 @StateObject private var posModalManager = POSModalManager ( )
99 @State private var posEntryPointController : POSEntryPointController
1010 @Environment ( \. horizontalSizeClass) private var horizontalSizeClass
11- @Environment ( \. posAnalytics) private var analytics
1211
1312 private let onPointOfSaleModeActiveStateChange : ( ( Bool ) -> Void )
1413 private let itemsController : PointOfSaleItemsControllerProtocol
@@ -21,6 +20,7 @@ struct PointOfSaleEntryPointView: View {
2120 private let searchHistoryService : POSSearchHistoryProviding
2221 private let popularPurchasableItemsController : PointOfSaleItemsControllerProtocol
2322 private let barcodeScanService : PointOfSaleBarcodeScanServiceProtocol
23+ private let analytics : POSAnalyticsProviding
2424
2525 init ( itemsController: PointOfSaleItemsControllerProtocol ,
2626 purchasableItemsSearchController: PointOfSaleSearchingItemsControllerProtocol ,
@@ -33,7 +33,8 @@ struct PointOfSaleEntryPointView: View {
3333 searchHistoryService: POSSearchHistoryProviding ,
3434 popularPurchasableItemsController: PointOfSaleItemsControllerProtocol ,
3535 barcodeScanService: PointOfSaleBarcodeScanServiceProtocol ,
36- posEligibilityChecker: POSEntryPointEligibilityCheckerProtocol ) {
36+ posEligibilityChecker: POSEntryPointEligibilityCheckerProtocol ,
37+ analytics: POSAnalyticsProviding ) {
3738 self . onPointOfSaleModeActiveStateChange = onPointOfSaleModeActiveStateChange
3839
3940 self . itemsController = itemsController
@@ -47,6 +48,7 @@ struct PointOfSaleEntryPointView: View {
4748 self . popularPurchasableItemsController = popularPurchasableItemsController
4849 self . barcodeScanService = barcodeScanService
4950 self . posEntryPointController = POSEntryPointController ( eligibilityChecker: posEligibilityChecker)
51+ self . analytics = analytics
5052 }
5153
5254 var body : some View {
@@ -77,6 +79,7 @@ struct PointOfSaleEntryPointView: View {
7779 barcodeScanService: barcodeScanService)
7880 }
7981 . environmentObject ( posModalManager)
82+ . environment ( \. posAnalytics, analytics)
8083 . injectKeyboardObserver ( )
8184 . onAppear {
8285 onPointOfSaleModeActiveStateChange ( true )
@@ -103,7 +106,8 @@ struct PointOfSaleEntryPointView: View {
103106 searchHistoryService: PointOfSalePreviewHistoryService ( ) ,
104107 popularPurchasableItemsController: PointOfSalePreviewItemsController ( ) ,
105108 barcodeScanService: PointOfSalePreviewBarcodeScanService ( ) ,
106- posEligibilityChecker: POSTabEligibilityChecker ( siteID: 0 ) )
109+ posEligibilityChecker: POSTabEligibilityChecker ( siteID: 0 ) ,
110+ analytics: POSPreviewAnalytics ( ) )
107111}
108112
109113#endif
0 commit comments