Manos Chorianopoulos

fix setCouponList, coupon discount

...@@ -49,7 +49,7 @@ import UIKit ...@@ -49,7 +49,7 @@ import UIKit
49 49
50 couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) 50 couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
51 nameLabel.text = couponSetData?.name ?? "" 51 nameLabel.text = couponSetData?.name ?? ""
52 - dicountLabel.text = (coupon.discount ?? "") + "€" 52 + dicountLabel.text = (coupon.discount ?? "")
53 discriptionLabel.text = couponSetData?.short_description ?? "" 53 discriptionLabel.text = couponSetData?.short_description ?? ""
54 expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "") 54 expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "")
55 } 55 }
......
...@@ -2361,9 +2361,9 @@ public class swiftApi { ...@@ -2361,9 +2361,9 @@ public class swiftApi {
2361 2361
2362 2362
2363 public func setCouponList(_ coupons: Array<CouponItemModel>) { 2363 public func setCouponList(_ coupons: Array<CouponItemModel>) {
2364 - let filteredCoupons = coupons.filter { CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: $0.discount ?? "")) } 2364 + // let filteredCoupons = coupons.filter { CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: $0.discount ?? "")) }
2365 - let activeCoupons = filteredCoupons.filter({ return $0.status == 1 }) 2365 + let activeCoupons = coupons.filter({ return $0.status == 1 })
2366 - let oldCoupons = filteredCoupons.filter({ return $0.status == 0 }) 2366 + let oldCoupons = coupons.filter({ return $0.status == 0 })
2367 2367
2368 GlobalVariables.couponList = activeCoupons 2368 GlobalVariables.couponList = activeCoupons
2369 2369
......