Manos Chorianopoulos

redesign WalletVC, LoyaltyHistoryVC

......@@ -695,10 +695,11 @@ var timer2: DispatchSourceTimer?
} else if (eventArray[1] == "loyaltyWallet") {
// event:loyaltyWallet
SwiftEventBus.post("refresh_vouchers")
SwiftEventBus.post("open_my_rewards")
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "WalletViewController") as! SwiftWarplyFramework.WalletViewController
self.navigationController?.pushViewController(vc, animated: true)
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "WalletViewController") as! SwiftWarplyFramework.WalletViewController
// self.navigationController?.pushViewController(vc, animated: true)
} else if (eventArray[1] == "cancel_unified_success") {
// event:cancel_unified_success
......
......@@ -26,7 +26,8 @@ import SwiftEventBus
getCouponsRequest()
setBackButton()
setNavigationTitle("GIFTS FOR YOU")
// setNavigationTitle("GIFTS FOR YOU")
setNavigationTitle("FREE COUPONS")
// backgroundImage.image = UIImage(named: "coupons_scrollview_dark", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
......
......@@ -74,7 +74,8 @@ import SwiftEventBus
}
}
setBackButton()
// setBackButton()
setBackButton("ic_close_3")
setNavigationTitle("Ιστορικό")
// === images === //
......@@ -95,7 +96,7 @@ import SwiftEventBus
historySectionView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
historySectionView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
historySectionView.layer.shadowOpacity = 1.0
historySectionView.layer.shadowRadius = 1.0
historySectionView.layer.shadowRadius = 2.0
}
......@@ -205,7 +206,8 @@ import SwiftEventBus
dfyBannerParentView.backgroundColor = .clear
dfyBannerInnerParentView.backgroundColor = .white
dfyBannerInnerView.backgroundColor = UIColor(red: 0.46, green: 0.75, blue: 0.45, alpha: 0.05)
// dfyBannerInnerView.backgroundColor = UIColor(red: 0.46, green: 0.75, blue: 0.45, alpha: 0.05)
dfyBannerInnerView.backgroundColor = .white
dfyBannerInnerParentView.layer.cornerRadius = 16.0
dfyBannerInnerView.layer.cornerRadius = 16.0
// dfyBannerInnerView.layer.borderWidth = 1
......@@ -214,7 +216,7 @@ import SwiftEventBus
dfyBannerParentView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
dfyBannerParentView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
dfyBannerParentView.layer.shadowOpacity = 1.0
dfyBannerParentView.layer.shadowRadius = 1.0
dfyBannerParentView.layer.shadowRadius = 2.0
let totalCouponValueFixed = Float(round(100 * totalCouponValue) / 100)
var totalCouponValueString = "0"
......@@ -236,7 +238,8 @@ import SwiftEventBus
// === MARKET banner === //
marketBannerParentView.backgroundColor = .clear
marketBannerInnerView.backgroundColor = UIColor(red: 1.00, green: 0.99, blue: 0.97, alpha: 1.00)
// marketBannerInnerView.backgroundColor = UIColor(red: 1.00, green: 0.99, blue: 0.97, alpha: 1.00)
marketBannerInnerView.backgroundColor = .white
marketBannerInnerView.layer.cornerRadius = 16.0
// marketBannerInnerView.layer.borderWidth = 1
// marketBannerInnerView.layer.borderColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00).cgColor
......@@ -244,7 +247,7 @@ import SwiftEventBus
marketBannerParentView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
marketBannerParentView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
marketBannerParentView.layer.shadowOpacity = 1.0
marketBannerParentView.layer.shadowRadius = 1.0
marketBannerParentView.layer.shadowRadius = 2.0
let marketDiscount = Float(round(100 * unifiedCouponsDiscount) / 100)
var marketDiscountString = "0"
......@@ -267,7 +270,8 @@ import SwiftEventBus
// === GFY banner === //
gfyBannerParentView.backgroundColor = .clear
gfyBannerInnerView.backgroundColor = UIColor(red: 0.96, green: 0.97, blue: 0.98, alpha: 1.00)
// gfyBannerInnerView.backgroundColor = UIColor(red: 0.96, green: 0.97, blue: 0.98, alpha: 1.00)
gfyBannerInnerView.backgroundColor = .white
gfyBannerInnerView.layer.cornerRadius = 16.0
// gfyBannerInnerView.layer.borderWidth = 1
// gfyBannerInnerView.layer.borderColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00).cgColor
......@@ -275,7 +279,7 @@ import SwiftEventBus
gfyBannerParentView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
gfyBannerParentView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
gfyBannerParentView.layer.shadowOpacity = 1.0
gfyBannerParentView.layer.shadowRadius = 1.0
gfyBannerParentView.layer.shadowRadius = 2.0
var totalCouponDiscountString = "0"
totalCouponDiscountString = String(format: "%.2f", totalCouponDiscount).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil)
......@@ -283,7 +287,8 @@ import SwiftEventBus
let gfyNormalText1 = "Μέχρι τώρα έχεις όφελος "
let gfyBoldText = totalCouponDiscountString + "€"
let gfyNormalText2 = " από τα GIFTS FOR YOU"
let gfyNormalText2 = " από τα FREE COUPONS"
// let gfyNormalText2 = " από τα GIFTS FOR YOU"
let gfyAttributedString = NSMutableAttributedString(string:gfyNormalText1, attributes:attrRegular)
let gfyBoldString = NSMutableAttributedString(string: gfyBoldText, attributes:attrBold)
......
This diff could not be displayed because it is too large.
......@@ -33,14 +33,16 @@ import UIKit
// Initialization code
// DFY Banner
dfyViewParent.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1.00)
// dfyViewParent.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1.00)
dfyViewParent.backgroundColor = .white
dfyViewParent.layer.cornerRadius = 16.0
dfyViewParent.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
dfyViewParent.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
dfyViewParent.layer.shadowOpacity = 1.0
dfyViewParent.layer.shadowRadius = 1.0
dfyViewParent.layer.shadowRadius = 2.0
dfyView.backgroundColor = UIColor(red: 0.46, green: 0.75, blue: 0.45, alpha: 0.05)
// dfyView.backgroundColor = UIColor(red: 0.46, green: 0.75, blue: 0.45, alpha: 0.05)
dfyView.backgroundColor = .white
dfyView.layer.cornerRadius = 16.0
dfyImage.image = UIImage(named: "wallet_banner_dfy", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
......@@ -51,12 +53,13 @@ import UIKit
dfyCountView.backgroundColor = UIColor(red: 0.92, green: 0.75, blue: 0.41, alpha: 1.00)
// SM Banner
smView.backgroundColor = UIColor(red: 1.00, green: 0.99, blue: 0.97, alpha: 1.00)
// smView.backgroundColor = UIColor(red: 1.00, green: 0.99, blue: 0.97, alpha: 1.00)
smView.backgroundColor = .white
smView.layer.cornerRadius = 16.0
smView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
smView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
smView.layer.shadowOpacity = 1.0
smView.layer.shadowRadius = 1.0
smView.layer.shadowRadius = 2.0
smImage.image = UIImage(named: "wallet_banner_sm", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
......@@ -66,16 +69,19 @@ import UIKit
smCountView.backgroundColor = UIColor(red: 0.92, green: 0.75, blue: 0.41, alpha: 1.00)
// GFY Banner
gfyView.backgroundColor = UIColor(red: 0.96, green: 0.97, blue: 0.98, alpha: 1.00)
// gfyView.backgroundColor = UIColor(red: 0.96, green: 0.97, blue: 0.98, alpha: 1.00)
gfyView.backgroundColor = .white
gfyView.layer.cornerRadius = 16.0
gfyView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
gfyView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
gfyView.layer.shadowOpacity = 1.0
gfyView.layer.shadowRadius = 1.0
gfyView.layer.shadowRadius = 2.0
gfyImage.image = UIImage(named: "wallet_banner_gfy", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
gfyLabel.text = "GIFTS FOR YOU"
// gfyLabel.text = "GIFTS FOR YOU"
// gfyLabel.text = "Free coupons"
gfyLabel.text = "FREE COUPONS"
gfyCountView.layer.cornerRadius = 4.0
gfyCountView.backgroundColor = UIColor(red: 0.92, green: 0.75, blue: 0.41, alpha: 1.00)
......
......@@ -8,10 +8,17 @@
import UIKit
@objc public class WalletEmptyViewTableViewCell: UITableViewCell {
@IBOutlet weak var emptyImage: UIImageView!
@IBOutlet weak var emptyLabel: UILabel!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
emptyImage.image = UIImage(named: "ic_empty_wallet_3", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
// emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!"
emptyLabel.text = "Δεν έχεις ενεργό κωδικό ή κουπόνι!\nΜπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές"
}
public override func setSelected(_ selected: Bool, animated: Bool) {
......
......@@ -8,10 +8,31 @@
import UIKit
@objc public class WalletHistoryBannerTableViewCell: UITableViewCell {
@IBOutlet weak var bannerView: UIView!
@IBOutlet weak var bannerIconImage: UIImageView!
@IBOutlet weak var bannerLabel: UILabel!
@IBOutlet weak var bannerArrowImage: UIImageView!
let language = swiftApi().getLanguage()
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
bannerView.layer.cornerRadius = 16.0
bannerView.layer.borderWidth = 1
bannerView.layer.borderColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00).cgColor
// Add shadow
bannerView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
bannerView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
bannerView.layer.shadowOpacity = 1.0
bannerView.layer.shadowRadius = 1.0
bannerIconImage.image = UIImage(named: "wallet_history_blue", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
bannerArrowImage.image = UIImage(named: "arrow_right_black", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
bannerLabel.text = "Δες το ιστορικό σου"
}
public override func setSelected(_ selected: Bool, animated: Bool) {
......@@ -19,5 +40,5 @@ import UIKit
// Configure the view for the selected state
}
}
......
......@@ -8,10 +8,29 @@
import UIKit
@objc public class WalletQuestionnaireBannerTableViewCell: UITableViewCell {
@IBOutlet weak var bannerView: UIView!
@IBOutlet weak var bannerIconImage: UIImageView!
@IBOutlet weak var bannerIconImageWidth: NSLayoutConstraint!
@IBOutlet weak var bannerLabel: UILabel!
@IBOutlet weak var bannerLabelLeftSpace: NSLayoutConstraint!
@IBOutlet weak var bannerArrowImage: UIImageView!
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
bannerView.layer.cornerRadius = 16.0
bannerView.layer.borderWidth = 1
bannerView.layer.borderColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00).cgColor
// Add shadow
bannerView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.2).cgColor
bannerView.layer.shadowOffset = CGSize(width: 0.0, height: 1.0)
bannerView.layer.shadowOpacity = 1.0
bannerView.layer.shadowRadius = 1.0
bannerIconImage.image = UIImage(named: "wallet_plus_blue", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
bannerArrowImage.image = UIImage(named: "arrow_right_black", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
}
public override func setSelected(_ selected: Bool, animated: Bool) {
......@@ -19,5 +38,24 @@ import UIKit
// Configure the view for the selected state
}
func configureCell() {
let userTag = swiftApi().getUserTag()
// print("User tag: " + userTag)
if (userTag != "" && userTag != "undefined") {
bannerLabel.text = userTag
bannerLabel.frame.size.width = bannerLabel.intrinsicContentSize.width
bannerIconImage.isHidden = true
bannerIconImageWidth.constant = CGFloat(0.0)
bannerLabelLeftSpace.constant = CGFloat(0.0)
} else {
bannerLabel.text = "Πρόσθεσε τις προτιμήσεις σου"
bannerLabel.frame.size.width = bannerLabel.intrinsicContentSize.width
bannerIconImage.isHidden = false
bannerIconImageWidth.constant = CGFloat(22.0)
bannerLabelLeftSpace.constant = CGFloat(10.0)
}
}
}
......
......@@ -14,7 +14,8 @@ import UIKit
super.awakeFromNib()
// Initialization code
spinner.color = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
// spinner.color = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
spinner.color = UIColor(red: 0.00, green: 0.65, blue: 0.89, alpha: 1.00)
spinner.translatesAutoresizingMaskIntoConstraints = false
spinner.startAnimating()
......