Manos Chorianopoulos

redesign CouponBarcodeViewController for SMCoupons

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -6,7 +6,7 @@
//
import UIKit
// import RSBarcodes_Swift
import RSBarcodes_Swift
import AVFoundation
// import SwiftEventBus
......@@ -34,6 +34,7 @@ import AVFoundation
@IBOutlet weak var barcodeLabelHeight: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButton: UIButton!
@IBOutlet weak var expirationLabel: UILabel!
@IBOutlet weak var expirationLabelHeight: NSLayoutConstraint!
@IBOutlet weak var redeemButton: UIButton!
@IBOutlet weak var redeemButtonHeight: NSLayoutConstraint!
@IBOutlet weak var redeemButtonTopSpace: NSLayoutConstraint!
......@@ -53,6 +54,15 @@ import AVFoundation
@IBOutlet weak var showBarcodeButtonHeight: NSLayoutConstraint!
@IBOutlet weak var showBarcodeButtonTopSpace: NSLayoutConstraint!
@IBOutlet weak var couponCodeLabelTopSpace: NSLayoutConstraint!
@IBOutlet weak var discountView: UIView!
@IBOutlet weak var discountLabel: UILabel!
@IBOutlet weak var topExpirationView: UIView!
@IBOutlet weak var topExpirationViewHeight: NSLayoutConstraint!
@IBOutlet weak var topExpirationViewTopSpace: NSLayoutConstraint!
@IBOutlet weak var topExpirationLabel: UILabel!
@IBOutlet weak var barcodeTitleLabel: UILabel!
@IBOutlet weak var barcodeTitleLabelHeight: NSLayoutConstraint!
@IBOutlet weak var barcodeTitleLabelTopSpace: NSLayoutConstraint!
let uiscreen: CGRect = UIScreen.main.bounds
......@@ -66,6 +76,7 @@ import AVFoundation
public var coupon: swiftApi.CouponItemModel?
public var isFromWallet: Bool? = false
public var isMarket: Bool? = false
public var isSMCoupon: Bool? = false
public override func viewDidLoad() {
super.viewDidLoad()
......@@ -119,6 +130,58 @@ import AVFoundation
couponImageHeight.constant = 222 // 255 //230 // 253 // self.uiscreen.height * 0.25
discountView.backgroundColor = UIColor(rgb: 0xB8E0EF)
discountView.layer.cornerRadius = 16.0
discountView.layer.maskedCorners = [ .layerMinXMinYCorner, .layerMaxXMaxYCorner] // Top left, bottom right corner radius
discountLabel.font = UIFont(name: "BTCosmo-Bold", size: 27)
discountLabel.textColor = UIColor(rgb: 0x004B87)
var discount = ""
if (couponSetData?.discount_type == "value") {
discount = ("-" + (coupon?.discount ?? "") + "€")
} else if (couponSetData?.discount_type == "percentage") {
discount = ("-" + (coupon?.discount ?? "") + "%")
} else if (couponSetData?.discount_type == "plus_one") {
discount = "1+1"
} else {
discount = ("-" + (coupon?.discount ?? "") + "€")
}
discountLabel.text = discount
topExpirationView.backgroundColor = UIColor(rgb: 0xB8E0EF)
topExpirationView.layer.cornerRadius = 13.0
topExpirationLabel.text = "Ισχύει έως " + (coupon?.expiration ?? "")
topExpirationLabel.font = UIFont(name: "PeridotPE-Bold", size: 13)
topExpirationLabel.textColor = UIColor(rgb: 0x004B87)
topExpirationLabel.frame.size.width = topExpirationLabel.intrinsicContentSize.width
barcodeTitleLabel.text = "barcode κουπονιού"
barcodeTitleLabel.font = UIFont(name: "PeridotPE-Bold", size: 16)
barcodeTitleLabel.textColor = UIColor(rgb: 0x212121)
if (isSMCoupon == true) {
discountView.isHidden = false
topExpirationView.isHidden = false
topExpirationViewHeight.constant = topExpirationLabel.intrinsicContentSize.height + 8
topExpirationViewTopSpace.constant = CGFloat(8)
expirationLabel.isHidden = true
expirationLabel.isHidden = true
expirationLabelHeight.constant = CGFloat(0)
barcodeTitleLabel.isHidden = false
barcodeTitleLabelHeight.constant = barcodeTitleLabel.intrinsicContentSize.height
barcodeTitleLabelTopSpace.constant = CGFloat(20)
} else {
discountView.isHidden = true
topExpirationView.isHidden = true
topExpirationViewHeight.constant = CGFloat(0)
topExpirationViewTopSpace.constant = CGFloat(0)
expirationLabel.isHidden = false
expirationLabelHeight.constant = expirationLabel.intrinsicContentSize.height
barcodeTitleLabel.isHidden = true
barcodeTitleLabelHeight.constant = CGFloat(0)
barcodeTitleLabelTopSpace.constant = CGFloat(0)
}
if (isMarket == true) {
couponImage.contentMode = .scaleAspectFit
......@@ -207,14 +270,65 @@ import AVFoundation
couponViewTopSpace.constant = CGFloat(20)
redeemButton.isHidden = false
redeemButtonHeight.constant = CGFloat(50)
redeemButtonHeight.constant = CGFloat(55)
// redeemButtonTopSpace.constant = CGFloat(20)
}
let barcodeString = constructBarcode() ?? ""
barcodeLabel.text = barcodeString
// Uncomment if Barcode Section is active again
if (isSMCoupon == true) {
// Uncomment if Barcode Section is active again
if let barcodeUIImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) {
barcodeImage.image = barcodeUIImage
barcodeImageHeight.constant = self.uiscreen.height * 0.1
// showBarcodeButton.isHidden = false
// showBarcodeButtonHeight.constant = 50
// showBarcodeButtonTopSpace.constant = 10
} else {
barcodeImageHeight.constant = 0
// showBarcodeButton.isHidden = true
// showBarcodeButtonHeight.constant = 0
// showBarcodeButtonTopSpace.constant = 0
}
// === Hide barcodeLabel
barcodeLabel.isHidden = true
barcodeLabelHeight.constant = CGFloat(0)
barcodeLabelTopSpace.constant = CGFloat(0) // 10
// === Hide Barcode Button
showBarcodeButton.isHidden = true
showBarcodeButtonHeight.constant = 0
showBarcodeButtonTopSpace.constant = 0
// ===
border2TopSpace.constant = CGFloat(10)
} else {
// === Hide Barcode Section
barcodeImage.isHidden = true
barcodeImageHeight.constant = CGFloat(0)
barcodeLabel.isHidden = true
barcodeLabelHeight.constant = CGFloat(0)
borderViewHeight.constant = CGFloat(0)
borderView2Height.constant = CGFloat(0)
border1TopSpace.constant = CGFloat(0) // 20
barcodeImageTopSpace.constant = CGFloat(0) // 10
barcodeLabelTopSpace.constant = CGFloat(0) // 10
border2TopSpace.constant = CGFloat(0) // 15
showBarcodeButton.isHidden = true
showBarcodeButtonHeight.constant = 0
showBarcodeButtonTopSpace.constant = 0
// ===
}
// // Uncomment if Barcode Section is active again
// if let barcodeUIImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) {
// barcodeImage.image = barcodeUIImage
//
......@@ -232,24 +346,24 @@ import AVFoundation
// showBarcodeButtonTopSpace.constant = 0
// }
// === Hide Barcode Section
barcodeImage.isHidden = true
barcodeImageHeight.constant = CGFloat(0)
barcodeLabel.isHidden = true
barcodeLabelHeight.constant = CGFloat(0)
borderViewHeight.constant = CGFloat(0)
borderView2Height.constant = CGFloat(0)
border1TopSpace.constant = CGFloat(0) // 20
barcodeImageTopSpace.constant = CGFloat(0) // 10
barcodeLabelTopSpace.constant = CGFloat(0) // 10
border2TopSpace.constant = CGFloat(0) // 15
showBarcodeButton.isHidden = true
showBarcodeButtonHeight.constant = 0
showBarcodeButtonTopSpace.constant = 0
// ===
// // === Hide Barcode Section
// barcodeImage.isHidden = true
// barcodeImageHeight.constant = CGFloat(0)
// barcodeLabel.isHidden = true
// barcodeLabelHeight.constant = CGFloat(0)
//
// borderViewHeight.constant = CGFloat(0)
// borderView2Height.constant = CGFloat(0)
//
// border1TopSpace.constant = CGFloat(0) // 20
// barcodeImageTopSpace.constant = CGFloat(0) // 10
// barcodeLabelTopSpace.constant = CGFloat(0) // 10
// border2TopSpace.constant = CGFloat(0) // 15
//
// showBarcodeButton.isHidden = true
// showBarcodeButtonHeight.constant = 0
// showBarcodeButtonTopSpace.constant = 0
// // ===
showBarcodeButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 16)
showBarcodeButton.setTitle("Εμφάνιση barcode", for: .normal)
......@@ -263,31 +377,64 @@ import AVFoundation
expirationLabel.text = "Το κουπόνι ισχύει έως " + (coupon?.expiration ?? "")
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 17)
redeemButton.setTitle("Δώρισέ το", for: .normal)
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
redeemButton.layer.cornerRadius = 16.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 50)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
// redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
// } else {
// // not iPad (iPhone, mac, tv, carPlay, unspecified)
// redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
// }
if (isSMCoupon == true) {
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 17)
redeemButton.setTitle("Βρες το στα supermarket", for: .normal)
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
redeemButton.layer.cornerRadius = 16.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: 260, height: 55)
// redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 55)
// redeemButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
// redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
// } else {
// // not iPad (iPhone, mac, tv, carPlay, unspecified)
// redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
// }
mapButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 17)
mapButton.setTitle("Δες τα καταστήματα", for: .normal)
mapButton.setTitleColor(UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00), for: .normal)
mapButton.layer.cornerRadius = 15.0
mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 50)
mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
mapButton.backgroundColor = .clear
mapButton.layer.borderWidth = 2
mapButton.layer.borderColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00).cgColor
mapButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 17)
mapButton.setTitle("Δώρισέ το", for: .normal)
mapButton.setTitleColor(UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00), for: .normal)
mapButton.layer.cornerRadius = 15.0
mapButton.frame = CGRect(x: 0.0, y: 0.0, width: 260, height: 55)
// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 55)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
mapButton.backgroundColor = .clear
mapButton.layer.borderWidth = 2
mapButton.layer.borderColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00).cgColor
} else {
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 17)
redeemButton.setTitle("Δώρισέ το", for: .normal)
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
redeemButton.layer.cornerRadius = 16.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: 260, height: 55)
// redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 55)
// redeemButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
// redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
// } else {
// // not iPad (iPhone, mac, tv, carPlay, unspecified)
// redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
// }
mapButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 17)
mapButton.setTitle("Δες τα καταστήματα", for: .normal)
mapButton.setTitleColor(UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00), for: .normal)
mapButton.layer.cornerRadius = 15.0
mapButton.frame = CGRect(x: 0.0, y: 0.0, width: 260, height: 55)
// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 55)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
mapButton.backgroundColor = .clear
mapButton.layer.borderWidth = 2
mapButton.layer.borderColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00).cgColor
}
// mapButton.isHidden = true
......@@ -366,11 +513,11 @@ import AVFoundation
termsTextView.isSelectable = true
termsTextView.dataDetectorTypes = [.link]
// Uncomment if Barcode Section is active again
toggleTerms()
if (isMarket == false) {
toggleBarcode()
}
// Uncomment if Barcode Section is active again
// if (isMarket == false) {
// toggleBarcode()
// }
// Logs
print("Coupon: " + (coupon?.coupon ?? ""))
......@@ -492,16 +639,21 @@ import AVFoundation
// MARK: - Actions
@IBAction func redeemButtomAction(_ sender: Any) {
let couponSetData: swiftApi.CouponSetItemModel? = self.coupon?.couponset_data
let couponName = couponSetData?.name ?? ""
swiftApi().logTrackersEvent("click", ("ShareCoupon:" + couponName))
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "ShareViewController") as! SwiftWarplyFramework.ShareViewController
vc.coupon = self.coupon
vc.isFromWallet = self.isFromWallet
self.navigationController?.pushViewController(vc, animated: true)
if (isSMCoupon == true) {
// TODO: Open popup
} else {
let couponSetData: swiftApi.CouponSetItemModel? = self.coupon?.couponset_data
let couponName = couponSetData?.name ?? ""
swiftApi().logTrackersEvent("click", ("ShareCoupon:" + couponName))
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "ShareViewController") as! SwiftWarplyFramework.ShareViewController
vc.coupon = self.coupon
vc.isFromWallet = self.isFromWallet
self.navigationController?.pushViewController(vc, animated: true)
}
}
@IBAction func showBarcodeAction(_ sender: Any) {
......@@ -515,16 +667,30 @@ import AVFoundation
}
@IBAction func mapButtonAction(_ sender: Any) {
swiftApi().logTrackersEvent("click", "SeeShops")
let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
if (isMarket == true) {
vc.isMarket = true
if (isSMCoupon == true) {
let couponSetData: swiftApi.CouponSetItemModel? = self.coupon?.couponset_data
let couponName = couponSetData?.name ?? ""
swiftApi().logTrackersEvent("click", ("ShareCoupon:" + couponName))
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "ShareViewController") as! SwiftWarplyFramework.ShareViewController
vc.coupon = self.coupon
vc.isFromWallet = self.isFromWallet
self.navigationController?.pushViewController(vc, animated: true)
} else {
vc.coupon = coupon
swiftApi().logTrackersEvent("click", "SeeShops")
let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
if (isMarket == true) {
vc.isMarket = true
} else {
vc.coupon = coupon
}
self.navigationController?.pushViewController(vc, animated: true)
}
self.navigationController?.pushViewController(vc, animated: true)
// if (mapBtnVisible == true) {
// swiftApi().logTrackersEvent("click", "SeeShops")
......
......@@ -5461,20 +5461,57 @@
<constraint firstAttribute="height" constant="200" id="kL0-u7-VI9"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="w9v-K9-Ca1">
<rect key="frame" x="17" y="19" width="108" height="95"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-0.00€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hmI-GY-9Ou">
<rect key="frame" x="9" y="31.5" width="90" height="32.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="27"/>
<color key="textColor" red="0.0" green="0.29411764705882354" blue="0.52941176470588236" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.72156862745098038" green="0.8784313725490196" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="hmI-GY-9Ou" firstAttribute="centerX" secondItem="w9v-K9-Ca1" secondAttribute="centerX" id="aAK-hk-a5S"/>
<constraint firstItem="hmI-GY-9Ou" firstAttribute="centerY" secondItem="w9v-K9-Ca1" secondAttribute="centerY" id="bC4-HH-cth"/>
<constraint firstAttribute="height" constant="95" id="cPX-3I-Uwr"/>
<constraint firstAttribute="width" constant="108" id="yd0-Fg-sGs"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xz4-EE-EzJ">
<rect key="frame" x="20" y="230" width="374" height="39.5"/>
<fontDescription key="fontDescription" name="BTCosmo-Bold" family="BTCosmo" pointSize="17"/>
<color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Jl-GR-rPb">
<rect key="frame" x="122.5" y="277.5" width="169" height="24"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ισχύει έως 05/10/2024" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kf4-Ij-bMw">
<rect key="frame" x="15" y="4" width="139" height="16"/>
<fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="13"/>
<color key="textColor" red="0.12941176469999999" green="0.12941176469999999" blue="0.12941176469999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.72156862745098038" green="0.8784313725490196" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="kf4-Ij-bMw" secondAttribute="trailing" constant="15" id="2hp-kR-SeO"/>
<constraint firstAttribute="height" constant="24" id="Bic-Qc-jMw"/>
<constraint firstItem="kf4-Ij-bMw" firstAttribute="leading" secondItem="0Jl-GR-rPb" secondAttribute="leading" constant="15" id="DTB-ru-fmw"/>
<constraint firstAttribute="bottom" secondItem="kf4-Ij-bMw" secondAttribute="bottom" constant="4" id="ROR-1I-OtQ"/>
<constraint firstItem="kf4-Ij-bMw" firstAttribute="top" secondItem="0Jl-GR-rPb" secondAttribute="top" constant="4" id="l6A-rT-gey"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mri-Wl-spg">
<rect key="frame" x="20" y="284.5" width="374" height="59.5"/>
<rect key="frame" x="20" y="318.5" width="374" height="59.5"/>
<fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="16"/>
<color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tzW-b9-Rbx" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="354" width="374" height="0.0"/>
<rect key="frame" x="20" y="388" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="7ch-2U-9oE"/>
......@@ -5484,7 +5521,7 @@
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Κωδικός Κουπονιού" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sg1-QU-FY1">
<rect key="frame" x="20" y="389" width="374" height="20"/>
<rect key="frame" x="20" y="423" width="374" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="mKs-LB-L7G"/>
</constraints>
......@@ -5493,7 +5530,7 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zdf-1r-FdJ" userLabel="Coupon View">
<rect key="frame" x="20" y="429" width="374" height="55"/>
<rect key="frame" x="20" y="463" width="374" height="55"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BJS-kk-CBZ" customClass="CopyableLabel" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="20" y="12.5" width="334" height="30"/>
......@@ -5510,21 +5547,30 @@
<constraint firstItem="BJS-kk-CBZ" firstAttribute="leading" secondItem="Zdf-1r-FdJ" secondAttribute="leading" constant="20" id="dxa-Dc-OXI"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="barcode κουπονιού" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mrR-ID-3V1">
<rect key="frame" x="20" y="538" width="374" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="1ff-He-qSg"/>
</constraints>
<fontDescription key="fontDescription" name="PeridotPE-Bold" family="Peridot PE" pointSize="16"/>
<color key="textColor" red="0.12941176469999999" green="0.12941176469999999" blue="0.12941176469999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jrM-7n-fSw" userLabel="Border View">
<rect key="frame" x="20" y="504" width="374" height="1"/>
<rect key="frame" x="20" y="578" width="374" height="1"/>
<color key="backgroundColor" red="0.90196078431372551" green="0.90196078431372551" blue="0.90196078431372551" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="eF3-7T-hMu"/>
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="huh-zh-82C">
<rect key="frame" x="30" y="515" width="354" height="110"/>
<rect key="frame" x="30" y="589" width="354" height="110"/>
<constraints>
<constraint firstAttribute="height" constant="110" id="LJq-uV-eb8"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456789101112" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EKv-Mx-6Yv">
<rect key="frame" x="20" y="635" width="374" height="26.5"/>
<rect key="frame" x="20" y="709" width="374" height="26.5"/>
<constraints>
<constraint firstAttribute="height" constant="26.5" id="LfJ-bC-nLk"/>
</constraints>
......@@ -5533,14 +5579,14 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6rV-2m-QMZ" userLabel="Border 2 View">
<rect key="frame" x="20" y="676.5" width="374" height="1"/>
<rect key="frame" x="20" y="750.5" width="374" height="1"/>
<color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="DVl-3B-zqo"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zw5-Wj-WD5">
<rect key="frame" x="103.5" y="687.5" width="207" height="50"/>
<rect key="frame" x="103.5" y="761.5" width="207" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="ZSP-NX-0a7"/>
</constraints>
......@@ -5555,15 +5601,19 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Το κουπόνι ισχύει έως 05/12/2022" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UhC-Lj-tfN">
<rect key="frame" x="20" y="767.5" width="374" height="20"/>
<rect key="frame" x="20" y="841.5" width="374" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="d8H-UJ-FgS"/>
</constraints>
<fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="16"/>
<color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8cR-Rc-YMJ">
<rect key="frame" x="167.5" y="807.5" width="79" height="50"/>
<rect key="frame" x="77" y="881.5" width="260" height="55"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="ccg-NP-FIH"/>
<constraint firstAttribute="width" constant="260" id="PKJ-YS-q5c"/>
<constraint firstAttribute="height" constant="55" id="ccg-NP-FIH"/>
</constraints>
<fontDescription key="fontDescription" name="PeridotPE-SBold" family="Peridot PE" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
......@@ -5575,9 +5625,10 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W5f-1T-iW6">
<rect key="frame" x="128" y="867.5" width="158" height="50"/>
<rect key="frame" x="77" y="946.5" width="260" height="55"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="3pq-y5-f66"/>
<constraint firstAttribute="height" constant="55" id="3pq-y5-f66"/>
<constraint firstAttribute="width" constant="260" id="doI-TX-TlX"/>
</constraints>
<fontDescription key="fontDescription" name="PeridotPE-Bold" family="Peridot PE" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
......@@ -5589,7 +5640,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8UD-WL-JB7">
<rect key="frame" x="103.5" y="937.5" width="207" height="40"/>
<rect key="frame" x="103.5" y="1021.5" width="207" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="xdq-YS-AL4"/>
</constraints>
......@@ -5604,7 +5655,7 @@
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xjX-HZ-MpD" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
<rect key="frame" x="20" y="977.5" width="374" height="0.0"/>
<rect key="frame" x="20" y="1061.5" width="374" height="0.0"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" id="3GU-tg-S3t"/>
......@@ -5621,17 +5672,20 @@
<constraint firstItem="8UD-WL-JB7" firstAttribute="top" secondItem="W5f-1T-iW6" secondAttribute="bottom" constant="20" id="2qi-nv-Q66"/>
<constraint firstAttribute="trailing" secondItem="Xz4-EE-EzJ" secondAttribute="trailing" constant="20" id="5Sx-lW-x5H"/>
<constraint firstItem="Zw5-Wj-WD5" firstAttribute="width" secondItem="1ec-eH-fkX" secondAttribute="width" multiplier="0.5" id="5nW-K9-uVa"/>
<constraint firstItem="0Jl-GR-rPb" firstAttribute="top" secondItem="Xz4-EE-EzJ" secondAttribute="bottom" constant="8" id="60A-on-R8q"/>
<constraint firstItem="w9v-K9-Ca1" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="17" id="6aj-It-XIe"/>
<constraint firstItem="Zw5-Wj-WD5" firstAttribute="top" secondItem="6rV-2m-QMZ" secondAttribute="bottom" constant="10" id="7VE-aB-ZD3"/>
<constraint firstItem="8cR-Rc-YMJ" firstAttribute="centerX" secondItem="1ec-eH-fkX" secondAttribute="centerX" id="8hP-dm-rWP"/>
<constraint firstItem="8UD-WL-JB7" firstAttribute="width" secondItem="1ec-eH-fkX" secondAttribute="width" multiplier="0.5" id="9Gy-bi-NXO"/>
<constraint firstItem="mri-Wl-spg" firstAttribute="top" secondItem="Xz4-EE-EzJ" secondAttribute="bottom" constant="15" id="9W8-fX-IzR"/>
<constraint firstItem="mri-Wl-spg" firstAttribute="top" secondItem="0Jl-GR-rPb" secondAttribute="bottom" constant="17" id="9W8-fX-IzR"/>
<constraint firstItem="xjX-HZ-MpD" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="20" id="AIW-Kf-tkQ"/>
<constraint firstItem="Zw5-Wj-WD5" firstAttribute="centerX" secondItem="1ec-eH-fkX" secondAttribute="centerX" id="BgT-3L-aZo"/>
<constraint firstItem="tzW-b9-Rbx" firstAttribute="top" secondItem="mri-Wl-spg" secondAttribute="bottom" constant="10" id="Cep-Md-KJT"/>
<constraint firstItem="jrM-7n-fSw" firstAttribute="top" secondItem="Zdf-1r-FdJ" secondAttribute="bottom" constant="20" id="G5W-a3-pag"/>
<constraint firstItem="jrM-7n-fSw" firstAttribute="top" secondItem="mrR-ID-3V1" secondAttribute="bottom" constant="20" id="G5W-a3-pag"/>
<constraint firstItem="huh-zh-82C" firstAttribute="top" secondItem="jrM-7n-fSw" secondAttribute="bottom" constant="10" id="GQF-H5-SZp"/>
<constraint firstItem="iiM-5P-m5s" firstAttribute="top" secondItem="1ec-eH-fkX" secondAttribute="top" id="H9I-TB-xig"/>
<constraint firstItem="8cR-Rc-YMJ" firstAttribute="top" secondItem="UhC-Lj-tfN" secondAttribute="bottom" constant="20" id="I87-km-KEb"/>
<constraint firstItem="0Jl-GR-rPb" firstAttribute="centerX" secondItem="1ec-eH-fkX" secondAttribute="centerX" id="JJy-En-3SD"/>
<constraint firstItem="Zdf-1r-FdJ" firstAttribute="top" secondItem="Sg1-QU-FY1" secondAttribute="bottom" constant="20" id="KZi-Jl-Yyz"/>
<constraint firstItem="UhC-Lj-tfN" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="20" id="MSg-iF-tt9"/>
<constraint firstAttribute="trailing" secondItem="6rV-2m-QMZ" secondAttribute="trailing" constant="20" id="NGe-PV-pQl"/>
......@@ -5642,6 +5696,7 @@
<constraint firstItem="W5f-1T-iW6" firstAttribute="top" secondItem="8cR-Rc-YMJ" secondAttribute="bottom" constant="10" id="Rbe-XQ-CIj"/>
<constraint firstAttribute="trailing" secondItem="jrM-7n-fSw" secondAttribute="trailing" constant="20" id="ReY-xR-F8V"/>
<constraint firstItem="Xz4-EE-EzJ" firstAttribute="top" secondItem="iiM-5P-m5s" secondAttribute="bottom" constant="30" id="Ryr-v8-THU"/>
<constraint firstItem="w9v-K9-Ca1" firstAttribute="top" secondItem="1ec-eH-fkX" secondAttribute="top" constant="19" id="WMg-WG-w5X"/>
<constraint firstItem="Sg1-QU-FY1" firstAttribute="top" secondItem="tzW-b9-Rbx" secondAttribute="bottom" constant="35" id="WWh-BA-7qP"/>
<constraint firstItem="xjX-HZ-MpD" firstAttribute="top" secondItem="8UD-WL-JB7" secondAttribute="bottom" id="XFI-ij-KkC"/>
<constraint firstItem="mri-Wl-spg" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="20" id="YLo-Lg-Lda"/>
......@@ -5650,8 +5705,10 @@
<constraint firstAttribute="trailing" secondItem="Zdf-1r-FdJ" secondAttribute="trailing" constant="20" id="c0p-Op-6VI"/>
<constraint firstItem="iiM-5P-m5s" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" id="e6i-V3-Csq"/>
<constraint firstItem="8UD-WL-JB7" firstAttribute="centerX" secondItem="1ec-eH-fkX" secondAttribute="centerX" id="eFM-ex-Dye"/>
<constraint firstItem="mrR-ID-3V1" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="20" id="eXK-mb-JRq"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="8UD-WL-JB7" secondAttribute="bottom" constant="30" id="emI-WB-sXK"/>
<constraint firstItem="Zdf-1r-FdJ" firstAttribute="centerX" secondItem="1ec-eH-fkX" secondAttribute="centerX" id="gRP-ik-WC8"/>
<constraint firstItem="mrR-ID-3V1" firstAttribute="top" secondItem="Zdf-1r-FdJ" secondAttribute="bottom" constant="20" id="h9l-Jc-168"/>
<constraint firstItem="6rV-2m-QMZ" firstAttribute="top" secondItem="EKv-Mx-6Yv" secondAttribute="bottom" constant="15" id="hL4-rX-9aa"/>
<constraint firstItem="Sg1-QU-FY1" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="20" id="hUh-Q7-uqi"/>
<constraint firstItem="EKv-Mx-6Yv" firstAttribute="top" secondItem="huh-zh-82C" secondAttribute="bottom" constant="10" id="hZO-Qg-tda"/>
......@@ -5660,6 +5717,7 @@
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="xjX-HZ-MpD" secondAttribute="bottom" constant="30" id="kLr-ZV-vCo"/>
<constraint firstAttribute="trailing" secondItem="UhC-Lj-tfN" secondAttribute="trailing" constant="20" id="lM1-ep-Zec"/>
<constraint firstItem="Xz4-EE-EzJ" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="20" id="lMf-pF-Bp6"/>
<constraint firstAttribute="trailing" secondItem="mrR-ID-3V1" secondAttribute="trailing" constant="20" id="nac-Qi-24n"/>
<constraint firstItem="tzW-b9-Rbx" firstAttribute="leading" secondItem="1ec-eH-fkX" secondAttribute="leading" constant="20" id="oYF-cS-wt4"/>
<constraint firstItem="UhC-Lj-tfN" firstAttribute="top" secondItem="Zw5-Wj-WD5" secondAttribute="bottom" constant="30" id="ora-fw-TKe"/>
<constraint firstAttribute="trailing" secondItem="iiM-5P-m5s" secondAttribute="trailing" id="qWA-17-dEY"/>
......@@ -5722,6 +5780,9 @@
<outlet property="barcodeLabel" destination="EKv-Mx-6Yv" id="myd-id-Q29"/>
<outlet property="barcodeLabelHeight" destination="LfJ-bC-nLk" id="cPV-72-LRC"/>
<outlet property="barcodeLabelTopSpace" destination="hZO-Qg-tda" id="X5g-M7-vwh"/>
<outlet property="barcodeTitleLabel" destination="mrR-ID-3V1" id="iVV-eN-u4i"/>
<outlet property="barcodeTitleLabelHeight" destination="1ff-He-qSg" id="4Or-ir-3cu"/>
<outlet property="barcodeTitleLabelTopSpace" destination="h9l-Jc-168" id="LNG-d2-Fbx"/>
<outlet property="border1TopSpace" destination="G5W-a3-pag" id="bKg-mJ-AWF"/>
<outlet property="border2TopSpace" destination="hL4-rX-9aa" id="87h-tF-CnT"/>
<outlet property="borderView2Height" destination="DVl-3B-zqo" id="USP-Iq-ZAd"/>
......@@ -5735,8 +5796,11 @@
<outlet property="couponView" destination="Zdf-1r-FdJ" id="OA8-73-e0p"/>
<outlet property="couponViewHeight" destination="XVr-JP-U40" id="zhH-KN-zLy"/>
<outlet property="couponViewTopSpace" destination="KZi-Jl-Yyz" id="Xlm-Ls-aNv"/>
<outlet property="discountLabel" destination="hmI-GY-9Ou" id="ai8-UU-wnL"/>
<outlet property="discountView" destination="w9v-K9-Ca1" id="KHe-b7-uzQ"/>
<outlet property="discriptionLabel" destination="mri-Wl-spg" id="iuf-XL-NWH"/>
<outlet property="expirationLabel" destination="UhC-Lj-tfN" id="9Hj-I1-nJa"/>
<outlet property="expirationLabelHeight" destination="d8H-UJ-FgS" id="KGs-3z-oX9"/>
<outlet property="mainView" destination="P3Q-nP-aSj" id="pZK-pk-db5"/>
<outlet property="mapButton" destination="W5f-1T-iW6" id="2IL-QE-TdM"/>
<outlet property="mapButtonHeight" destination="3pq-y5-f66" id="oFZ-P9-dUD"/>
......@@ -5757,6 +5821,10 @@
<outlet property="termsTextView" destination="xjX-HZ-MpD" id="8ZQ-e0-1Ib"/>
<outlet property="termsTextViewHeight" destination="3GU-tg-S3t" id="H3e-IQ-FGo"/>
<outlet property="topBorderLine" destination="PQs-Qn-5Rq" id="V9f-xB-2zP"/>
<outlet property="topExpirationLabel" destination="kf4-Ij-bMw" id="Abk-G7-tNs"/>
<outlet property="topExpirationView" destination="0Jl-GR-rPb" id="TSK-tm-1KL"/>
<outlet property="topExpirationViewHeight" destination="Bic-Qc-jMw" id="cy8-CO-Jv5"/>
<outlet property="topExpirationViewTopSpace" destination="60A-on-R8q" id="GZB-bc-GcI"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="tvH-ht-75E" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
......
......@@ -335,6 +335,7 @@ extension UnifiedCouponsViewController: UITableViewDelegate, UITableViewDataSour
let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController
vc.coupon = smCoupons[indexPath.row]
vc.isFromWallet = true
vc.isSMCoupon = true
self.navigationController?.pushViewController(vc, animated: true)
} else {
......