11import SwiftUI
22
33struct POSSettingsLocalCatalogDetailView : View {
4- // TODO: WOOMOB-1335 - implement full sync cellular data setting functionality
54 private let viewModel : POSSettingsLocalCatalogViewModel
65
76 init ( viewModel: POSSettingsLocalCatalogViewModel ) {
@@ -35,18 +34,14 @@ struct POSSettingsLocalCatalogDetailView: View {
3534private extension POSSettingsLocalCatalogDetailView {
3635 @ViewBuilder
3736 var catalogStatus : some View {
38- VStack ( spacing: POSSpacing . none) {
39- sectionHeaderView ( title: Localization . catalogStatus)
40-
4137 VStack ( spacing: POSSpacing . medium) {
4238 fieldRowView ( label: Localization . catalogSize, value: viewModel. catalogSize)
43- fieldRowView ( label: Localization . lastIncrementalUpdate , value: viewModel. lastIncrementalSyncDate)
39+ fieldRowView ( label: Localization . lastIncrementalSync , value: viewModel. lastIncrementalSyncDate)
4440 fieldRowView ( label: Localization . lastFullSync, value: viewModel. lastFullSyncDate)
4541 }
4642 . padding ( . bottom, POSPadding . medium)
4743 . redacted ( reason: viewModel. isLoading ? . placeholder : [ ] )
4844 . shimmering ( active: viewModel. isLoading)
49- }
5045 }
5146
5247 @ViewBuilder
@@ -56,7 +51,7 @@ private extension POSSettingsLocalCatalogDetailView {
5651 sectionHeaderView ( title: Localization . managingDataUsage)
5752
5853 VStack ( spacing: POSSpacing . medium) {
59- toggleRowView ( label: Localization . allowFullSyncOnCellular , isOn: $viewModel. allowFullSyncOnCellular)
54+ toggleRowView ( label: Localization . allowSyncOnCellular , isOn: $viewModel. allowFullSyncOnCellular)
6055 }
6156 . padding ( . bottom, POSPadding . medium)
6257 }
@@ -78,7 +73,7 @@ private extension POSSettingsLocalCatalogDetailView {
7873 await viewModel. refreshCatalog ( )
7974 }
8075 } ) {
81- Text ( Localization . refreshCatalog )
76+ Text ( Localization . updateCatalog )
8277 }
8378 . buttonStyle ( POSFilledButtonStyle ( size: . normal, isLoading: viewModel. isRefreshingCatalog) )
8479 }
@@ -134,8 +129,8 @@ private extension POSSettingsLocalCatalogDetailView {
134129
135130 enum Localization {
136131 static let localCatalogTitle = NSLocalizedString (
137- " posSettingsLocalCatalogDetailView.title " ,
138- value: " Catalog Settings " ,
132+ " posSettingsLocalCatalogDetailView.title.1 " ,
133+ value: " Product catalog " ,
139134 comment: " Navigation title for the local catalog details in POS settings. "
140135 )
141136
@@ -146,53 +141,51 @@ private extension POSSettingsLocalCatalogDetailView {
146141 )
147142
148143 static let managingDataUsage = NSLocalizedString (
149- " posSettingsLocalCatalogDetailView.managingDataUsage.1 " ,
150- value: " Managing Data Usage " ,
144+ " posSettingsLocalCatalogDetailView.managingDataUsage.2 " ,
145+ value: " Cellular data " ,
151146 comment: " Section title for managing data usage in Point of Sale settings. "
152147 )
153148
154- static let lastIncrementalUpdate = NSLocalizedString (
155- " posSettingsLocalCatalogDetailView.lastIncrementalSync " ,
156- value: " Last update " ,
157- comment: " Label for last incremental update field in Point of Sale settings. "
149+ static let lastIncrementalSync = NSLocalizedString (
150+ " posSettingsLocalCatalogDetailView.lastIncrementalSync.1 " ,
151+ value: " Last incremental sync " ,
152+ comment: " Label for last incremental sync field in Point of Sale settings. "
158153 )
159154
160155 static let lastFullSync = NSLocalizedString (
161- " posSettingsLocalCatalogDetailView.lastFullSync.1 " ,
162- value: " Last full update " ,
156+ " posSettingsLocalCatalogDetailView.lastFullSync.2 " ,
157+ value: " Last full sync " ,
163158 comment: " Label for last full sync field in Point of Sale settings. "
164159 )
165160
166161 static let catalogSize = NSLocalizedString (
167- " posSettingsLocalCatalogDetailView.catalogSize " ,
168- value: " Catalog size " ,
162+ " posSettingsLocalCatalogDetailView.catalogSize.1 " ,
163+ value: " Size " ,
169164 comment: " Label for catalog size field in Point of Sale settings. "
170165 )
171166
172-
173- static let allowFullSyncOnCellular = NSLocalizedString (
174- " posSettingsLocalCatalogDetailView.allowFullSyncOnCellular.1 " ,
175- value: " Allow full update on cellular data " ,
176- comment: " Label for allow full sync on cellular data toggle in Point of Sale settings. "
167+ static let allowSyncOnCellular = NSLocalizedString (
168+ " posSettingsLocalCatalogDetailView.allowSyncOnCellular.2 " ,
169+ value: " Allow sync using cellular data " ,
170+ comment: " Label for allow sync on cellular data toggle in Point of Sale settings. "
177171 )
178172
179-
180173 static let manualCatalogUpdate = NSLocalizedString (
181- " posSettingsLocalCatalogDetailView.manualCatalogUpdate " ,
182- value: " Manual Catalog Update " ,
174+ " posSettingsLocalCatalogDetailView.manualCatalogUpdate.1 " ,
175+ value: " Catalog update " ,
183176 comment: " Section title for manual catalog update in Point of Sale settings. "
184177 )
185178
186179 static let manualUpdateInfo = NSLocalizedString (
187- " posSettingsLocalCatalogDetailView.manualUpdateInfo " ,
188- value: " Use this refresh only when something seems off - POS keeps data current automatically. " ,
189- comment: " Info text explaining when to use manual catalog update. "
180+ " posSettingsLocalCatalogDetailView.manualUpdateInfo.1 " ,
181+ value: " Update the catalog manually " ,
182+ comment: " Info text explaining the usage of the manual catalog update button . "
190183 )
191184
192- static let refreshCatalog = NSLocalizedString (
193- " posSettingsLocalCatalogDetailView.refreshCatalog " ,
194- value: " Refresh catalog" ,
195- comment: " Button text for refreshing the catalog manually. "
185+ static let updateCatalog = NSLocalizedString (
186+ " posSettingsLocalCatalogDetailView.updateCatalog " ,
187+ value: " Update catalog" ,
188+ comment: " Button text for updating the catalog manually. "
196189 )
197190 }
198191}
0 commit comments