Skip to content

Commit d4012be

Browse files
committed
Remove unused code
1 parent eb02d0c commit d4012be

File tree

5 files changed

+2
-24
lines changed

5 files changed

+2
-24
lines changed

Modules/Sources/Yosemite/PointOfSale/OrderList/POSOrder.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public struct POSOrder: Equatable, Hashable {
1919
public let lineItems: [POSOrderItem]
2020
public let refunds: [POSOrderRefund]
2121
public let currency: String
22-
public let currencySymbol: String
2322
public let discountTotal: String
2423
public let totalTax: String
2524

@@ -35,7 +34,6 @@ public struct POSOrder: Equatable, Hashable {
3534
lineItems: [POSOrderItem] = [],
3635
refunds: [POSOrderRefund] = [],
3736
currency: String,
38-
currencySymbol: String,
3937
discountTotal: String,
4038
totalTax: String) {
4139
self.id = id
@@ -50,7 +48,6 @@ public struct POSOrder: Equatable, Hashable {
5048
self.lineItems = lineItems
5149
self.refunds = refunds
5250
self.currency = currency
53-
self.currencySymbol = currencySymbol
5451
self.discountTotal = discountTotal
5552
self.totalTax = totalTax
5653
}
@@ -81,7 +78,6 @@ public extension POSOrder {
8178
lineItems: posLineItems,
8279
refunds: posRefunds,
8380
currency: order.currency,
84-
currencySymbol: order.currencySymbol,
8581
discountTotal: order.discountTotal,
8682
totalTax: order.totalTax
8783
)

WooCommerce/Classes/POS/Presentation/Orders/PointOfSaleOrderDetailsView.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ private extension PointOfSaleOrderDetailsView {
134134
}
135135

136136
func imageSource(for item: POSOrderItem) -> String? {
137-
return nil
137+
// TODO: Will be addressed in the following PR
138+
return "\(item.productID - item.variationID)"
138139
}
139140

140141
@ViewBuilder
@@ -288,12 +289,6 @@ private extension PointOfSaleOrderDetailsView {
288289
// MARK: - Localization
289290

290291
private enum Localization {
291-
static let orderDetailsTitle = NSLocalizedString(
292-
"pos.orderDetailsView.title",
293-
value: "Order Details",
294-
comment: "Title for the order details screen when no specific order is selected"
295-
)
296-
297292
static func orderTitle(_ orderNumber: String) -> String {
298293
let format = NSLocalizedString(
299294
"pos.orderDetailsView.orderTitle",

WooCommerce/Classes/POS/Utils/PreviewHelpers.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ struct POSPreviewHelpers {
276276
],
277277
refunds: [],
278278
currency: "USD",
279-
currencySymbol: "$",
280279
discountTotal: "0.00",
281280
totalTax: "3.76"
282281
)
@@ -322,7 +321,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
322321
],
323322
refunds: [],
324323
currency: "USD",
325-
currencySymbol: "$",
326324
discountTotal: "-5.24",
327325
totalTax: "4.75"
328326
),
@@ -373,7 +371,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
373371
)
374372
],
375373
currency: "USD",
376-
currencySymbol: "$",
377374
discountTotal: "-15.00",
378375
totalTax: "8.95"
379376
),
@@ -404,7 +401,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
404401
],
405402
refunds: [],
406403
currency: "USD",
407-
currencySymbol: "$",
408404
discountTotal: "0.00",
409405
totalTax: "0.00"
410406
),
@@ -438,7 +434,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
438434
],
439435
refunds: [],
440436
currency: "USD",
441-
currencySymbol: "$",
442437
discountTotal: "0.00",
443438
totalTax: "3.25"
444439
),
@@ -495,7 +490,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
495490
POSOrderRefund(refundID: 5, total: "-8.25", reason: nil)
496491
],
497492
currency: "USD",
498-
currencySymbol: "$",
499493
discountTotal: "-25.00",
500494
totalTax: "7.89"
501495
),
@@ -526,7 +520,6 @@ final class PointOfSalePreviewOrderListController: PointOfSaleOrderListControlle
526520
],
527521
refunds: [],
528522
currency: "USD",
529-
currencySymbol: "$",
530523
discountTotal: "0.00",
531524
totalTax: "0.00"
532525
)

WooCommerce/WooCommerceTests/POS/Mocks/MockPointOfSaleOrderListService.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ extension MockPointOfSaleOrderListService {
102102
],
103103
refunds: [],
104104
currency: "USD",
105-
currencySymbol: "$",
106105
discountTotal: "0.00",
107106
totalTax: "0.00"
108107
)
@@ -132,7 +131,6 @@ extension MockPointOfSaleOrderListService {
132131
],
133132
refunds: [],
134133
currency: "USD",
135-
currencySymbol: "$",
136134
discountTotal: "0.00",
137135
totalTax: "0.00"
138136
)
@@ -179,7 +177,6 @@ extension MockPointOfSaleOrderListService {
179177
],
180178
refunds: [],
181179
currency: "USD",
182-
currencySymbol: "$",
183180
discountTotal: "0.00",
184181
totalTax: "0.00"
185182
)
@@ -211,7 +208,6 @@ extension MockPointOfSaleOrderListService {
211208
POSOrderRefund(refundID: 1001, total: "-12.00", reason: "Customer request")
212209
],
213210
currency: "USD",
214-
currencySymbol: "$",
215211
discountTotal: "0.00",
216212
totalTax: "0.00"
217213
)

WooCommerce/WooCommerceTests/POS/ViewHelpers/PointOfSaleOrderDetailsViewHelperTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ private func makePOSOrder(
413413
lineItems: [POSOrderItem] = [],
414414
refunds: [POSOrderRefund] = [],
415415
currency: String = "USD",
416-
currencySymbol: String = "$",
417416
discountTotal: String = "0.00",
418417
totalTax: String = "0.00"
419418
) -> POSOrder {
@@ -430,7 +429,6 @@ private func makePOSOrder(
430429
lineItems: lineItems,
431430
refunds: refunds,
432431
currency: currency,
433-
currencySymbol: currencySymbol,
434432
discountTotal: discountTotal,
435433
totalTax: totalTax
436434
)

0 commit comments

Comments
 (0)