Showing
1 changed file
with
11 additions
and
1 deletions
| ... | @@ -33,7 +33,7 @@ import SwiftEventBus | ... | @@ -33,7 +33,7 @@ import SwiftEventBus |
| 33 | @IBOutlet weak var tableView: UITableView! | 33 | @IBOutlet weak var tableView: UITableView! |
| 34 | @IBOutlet weak var activeCodeImage: UIImageView! | 34 | @IBOutlet weak var activeCodeImage: UIImageView! |
| 35 | 35 | ||
| 36 | - public var coupons:Array<swiftApi.CouponItemModel> = swiftApi().getCouponList() | 36 | + public var coupons:Array<swiftApi.CouponItemModel> = swiftApi().filterActiveCoupons(swiftApi().getCouponList()) |
| 37 | public var dfyCoupons:Array<swiftApi.ActiveDFYCouponModel> = swiftApi().getActiveDFYCoupons() | 37 | public var dfyCoupons:Array<swiftApi.ActiveDFYCouponModel> = swiftApi().getActiveDFYCoupons() |
| 38 | public var loyaltyBadge:swiftApi.LoyaltyBadgeModel = swiftApi().getLoyaltyBadge() | 38 | public var loyaltyBadge:swiftApi.LoyaltyBadgeModel = swiftApi().getLoyaltyBadge() |
| 39 | public var profile:swiftApi.ProfileModel? = swiftApi().getConsumer() | 39 | public var profile:swiftApi.ProfileModel? = swiftApi().getConsumer() |
| ... | @@ -48,6 +48,8 @@ import SwiftEventBus | ... | @@ -48,6 +48,8 @@ import SwiftEventBus |
| 48 | 48 | ||
| 49 | tableView.delegate = self | 49 | tableView.delegate = self |
| 50 | tableView.dataSource = self | 50 | tableView.dataSource = self |
| 51 | + | ||
| 52 | + print("Active Gifts Count: " + String(coupons.count)) | ||
| 51 | 53 | ||
| 52 | headerImage.image = UIImage(named: "ic_background_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 54 | headerImage.image = UIImage(named: "ic_background_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) |
| 53 | dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 55 | dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) |
| ... | @@ -64,8 +66,13 @@ import SwiftEventBus | ... | @@ -64,8 +66,13 @@ import SwiftEventBus |
| 64 | } else { | 66 | } else { |
| 65 | profileImage.image = UIImage(named: "default_profile_image", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 67 | profileImage.image = UIImage(named: "default_profile_image", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) |
| 66 | } | 68 | } |
| 69 | + | ||
| 70 | + print("Profile Name: " + (profile?.firstname ?? "") + " " + (profile?.lastname ?? "")) | ||
| 71 | + | ||
| 72 | + profileNameLabel.text = (profile?.firstname ?? "") + " " + (profile?.lastname ?? "") | ||
| 67 | 73 | ||
| 68 | let userTag = swiftApi().getUserTag() | 74 | let userTag = swiftApi().getUserTag() |
| 75 | + print("User tag: " + userTag) | ||
| 69 | if (userTag != "" && userTag != "undefined") { | 76 | if (userTag != "" && userTag != "undefined") { |
| 70 | questionnaireButton.setTitle(userTag, for: .normal) | 77 | questionnaireButton.setTitle(userTag, for: .normal) |
| 71 | questionnaireButton.titleLabel?.font = UIFont.systemFont(ofSize: 13, weight: .semibold) | 78 | questionnaireButton.titleLabel?.font = UIFont.systemFont(ofSize: 13, weight: .semibold) |
| ... | @@ -115,6 +122,9 @@ import SwiftEventBus | ... | @@ -115,6 +122,9 @@ import SwiftEventBus |
| 115 | 122 | ||
| 116 | couponEarnLabel.text = "Μέχρι τώρα έχεις κερδίσει " + totalCouponDiscountString + "€ σε προσφορές από " + String(loyaltyBadge._couponCount) + " κουπόνια!" | 123 | couponEarnLabel.text = "Μέχρι τώρα έχεις κερδίσει " + totalCouponDiscountString + "€ σε προσφορές από " + String(loyaltyBadge._couponCount) + " κουπόνια!" |
| 117 | couponEarnAmountLabel.text = totalCouponDiscountString + "€" | 124 | couponEarnAmountLabel.text = totalCouponDiscountString + "€" |
| 125 | + | ||
| 126 | + print("Loyalty Badge Value: " + totalCouponDiscountString) | ||
| 127 | + print("Loyalty Badge Count: " + String(loyaltyBadge._couponCount)) | ||
| 118 | 128 | ||
| 119 | activeCodeView.layer.cornerRadius = 5.0 | 129 | activeCodeView.layer.cornerRadius = 5.0 |
| 120 | activeCodeView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor | 130 | activeCodeView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor | ... | ... |
-
Please register or login to post a comment