Manos Chorianopoulos

fix setCouponList, coupon discount

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