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() |
... | @@ -49,6 +49,8 @@ import SwiftEventBus | ... | @@ -49,6 +49,8 @@ import SwiftEventBus |
49 | tableView.delegate = self | 49 | tableView.delegate = self |
50 | tableView.dataSource = self | 50 | tableView.dataSource = self |
51 | 51 | ||
52 | + print("Active Gifts Count: " + String(coupons.count)) | ||
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) |
54 | couponEarnImage.image = UIImage(named: "wallet_coupons", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) | 56 | couponEarnImage.image = UIImage(named: "wallet_coupons", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) |
... | @@ -65,7 +67,12 @@ import SwiftEventBus | ... | @@ -65,7 +67,12 @@ import SwiftEventBus |
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 | } |
67 | 69 | ||
70 | + print("Profile Name: " + (profile?.firstname ?? "") + " " + (profile?.lastname ?? "")) | ||
71 | + | ||
72 | + profileNameLabel.text = (profile?.firstname ?? "") + " " + (profile?.lastname ?? "") | ||
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) |
... | @@ -116,6 +123,9 @@ import SwiftEventBus | ... | @@ -116,6 +123,9 @@ import SwiftEventBus |
116 | couponEarnLabel.text = "Μέχρι τώρα έχεις κερδίσει " + totalCouponDiscountString + "€ σε προσφορές από " + String(loyaltyBadge._couponCount) + " κουπόνια!" | 123 | couponEarnLabel.text = "Μέχρι τώρα έχεις κερδίσει " + totalCouponDiscountString + "€ σε προσφορές από " + String(loyaltyBadge._couponCount) + " κουπόνια!" |
117 | couponEarnAmountLabel.text = totalCouponDiscountString + "€" | 124 | couponEarnAmountLabel.text = totalCouponDiscountString + "€" |
118 | 125 | ||
126 | + print("Loyalty Badge Value: " + totalCouponDiscountString) | ||
127 | + print("Loyalty Badge Count: " + String(loyaltyBadge._couponCount)) | ||
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 |
121 | activeCodeView.layer.shadowOffset = CGSize(width: 0.0, height: 0.0) | 131 | activeCodeView.layer.shadowOffset = CGSize(width: 0.0, height: 0.0) | ... | ... |
-
Please register or login to post a comment