Manos Chorianopoulos

refactor WalletVC v1

......@@ -8,10 +8,172 @@
import UIKit
class ActiveCodeTableViewCell: UITableViewCell {
@IBOutlet weak var activeCodeView: UIView!
@IBOutlet weak var activeCodeViewHeight: NSLayoutConstraint!
@IBOutlet weak var activeCodesCountLabel: UILabel!
@IBOutlet weak var activeCodeLabel: UILabel!
@IBOutlet weak var activeCodeExpirationLabel: UILabel!
@IBOutlet weak var activeCodeImage: UIImageView!
@IBOutlet weak var activeCodeScrollView: UIScrollView!
@IBOutlet weak var activeCodeScrollViewHeight: NSLayoutConstraint!
@IBOutlet weak var activeCodeContentView: UIView!
@IBOutlet weak var activeCodeContentViewHeight: NSLayoutConstraint!
public var dfyCoupons:Array<swiftApi.ActiveDFYCouponModel> = swiftApi().getActiveDFYCoupons()
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
// TODO: DELETE ===>
// let coupon = swiftApi.ActiveDFYCouponModel()
// coupon._value = "12"
// // coupon._date = "2022-12-05 01:55:01"
// coupon._date = "2022-10-26 23:59:01"
// coupon._code = "123456789"
// let coupon2 = swiftApi.ActiveDFYCouponModel()
// coupon2._value = "23"
// coupon2._date = "2022-11-05 01:55"
// coupon2._code = "234567891"
// let coupon3 = swiftApi.ActiveDFYCouponModel()
// coupon3._value = "34"
// coupon3._date = "2022-07-01 01:55"
// coupon3._code = "345678912"
// let couponsArray: Array<swiftApi.ActiveDFYCouponModel> = [coupon, coupon2, coupon3, coupon3, coupon3]
// swiftApi().setActiveDFYCoupons(dfyCoupons: couponsArray)
// dfyCoupons = swiftApi().getActiveDFYCoupons()
// TODO: DELETE <===
activeCodeView.layer.cornerRadius = 5.0
activeCodeView.layer.shadowColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 0.16).cgColor
activeCodeView.layer.shadowOffset = CGSize(width: 0.0, height: 0.0)
activeCodeView.layer.shadowOpacity = 1.0
activeCodeView.layer.shadowRadius = 6.0
activeCodeImage.image = UIImage(named: "active_code_logo", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
if (dfyCoupons.count > 0) {
if (dfyCoupons.count == 1) {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
// dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
// sort dfyCoupons by date
dfyCoupons.sort(by: {
let date1 = dateFormatter.date(from: $0._date)
let date2 = dateFormatter.date(from: $1._date)
if ((date1 != nil) && (date2 != nil)) {
return date1!.compare(date2!) == .orderedAscending
} else {
return false
}
})
// Get days from now of the most recet coupon
var daysFromNow = ""
let calendar = Calendar.current
// Replace the hour (time) of both dates with 00:00
let date1 = calendar.startOfDay(for: Date())
if let date2 = dateFormatter.date(from: dfyCoupons[0]._date) {
let components = calendar.dateComponents([.day], from: date1, to: date2)
daysFromNow = (components.day) != nil ? String((components.day ?? 0) + 1) : ""
}
activeCodesCountLabel.text = "Ενεργός κωδικός:"
// activeCodeLabel.text = dfyCoupons[0]._code
let newLabel = CopyableLabel()
newLabel.text = String(dfyCoupons[0]._code)
newLabel.font = UIFont(name: "PFSquareSansPro-Bold", size: 19)
newLabel.textColor = UIColor(rgb: 0x3C5365)
newLabel.frame.size.width = newLabel.intrinsicContentSize.width
newLabel.frame.size.height = newLabel.intrinsicContentSize.height // tagHeight
activeCodeContentView.addSubview(newLabel)
// set the btn frame origin
newLabel.frame.origin.x = 0
newLabel.frame.origin.y = 0
let scrollHeight = newLabel.intrinsicContentSize.height
activeCodeContentViewHeight.constant = scrollHeight
activeCodeScrollViewHeight.constant = scrollHeight
activeCodeExpirationLabel.isHidden = false
if (daysFromNow == "1") {
activeCodeExpirationLabel.text = "Λήγει σε " + daysFromNow + " ημέρα"
} else {
activeCodeExpirationLabel.text = "Λήγει σε " + daysFromNow + " ημέρες"
}
} else {
var tagHeight:CGFloat = 30
let tagPadding: CGFloat = 0
let tagSpacingX: CGFloat = 0
let tagSpacingY: CGFloat = 2
let containerWidth = activeCodeContentView.frame.size.width
var currentOriginX: CGFloat = 0
var currentOriginY: CGFloat = 0
// var couponCodesString = ""
for (index, item) in dfyCoupons.enumerated() {
let newLabel = CopyableLabel()
newLabel.font = UIFont(name: "PFSquareSansPro-Bold", size: 19)
newLabel.textColor = UIColor(rgb: 0x3C5365)
if (index == (dfyCoupons.endIndex - 1)) {
// couponCodesString += String(item._code)
newLabel.text = String(item._code)
} else {
// couponCodesString += String(item._code) + ", "
newLabel.text = String(item._code) + ", "
}
newLabel.frame.size.width = newLabel.intrinsicContentSize.width + tagPadding
newLabel.frame.size.height = newLabel.intrinsicContentSize.height // tagHeight
tagHeight = newLabel.intrinsicContentSize.height
activeCodeContentView.addSubview(newLabel)
// if current X + label width will be greater than container view width
// "move to next row"
if currentOriginX + newLabel.frame.width > containerWidth {
currentOriginX = 0
currentOriginY += tagHeight + tagSpacingY
}
// set the btn frame origin
newLabel.frame.origin.x = currentOriginX
newLabel.frame.origin.y = currentOriginY
// increment current X by btn width + spacing
currentOriginX += newLabel.frame.width + tagSpacingX
}
activeCodesCountLabel.text = String(dfyCoupons.count) + " Ενεργοί κωδικοί:"
// activeCodeLabel.text = couponCodesString
activeCodeExpirationLabel.isHidden = true
// update container view height
activeCodeContentViewHeight.constant = currentOriginY + tagHeight
if ((currentOriginY + tagHeight) <= (2 * tagHeight + tagSpacingY)) {
activeCodeScrollViewHeight.constant = currentOriginY + tagHeight
} else {
activeCodeScrollViewHeight.constant = 2 * tagHeight + tagSpacingY
}
}
} else {
activeCodeLabel.text = "-"
activeCodeExpirationLabel.text = ""
activeCodeView.isHidden = true
activeCodeViewHeight.constant = 0
}
}
override func setSelected(_ selected: Bool, animated: Bool) {
......
......@@ -751,21 +751,22 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VHx-uN-GE4" userLabel="Main View">
<rect key="frame" x="0.0" y="44" width="414" height="852"/>
<rect key="frame" x="0.0" y="48" width="414" height="848"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="jYz-96-Lp1">
<rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="jYz-96-Lp1">
<rect key="frame" x="0.0" y="0.0" width="414" height="848"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="separatorColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="ICd-s2-mfF" userLabel="TableHeaderView">
<rect key="frame" x="0.0" y="0.0" width="414" height="663"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Et1-y7-npI" userLabel="HeaderView">
<rect key="frame" x="0.0" y="0.0" width="414" height="181"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="175"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_background_circle" translatesAutoresizingMaskIntoConstraints="NO" id="wP5-YG-vSP">
<rect key="frame" x="0.0" y="0.0" width="414" height="181"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="175"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wJv-NF-rMf">
<rect key="frame" x="174.5" y="30" width="65" height="65"/>
......@@ -775,13 +776,13 @@
</constraints>
</imageView>
<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="1XZ-NB-F8P">
<rect key="frame" x="20" y="105" width="374" height="19"/>
<rect key="frame" x="20" y="105" width="374" height="16"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UNL-Oh-sPV">
<rect key="frame" x="175.5" y="134" width="63" height="27"/>
<rect key="frame" x="176.5" y="131" width="61" height="24"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="14"/>
<inset key="contentEdgeInsets" minX="10" minY="5" maxX="10" maxY="5"/>
......@@ -812,8 +813,150 @@
<constraint firstItem="1XZ-NB-F8P" firstAttribute="top" secondItem="wJv-NF-rMf" secondAttribute="bottom" constant="10" id="zc1-69-P8k"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ukv-zL-7sQ">
<rect key="frame" x="0.0" y="175" width="414" height="488"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="COSMOTE Επιβράβευση" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BXF-rK-wmD">
<rect key="frame" x="20" y="30" width="374" height="254"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="21"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DVa-Te-Sw4" userLabel="BadgesView">
<rect key="frame" x="0.0" y="298" width="414" height="190"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l1J-rC-9tp">
<rect key="frame" x="172" y="0.0" width="70" height="70"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="J7v-XB-iCp">
<rect key="frame" x="0.0" y="0.0" width="70" height="70"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18,00€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E1I-Ms-Wub">
<rect key="frame" x="5" y="42" width="60" height="11"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="J7v-XB-iCp" firstAttribute="leading" secondItem="l1J-rC-9tp" secondAttribute="leading" id="DVv-5x-dpi"/>
<constraint firstAttribute="bottom" secondItem="J7v-XB-iCp" secondAttribute="bottom" id="JrC-vf-xaR"/>
<constraint firstAttribute="trailing" secondItem="E1I-Ms-Wub" secondAttribute="trailing" constant="5" id="Mjt-fY-EsX"/>
<constraint firstAttribute="width" constant="70" id="RHL-gi-cSP"/>
<constraint firstAttribute="bottom" secondItem="E1I-Ms-Wub" secondAttribute="bottom" constant="17" id="TzL-Pz-8m6"/>
<constraint firstAttribute="height" constant="70" id="UyS-ED-6JB"/>
<constraint firstAttribute="trailing" secondItem="J7v-XB-iCp" secondAttribute="trailing" id="WCv-V7-4EC"/>
<constraint firstItem="E1I-Ms-Wub" firstAttribute="leading" secondItem="l1J-rC-9tp" secondAttribute="leading" constant="5" id="qIQ-x6-B84"/>
<constraint firstItem="J7v-XB-iCp" firstAttribute="top" secondItem="l1J-rC-9tp" secondAttribute="top" id="wMB-F4-kXj"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K14-Le-bD6">
<rect key="frame" x="67" y="100" width="70" height="70"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="cYY-uD-dwf">
<rect key="frame" x="0.0" y="0.0" width="70" height="70"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18,00€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uDb-BJ-aht">
<rect key="frame" x="5" y="42" width="60" height="11"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="cYY-uD-dwf" firstAttribute="top" secondItem="K14-Le-bD6" secondAttribute="top" id="F5X-IQ-0KP"/>
<constraint firstAttribute="bottom" secondItem="uDb-BJ-aht" secondAttribute="bottom" constant="17" id="Uhh-aG-qH5"/>
<constraint firstAttribute="trailing" secondItem="uDb-BJ-aht" secondAttribute="trailing" constant="5" id="Yrz-N4-XuC"/>
<constraint firstItem="uDb-BJ-aht" firstAttribute="leading" secondItem="K14-Le-bD6" secondAttribute="leading" constant="5" id="Z9M-03-yEV"/>
<constraint firstAttribute="width" constant="70" id="gvX-cj-kQf"/>
<constraint firstItem="cYY-uD-dwf" firstAttribute="leading" secondItem="K14-Le-bD6" secondAttribute="leading" id="mf8-lz-IyX"/>
<constraint firstAttribute="trailing" secondItem="cYY-uD-dwf" secondAttribute="trailing" id="pzk-ck-tzR"/>
<constraint firstAttribute="height" constant="70" id="tCy-sz-6Lo"/>
<constraint firstAttribute="bottom" secondItem="cYY-uD-dwf" secondAttribute="bottom" id="vPt-jN-959"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uMV-u5-Kuc">
<rect key="frame" x="172" y="120" width="70" height="70"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="blj-YT-unI">
<rect key="frame" x="0.0" y="0.0" width="70" height="70"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18,00€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rPe-HK-KW1">
<rect key="frame" x="5" y="42" width="60" height="11"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="blj-YT-unI" secondAttribute="trailing" id="41q-cf-a33"/>
<constraint firstItem="blj-YT-unI" firstAttribute="top" secondItem="uMV-u5-Kuc" secondAttribute="top" id="7Id-Ox-qgw"/>
<constraint firstItem="blj-YT-unI" firstAttribute="leading" secondItem="uMV-u5-Kuc" secondAttribute="leading" id="9Ei-aA-zUo"/>
<constraint firstItem="rPe-HK-KW1" firstAttribute="leading" secondItem="uMV-u5-Kuc" secondAttribute="leading" constant="5" id="Aj8-oq-lTv"/>
<constraint firstAttribute="width" constant="70" id="Lhe-fk-LQU"/>
<constraint firstAttribute="height" constant="70" id="LuA-rS-FA3"/>
<constraint firstAttribute="trailing" secondItem="rPe-HK-KW1" secondAttribute="trailing" constant="5" id="OBF-Vc-oId"/>
<constraint firstAttribute="bottom" secondItem="blj-YT-unI" secondAttribute="bottom" id="WYk-n4-FFe"/>
<constraint firstAttribute="bottom" secondItem="rPe-HK-KW1" secondAttribute="bottom" constant="17" id="aAY-67-9dR"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vdx-1P-8yF">
<rect key="frame" x="277" y="100" width="70" height="70"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="EZL-9s-XvQ">
<rect key="frame" x="0.0" y="0.0" width="70" height="70"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18,00€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rid-Wp-gA9">
<rect key="frame" x="5" y="42" width="60" height="11"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="rid-Wp-gA9" firstAttribute="leading" secondItem="Vdx-1P-8yF" secondAttribute="leading" constant="5" id="0aV-dG-eJ4"/>
<constraint firstAttribute="bottom" secondItem="EZL-9s-XvQ" secondAttribute="bottom" id="DBY-s5-gNv"/>
<constraint firstItem="EZL-9s-XvQ" firstAttribute="top" secondItem="Vdx-1P-8yF" secondAttribute="top" id="K6c-Ji-gyq"/>
<constraint firstItem="EZL-9s-XvQ" firstAttribute="leading" secondItem="Vdx-1P-8yF" secondAttribute="leading" id="RTL-zn-Bpq"/>
<constraint firstAttribute="height" constant="70" id="hAL-8W-9lL"/>
<constraint firstAttribute="width" constant="70" id="kFw-kF-QtC"/>
<constraint firstAttribute="trailing" secondItem="EZL-9s-XvQ" secondAttribute="trailing" id="l1o-Jt-p9V"/>
<constraint firstAttribute="trailing" secondItem="rid-Wp-gA9" secondAttribute="trailing" constant="5" id="ovv-y8-zM4"/>
<constraint firstAttribute="bottom" secondItem="rid-Wp-gA9" secondAttribute="bottom" constant="17" id="sQ2-pQ-fnx"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="l1J-rC-9tp" firstAttribute="top" secondItem="DVa-Te-Sw4" secondAttribute="top" id="Duu-N2-WSP"/>
<constraint firstItem="uMV-u5-Kuc" firstAttribute="top" secondItem="DVa-Te-Sw4" secondAttribute="top" constant="120" id="IbA-8Z-EBl"/>
<constraint firstItem="l1J-rC-9tp" firstAttribute="centerX" secondItem="DVa-Te-Sw4" secondAttribute="centerX" id="Oau-ge-CUt"/>
<constraint firstAttribute="bottom" secondItem="uMV-u5-Kuc" secondAttribute="bottom" id="e4c-7e-erN"/>
<constraint firstItem="Vdx-1P-8yF" firstAttribute="top" secondItem="DVa-Te-Sw4" secondAttribute="top" constant="100" id="m3s-O8-NYI"/>
<constraint firstItem="uMV-u5-Kuc" firstAttribute="centerX" secondItem="DVa-Te-Sw4" secondAttribute="centerX" id="ryj-xi-tqf"/>
<constraint firstItem="Vdx-1P-8yF" firstAttribute="centerX" secondItem="DVa-Te-Sw4" secondAttribute="centerX" constant="105" id="wSZ-9h-Oof"/>
<constraint firstItem="K14-Le-bD6" firstAttribute="centerX" secondItem="DVa-Te-Sw4" secondAttribute="centerX" constant="-105" id="x9n-mu-aJG"/>
<constraint firstItem="K14-Le-bD6" firstAttribute="top" secondItem="DVa-Te-Sw4" secondAttribute="top" constant="100" id="xPN-W3-Kk2"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="DVa-Te-Sw4" firstAttribute="top" secondItem="BXF-rK-wmD" secondAttribute="bottom" constant="14" id="4bE-Oq-G9i"/>
<constraint firstItem="DVa-Te-Sw4" firstAttribute="leading" secondItem="Ukv-zL-7sQ" secondAttribute="leading" id="Bg0-Dg-aNk"/>
<constraint firstAttribute="trailing" secondItem="BXF-rK-wmD" secondAttribute="trailing" constant="20" id="CmR-H7-XJc"/>
<constraint firstAttribute="trailing" secondItem="DVa-Te-Sw4" secondAttribute="trailing" id="DVL-xb-SoS"/>
<constraint firstItem="BXF-rK-wmD" firstAttribute="leading" secondItem="Ukv-zL-7sQ" secondAttribute="leading" constant="20" id="If1-7K-I0v"/>
<constraint firstAttribute="bottom" secondItem="DVa-Te-Sw4" secondAttribute="bottom" id="Pkq-41-lNE"/>
<constraint firstItem="BXF-rK-wmD" firstAttribute="top" secondItem="Ukv-zL-7sQ" secondAttribute="top" constant="30" id="zGx-VM-5zU"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hdz-dS-6jm">
<rect key="frame" x="45" y="211" width="359" height="75"/>
<rect key="frame" x="45" y="205" width="359" height="75"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EpZ-Qo-xby">
<rect key="frame" x="-35" y="2.5" width="70" height="70"/>
......@@ -822,7 +965,7 @@
<rect key="frame" x="0.0" y="0.0" width="70" height="70"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18,00€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AIw-YV-t1D">
<rect key="frame" x="5" y="40" width="60" height="13"/>
<rect key="frame" x="5" y="42" width="60" height="11"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -842,7 +985,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Μέχρι τώρα έχεις κερδίσει 18,00€ με το DEALS for YOU!" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h7B-UX-3wG">
<rect key="frame" x="45" y="17.5" width="304" height="40"/>
<rect key="frame" x="45" y="20.5" width="304" height="34"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
......@@ -874,7 +1017,7 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fef-hi-2VL">
<rect key="frame" x="45" y="316" width="359" height="75"/>
<rect key="frame" x="45" y="310" width="359" height="75"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LLM-FB-EYF">
<rect key="frame" x="-35" y="2.5" width="70" height="70"/>
......@@ -883,7 +1026,7 @@
<rect key="frame" x="0.0" y="0.0" width="70" height="70"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="20,00€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cbA-fm-1uO">
<rect key="frame" x="5" y="40" width="60" height="13"/>
<rect key="frame" x="5" y="42" width="60" height="11"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -903,7 +1046,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Μέχρι τώρα έχεις κερδίσει 20,00€ σε προσφορές από 3 κουπόνια!" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WdW-lP-g1v">
<rect key="frame" x="45" y="17.5" width="304" height="40"/>
<rect key="frame" x="45" y="20.5" width="304" height="34"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
......@@ -935,25 +1078,25 @@
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dfy_logo_white" translatesAutoresizingMaskIntoConstraints="NO" id="gdf-s4-2CF">
<rect key="frame" x="20" y="431" width="124" height="40"/>
<rect key="frame" x="20" y="425" width="124" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Ch9-8X-FNJ"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zFT-By-XHL">
<rect key="frame" x="10" y="481" width="394" height="100"/>
<rect key="frame" x="10" y="475" width="394" height="100"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="MCY-xv-vpg">
<rect key="frame" x="20" y="30" width="254" height="40.5"/>
<rect key="frame" x="20" y="32.5" width="254" height="35"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ενεργός κωδικός:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ucC-u4-AQL">
<rect key="frame" x="0.0" y="0.0" width="254" height="22.5"/>
<rect key="frame" x="0.0" y="0.0" width="254" height="19"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="19"/>
<color key="textColor" red="0.23529411759999999" green="0.32549019610000002" blue="0.39607843139999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vUM-ac-164">
<rect key="frame" x="0.0" y="24.5" width="254" height="0.0"/>
<rect key="frame" x="0.0" y="21" width="254" height="0.0"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cjr-c8-pL3">
<rect key="frame" x="0.0" y="0.0" width="254" height="0.0"/>
......@@ -983,7 +1126,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Λήγει σε 4 ημέρες" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qL0-3b-eqA">
<rect key="frame" x="0.0" y="26.5" width="254" height="14"/>
<rect key="frame" x="0.0" y="23" width="254" height="12"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -1033,13 +1176,13 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Τα δώρα μου" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FiI-Ni-wy4">
<rect key="frame" x="20" y="621" width="374" height="32"/>
<rect key="frame" x="20" y="615" width="374" height="38"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="21"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8YP-uG-vbV">
<rect key="frame" x="20" y="211" width="374" height="452"/>
<rect key="frame" x="20" y="205" width="374" height="458"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="aYf-dv-3Ik">
<rect key="frame" x="149.5" y="0.0" width="75" height="75"/>
......@@ -1050,7 +1193,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SIP-ou-T3X">
<rect key="frame" x="0.0" y="95" width="374" height="19"/>
<rect key="frame" x="0.0" y="95" width="374" height="16"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -1072,16 +1215,19 @@
<constraint firstItem="gdf-s4-2CF" firstAttribute="top" secondItem="Fef-hi-2VL" secondAttribute="bottom" constant="40" id="4FL-Zz-Okv"/>
<constraint firstAttribute="trailing" secondItem="Et1-y7-npI" secondAttribute="trailing" id="8Kk-H7-8m7"/>
<constraint firstAttribute="trailing" secondItem="FiI-Ni-wy4" secondAttribute="trailing" constant="20" id="AF7-ZD-Nbs"/>
<constraint firstItem="Ukv-zL-7sQ" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" id="Cqf-Yg-tJt"/>
<constraint firstItem="Et1-y7-npI" firstAttribute="top" secondItem="ICd-s2-mfF" secondAttribute="top" id="DhC-8v-kGA"/>
<constraint firstAttribute="bottom" secondItem="FiI-Ni-wy4" secondAttribute="bottom" constant="10" id="Gep-UO-kv9"/>
<constraint firstItem="hdz-dS-6jm" firstAttribute="top" secondItem="Et1-y7-npI" secondAttribute="bottom" constant="30" id="LZL-Mq-YUU"/>
<constraint firstAttribute="trailing" secondItem="hdz-dS-6jm" secondAttribute="trailing" constant="10" id="LbO-mb-5Ny"/>
<constraint firstItem="Fef-hi-2VL" firstAttribute="top" secondItem="hdz-dS-6jm" secondAttribute="bottom" constant="30" id="Mwt-JX-Ol8"/>
<constraint firstAttribute="trailing" secondItem="zFT-By-XHL" secondAttribute="trailing" constant="10" id="OaG-uT-OAu"/>
<constraint firstAttribute="bottom" secondItem="Ukv-zL-7sQ" secondAttribute="bottom" id="P44-lY-Fhh"/>
<constraint firstItem="gdf-s4-2CF" firstAttribute="width" secondItem="ICd-s2-mfF" secondAttribute="width" multiplier="0.3" id="PI5-f4-hi8"/>
<constraint firstItem="FiI-Ni-wy4" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" constant="20" id="Q3m-bV-ZdT"/>
<constraint firstItem="gdf-s4-2CF" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" constant="20" id="SWS-EH-zD8"/>
<constraint firstItem="zFT-By-XHL" firstAttribute="top" secondItem="gdf-s4-2CF" secondAttribute="bottom" constant="10" id="Tl8-j4-Nzm"/>
<constraint firstAttribute="trailing" secondItem="Ukv-zL-7sQ" secondAttribute="trailing" id="fG7-vu-AzL"/>
<constraint firstAttribute="trailing" secondItem="Fef-hi-2VL" secondAttribute="trailing" constant="10" id="ntW-7w-mFL"/>
<constraint firstItem="hdz-dS-6jm" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" constant="45" id="oyd-vQ-oDU"/>
<constraint firstAttribute="bottom" secondItem="8YP-uG-vbV" secondAttribute="bottom" id="rKn-W6-URd"/>
......@@ -1090,51 +1236,61 @@
<constraint firstItem="8YP-uG-vbV" firstAttribute="top" secondItem="Et1-y7-npI" secondAttribute="bottom" constant="30" id="uUj-6O-DHs"/>
<constraint firstItem="zFT-By-XHL" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" constant="10" id="vNb-RY-jSD"/>
<constraint firstItem="Et1-y7-npI" firstAttribute="leading" secondItem="ICd-s2-mfF" secondAttribute="leading" id="vqD-P5-7Vf"/>
<constraint firstItem="Ukv-zL-7sQ" firstAttribute="top" secondItem="Et1-y7-npI" secondAttribute="bottom" id="xRE-8k-dzY"/>
<constraint firstItem="FiI-Ni-wy4" firstAttribute="top" secondItem="zFT-By-XHL" secondAttribute="bottom" constant="40" id="zZq-Yx-q9D"/>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="hdz-dS-6jm"/>
<exclude reference="Fef-hi-2VL"/>
<exclude reference="gdf-s4-2CF"/>
<exclude reference="zFT-By-XHL"/>
<exclude reference="FiI-Ni-wy4"/>
</mask>
</variation>
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CouponsTableViewCellId" id="PUP-z1-zvb" customClass="CouponsTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target">
<rect key="frame" x="0.0" y="707.5" width="414" height="116.5"/>
<rect key="frame" x="0.0" y="718.5" width="414" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="PUP-z1-zvb" id="dt2-2B-okP">
<rect key="frame" x="0.0" y="0.0" width="414" height="116.5"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="105"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FsY-Dp-PUQ">
<rect key="frame" x="10" y="0.0" width="394" height="116.5"/>
<rect key="frame" x="10" y="0.0" width="394" height="105"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="vZ4-HF-lwK">
<rect key="frame" x="0.0" y="0.0" width="394" height="116.5"/>
<rect key="frame" x="0.0" y="0.0" width="394" height="105"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f2f-Lm-to3">
<rect key="frame" x="20" y="10" width="79" height="96.5"/>
<rect key="frame" x="20" y="10" width="79" height="85"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zth-sP-rUI">
<rect key="frame" x="104" y="5" width="10" height="106.5"/>
<rect key="frame" x="104" y="5" width="10" height="95"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="0jX-bF-I3k"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BAb-kn-pw0">
<rect key="frame" x="119" y="15" width="255" height="20"/>
<rect key="frame" x="119" y="15" width="255" height="17"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="RJe-Li-bx3">
<rect key="frame" x="119" y="40" width="255" height="36.5"/>
<rect key="frame" x="119" y="37" width="255" height="31"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wBw-w0-bGt">
<rect key="frame" x="0.0" y="0.0" width="127.5" height="36.5"/>
<rect key="frame" x="0.0" y="0.0" width="127.5" height="31"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="31"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yd2-ue-tBk">
<rect key="frame" x="132.5" y="0.0" width="122.5" height="36.5"/>
<rect key="frame" x="132.5" y="0.0" width="122.5" height="31"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -1146,7 +1302,7 @@
</constraints>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EEj-3C-9Td">
<rect key="frame" x="119" y="87.5" width="255" height="14"/>
<rect key="frame" x="119" y="78" width="255" height="12"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -1198,6 +1354,229 @@
<outlet property="nameLabel" destination="BAb-kn-pw0" id="acE-VM-nYj"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="ActiveCodeTableViewCellId" id="GBJ-mP-Cnk" customClass="ActiveCodeTableViewCell" customModule="SwiftWarplyFramework">
<rect key="frame" x="0.0" y="823.5" width="414" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="GBJ-mP-Cnk" id="jwr-DB-aSm">
<rect key="frame" x="0.0" y="0.0" width="414" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yTa-e1-XtK">
<rect key="frame" x="0.0" y="0.0" width="414" height="100"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aHX-KG-QCX">
<rect key="frame" x="10" y="0.0" width="394" height="100"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="Pso-iJ-S9p">
<rect key="frame" x="20" y="32.5" width="254" height="35"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ενεργός κωδικός:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T8m-z1-J6k">
<rect key="frame" x="0.0" y="0.0" width="254" height="19"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="19"/>
<color key="textColor" red="0.23529411759999999" green="0.32549019610000002" blue="0.39607843139999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jfx-z1-VHT">
<rect key="frame" x="0.0" y="21" width="254" height="0.0"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TPp-HH-CgA">
<rect key="frame" x="0.0" y="0.0" width="254" height="0.0"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" id="pHj-dg-vSZ"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" id="37z-VP-xmi"/>
<constraint firstItem="TPp-HH-CgA" firstAttribute="leading" secondItem="sLd-Vq-RX3" secondAttribute="leading" id="4cn-ud-VhL"/>
<constraint firstItem="TPp-HH-CgA" firstAttribute="width" secondItem="51C-Wz-DfB" secondAttribute="width" id="RJH-pb-1JY"/>
<constraint firstItem="TPp-HH-CgA" firstAttribute="top" secondItem="sLd-Vq-RX3" secondAttribute="top" id="dgm-y9-FrZ"/>
<constraint firstItem="TPp-HH-CgA" firstAttribute="trailing" secondItem="sLd-Vq-RX3" secondAttribute="trailing" id="eBa-WR-owq"/>
<constraint firstItem="TPp-HH-CgA" firstAttribute="bottom" secondItem="sLd-Vq-RX3" secondAttribute="bottom" id="qtB-mT-W4k"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="sLd-Vq-RX3"/>
<viewLayoutGuide key="frameLayoutGuide" id="51C-Wz-DfB"/>
</scrollView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="961544809" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="409-L6-c5P">
<rect key="frame" x="0.0" y="21" width="254" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="19"/>
<color key="textColor" red="0.23529411759999999" green="0.32549019610000002" blue="0.39607843139999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Λήγει σε 4 ημέρες" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zz2-r5-rnf">
<rect key="frame" x="0.0" y="23" width="254" height="12"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="jfx-z1-VHT" firstAttribute="leading" secondItem="Pso-iJ-S9p" secondAttribute="leading" id="0OM-NX-Yft"/>
<constraint firstAttribute="trailing" secondItem="jfx-z1-VHT" secondAttribute="trailing" id="qTf-cY-cGJ"/>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="409-L6-c5P"/>
</mask>
</variation>
</stackView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="active_code_logo" translatesAutoresizingMaskIntoConstraints="NO" id="8fb-EL-FRf">
<rect key="frame" x="294" y="10" width="80" height="80"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="FWl-Nd-PsS"/>
<constraint firstAttribute="width" constant="80" id="Rnf-Eg-rmu"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Pso-iJ-S9p" firstAttribute="centerY" secondItem="aHX-KG-QCX" secondAttribute="centerY" id="0b8-Hp-nEm"/>
<constraint firstItem="8fb-EL-FRf" firstAttribute="leading" secondItem="Pso-iJ-S9p" secondAttribute="trailing" constant="20" id="M7X-C2-jr9"/>
<constraint firstItem="Pso-iJ-S9p" firstAttribute="leading" secondItem="aHX-KG-QCX" secondAttribute="leading" constant="20" id="csQ-Nq-CKN"/>
<constraint firstAttribute="height" constant="100" id="fwE-Ww-5KS"/>
<constraint firstItem="8fb-EL-FRf" firstAttribute="centerY" secondItem="aHX-KG-QCX" secondAttribute="centerY" id="mxA-Gg-2Kf"/>
<constraint firstAttribute="trailing" secondItem="8fb-EL-FRf" secondAttribute="trailing" constant="20" id="s5W-1R-OCt"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="aHX-KG-QCX" firstAttribute="leading" secondItem="yTa-e1-XtK" secondAttribute="leading" constant="10" id="1Lx-zf-J4S"/>
<constraint firstAttribute="bottom" secondItem="aHX-KG-QCX" secondAttribute="bottom" id="1qB-PP-A5O"/>
<constraint firstItem="aHX-KG-QCX" firstAttribute="top" secondItem="yTa-e1-XtK" secondAttribute="top" id="7bp-bo-m0J"/>
<constraint firstAttribute="trailing" secondItem="aHX-KG-QCX" secondAttribute="trailing" constant="10" id="g8i-A6-wo2"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="yTa-e1-XtK" firstAttribute="top" secondItem="jwr-DB-aSm" secondAttribute="top" id="Msw-QS-POP"/>
<constraint firstAttribute="bottom" secondItem="yTa-e1-XtK" secondAttribute="bottom" id="SYc-0P-hp6"/>
<constraint firstAttribute="trailing" secondItem="yTa-e1-XtK" secondAttribute="trailing" id="Z4P-b6-tFE"/>
<constraint firstItem="yTa-e1-XtK" firstAttribute="leading" secondItem="jwr-DB-aSm" secondAttribute="leading" id="rvR-o4-jGB"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="activeCodeContentView" destination="TPp-HH-CgA" id="06j-w3-5sQ"/>
<outlet property="activeCodeContentViewHeight" destination="pHj-dg-vSZ" id="FSM-Yp-Ybh"/>
<outlet property="activeCodeExpirationLabel" destination="zz2-r5-rnf" id="hpc-Fh-Ic4"/>
<outlet property="activeCodeImage" destination="8fb-EL-FRf" id="Er2-U4-vgM"/>
<outlet property="activeCodeLabel" destination="409-L6-c5P" id="fiD-LO-RxV"/>
<outlet property="activeCodeScrollView" destination="jfx-z1-VHT" id="2fq-2w-H9F"/>
<outlet property="activeCodeScrollViewHeight" destination="37z-VP-xmi" id="nlO-XQ-AIF"/>
<outlet property="activeCodeView" destination="aHX-KG-QCX" id="Z84-6v-Yrk"/>
<outlet property="activeCodeViewHeight" destination="fwE-Ww-5KS" id="uy8-JG-tQQ"/>
<outlet property="activeCodesCountLabel" destination="T8m-z1-J6k" id="3xS-l2-J6C"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponsTableViewCellId" id="DUH-nG-QWi" customClass="UnifiedCouponsTableViewCell" customModule="SwiftWarplyFramework">
<rect key="frame" x="0.0" y="923.5" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DUH-nG-QWi" id="rx6-wA-MYI">
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WW2-mP-ZJD">
<rect key="frame" x="10" y="0.0" width="394" height="44"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Gde-3J-Ew9">
<rect key="frame" x="0.0" y="0.0" width="394" height="44"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XsA-Nw-7Pr">
<rect key="frame" x="20" y="10" width="79" height="24"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u97-5H-Y40">
<rect key="frame" x="104" y="5" width="10" height="34"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="Tcx-FG-KC0"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Ng-4X-yjm">
<rect key="frame" x="119" y="15" width="255" height="0.0"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="fjU-NZ-UM8">
<rect key="frame" x="119" y="20" width="255" height="4"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lhE-IF-PdV">
<rect key="frame" x="0.0" y="0.0" width="127.5" height="4"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="31"/>
<color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KJD-Db-B4t">
<rect key="frame" x="132.5" y="0.0" width="122.5" height="4"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="lhE-IF-PdV" firstAttribute="width" secondItem="fjU-NZ-UM8" secondAttribute="width" multiplier="0.5" id="jV0-Rz-MOC"/>
</constraints>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C5t-xz-oAO">
<rect key="frame" x="119" y="29" width="255" height="0.0"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
<color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="u97-5H-Y40" secondAttribute="bottom" constant="5" id="1Lc-bv-1Al"/>
<constraint firstAttribute="trailing" secondItem="7Ng-4X-yjm" secondAttribute="trailing" constant="20" id="1nu-j0-QIj"/>
<constraint firstItem="Gde-3J-Ew9" firstAttribute="leading" secondItem="WW2-mP-ZJD" secondAttribute="leading" id="40f-ex-Phx"/>
<constraint firstItem="7Ng-4X-yjm" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="5TF-wG-jX1"/>
<constraint firstItem="u97-5H-Y40" firstAttribute="leading" secondItem="XsA-Nw-7Pr" secondAttribute="trailing" constant="5" id="7Rb-8X-yJH"/>
<constraint firstItem="XsA-Nw-7Pr" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="10" id="AK2-0i-4cx"/>
<constraint firstAttribute="trailing" secondItem="Gde-3J-Ew9" secondAttribute="trailing" id="Aal-fh-wUH"/>
<constraint firstItem="fjU-NZ-UM8" firstAttribute="centerY" secondItem="WW2-mP-ZJD" secondAttribute="centerY" id="BOY-1A-D30"/>
<constraint firstItem="7Ng-4X-yjm" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="15" id="EFT-xp-xck"/>
<constraint firstItem="fjU-NZ-UM8" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="Kr7-AR-EG1"/>
<constraint firstItem="u97-5H-Y40" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="5" id="MwF-kc-vsh"/>
<constraint firstItem="XsA-Nw-7Pr" firstAttribute="leading" secondItem="WW2-mP-ZJD" secondAttribute="leading" constant="20" id="NkB-Cx-sN0"/>
<constraint firstItem="fjU-NZ-UM8" firstAttribute="top" relation="greaterThanOrEqual" secondItem="7Ng-4X-yjm" secondAttribute="bottom" constant="5" id="Q7K-FB-afo"/>
<constraint firstItem="C5t-xz-oAO" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="Qud-Nb-9mK"/>
<constraint firstAttribute="bottom" secondItem="XsA-Nw-7Pr" secondAttribute="bottom" constant="10" id="X79-5z-CBB"/>
<constraint firstItem="XsA-Nw-7Pr" firstAttribute="width" secondItem="WW2-mP-ZJD" secondAttribute="width" multiplier="0.2" id="axw-92-9U9"/>
<constraint firstItem="Gde-3J-Ew9" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" id="kMk-q4-Ig9"/>
<constraint firstAttribute="bottom" secondItem="Gde-3J-Ew9" secondAttribute="bottom" id="kVb-zO-dgp"/>
<constraint firstAttribute="trailing" secondItem="fjU-NZ-UM8" secondAttribute="trailing" constant="20" id="paQ-99-YFA"/>
<constraint firstAttribute="trailing" secondItem="C5t-xz-oAO" secondAttribute="trailing" constant="20" id="sjh-Xe-FAi"/>
<constraint firstAttribute="bottom" secondItem="C5t-xz-oAO" secondAttribute="bottom" constant="15" id="ujL-p5-XBS"/>
<constraint firstItem="C5t-xz-oAO" firstAttribute="top" relation="greaterThanOrEqual" secondItem="fjU-NZ-UM8" secondAttribute="bottom" constant="5" id="yPM-CY-avN"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="WW2-mP-ZJD" firstAttribute="top" secondItem="rx6-wA-MYI" secondAttribute="top" id="eGP-X8-0nF"/>
<constraint firstItem="WW2-mP-ZJD" firstAttribute="leading" secondItem="rx6-wA-MYI" secondAttribute="leading" constant="10" id="gKM-JB-A7K"/>
<constraint firstAttribute="trailing" secondItem="WW2-mP-ZJD" secondAttribute="trailing" constant="10" id="kcs-tU-SOZ"/>
<constraint firstAttribute="bottom" secondItem="WW2-mP-ZJD" secondAttribute="bottom" id="zWw-ct-PvB"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="borderView" destination="u97-5H-Y40" id="unw-S4-1cW"/>
<outlet property="couponBgImage" destination="Gde-3J-Ew9" id="zAU-dC-iJ3"/>
<outlet property="couponImage" destination="XsA-Nw-7Pr" id="sPO-ba-7pB"/>
<outlet property="dicountLabel" destination="lhE-IF-PdV" id="w8c-Rx-0yP"/>
<outlet property="discriptionLabel" destination="KJD-Db-B4t" id="Iac-05-eFb"/>
<outlet property="expirationLabel" destination="C5t-xz-oAO" id="PvS-Fj-fua"/>
<outlet property="nameLabel" destination="7Ng-4X-yjm" id="FfZ-6W-xyF"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="pKQ-52-a1r" id="AvY-tV-KMr"/>
......@@ -1234,12 +1613,16 @@
<outlet property="activeCodeView" destination="zFT-By-XHL" id="M0w-Ln-iC9"/>
<outlet property="activeCodeViewHeight" destination="7r0-fu-7H9" id="nDr-bk-ViP"/>
<outlet property="activeCodesCountLabel" destination="ucC-u4-AQL" id="BCn-Ul-WqA"/>
<outlet property="couponBadgeImage" destination="blj-YT-unI" id="sGC-WI-xWY"/>
<outlet property="couponBadgeLabel" destination="rPe-HK-KW1" id="4jp-qN-RsA"/>
<outlet property="couponEarnAmountLabel" destination="cbA-fm-1uO" id="o0w-tT-Etg"/>
<outlet property="couponEarnImage" destination="Vfg-nm-Igo" id="iLu-eS-mW3"/>
<outlet property="couponEarnLabel" destination="WdW-lP-g1v" id="GeT-9O-3ZD"/>
<outlet property="couponEarnView" destination="Fef-hi-2VL" id="XXW-N6-ouW"/>
<outlet property="couponEarnViewHeight" destination="9eX-HX-DsV" id="Vqq-R7-jLb"/>
<outlet property="couponEarnViewTopSpace" destination="Mwt-JX-Ol8" id="qSk-fY-Gbs"/>
<outlet property="dfyBadgeImage" destination="cYY-uD-dwf" id="KzX-1h-NhX"/>
<outlet property="dfyBadgeLabel" destination="uDb-BJ-aht" id="YR2-p1-YeG"/>
<outlet property="dfyEarnAmountLabel" destination="AIw-YV-t1D" id="O7F-LB-2Kp"/>
<outlet property="dfyEarnBannerHeight" destination="9d9-gP-1Kb" id="lrl-g8-BVS"/>
<outlet property="dfyEarnBannerTopSpace" destination="LZL-Mq-YUU" id="NbJ-wr-VTC"/>
......@@ -1253,10 +1636,16 @@
<outlet property="emptyLabel" destination="SIP-ou-T3X" id="ZRk-Xu-Bah"/>
<outlet property="emptyView" destination="8YP-uG-vbV" id="SLO-UB-1ef"/>
<outlet property="headerImage" destination="wP5-YG-vSP" id="MFN-m3-6ou"/>
<outlet property="marketBadgeImage" destination="EZL-9s-XvQ" id="2Ix-Cl-vz1"/>
<outlet property="marketBadgeLabel" destination="rid-Wp-gA9" id="1HK-Mw-for"/>
<outlet property="myPresentsLabel" destination="FiI-Ni-wy4" id="ZNw-OM-zsA"/>
<outlet property="profileImage" destination="wJv-NF-rMf" id="Ues-Ru-2p2"/>
<outlet property="profileNameLabel" destination="1XZ-NB-F8P" id="C5F-WA-kOW"/>
<outlet property="questionnaireButton" destination="UNL-Oh-sPV" id="EPs-OW-Oai"/>
<outlet property="rewardsLabel" destination="BXF-rK-wmD" id="OXr-Xm-cgX"/>
<outlet property="rewardsView" destination="Ukv-zL-7sQ" id="GgM-WZ-8Wm"/>
<outlet property="sumBadgeImage" destination="J7v-XB-iCp" id="TW3-lb-CJu"/>
<outlet property="sumBadgeLabel" destination="E1I-Ms-Wub" id="bQy-8X-MhK"/>
<outlet property="tableView" destination="jYz-96-Lp1" id="VZ8-9Y-cax"/>
</connections>
</viewController>
......
......@@ -5,19 +5,91 @@
// Created by Manos Chorianopoulos on 3/4/23.
//
import Foundation
import UIKit
class UnifiedCouponsTableViewCell: UITableViewCell {
@IBOutlet weak var couponBgImage: UIImageView!
@IBOutlet weak var couponImage: UIImageView!
@IBOutlet weak var borderView: UIView!
@IBOutlet weak var nameLabel: UILabel!
@IBOutlet weak var dicountLabel: UILabel!
@IBOutlet weak var discriptionLabel: UILabel!
@IBOutlet weak var expirationLabel: UILabel!
var postImageURL: String? {
didSet {
if let url = postImageURL {
self.couponImage.image = UIImage() // UIImage(named: "loading")
override func awakeFromNib() {
UIImage.loadImageUsingCacheWithUrlString(url) { image in
// set the image only when we are still displaying the content for the image we finished downloading
if url == self.postImageURL {
self.couponImage.image = image
}
}
}
else {
self.couponImage.image = nil
}
}
}
public override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
couponBgImage.image = UIImage(named: "coupon_bg", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
borderView.addDashedBorderVertical(color: UIColor(red: 0.44, green: 0.44, blue: 0.44, alpha: 1.00), width: 1.0, height: 110.0)
}
override func setSelected(_ selected: Bool, animated: Bool) {
public override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
public override func layoutSubviews() {
super.layoutSubviews()
//set the values for top,left,bottom,right margins
let margins = UIEdgeInsets(top: 0, left: 0, bottom: 8, right: 0)
contentView.frame = contentView.frame.inset(by: margins)
}
func configureCell(coupon: swiftApi.CouponItemModel) {
// COUPONSET: desc, img_preview, name, terms, merchant_uuid, discount_type, final_price
// COUPON: coupon, expiration, discount, status
// MERCHANT: _img_preview,_admin_name
let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList()
let couponSetData: swiftApi.CouponSetItemModel? = coupon.couponset_data
nameLabel.text = ""
for merchant in merchantList {
if (merchant._uuid == couponSetData?.merchant_uuid) {
// couponImage.load(link: merchant._img_preview, placeholder: UIImage(), cache: URLCache())
self.postImageURL = merchant._img_preview
nameLabel.text = merchant._admin_name
break;
}
}
// couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
// nameLabel.text = couponSetData?.name ?? ""
let discount = couponSetData?.discount_type == "value" ? ((coupon.discount ?? "") + "€")
: couponSetData?.discount_type == "percentage" ? ((coupon.discount ?? "") + "%")
: couponSetData?.discount_type == "plus_one" ? "1+1"
: ((coupon.discount ?? "") + "€")
dicountLabel.text = discount
// let htmlText = couponSetData?.inner_text ?? ""
// discriptionLabel.text = htmlText.htmlToString
discriptionLabel.text = couponSetData?.inner_text ?? ""
expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "")
}
}
......
......@@ -44,11 +44,23 @@ import SwiftEventBus
@IBOutlet weak var activeCodeScrollViewHeight: NSLayoutConstraint!
@IBOutlet weak var activeCodeContentView: UIView!
@IBOutlet weak var activeCodeContentViewHeight: NSLayoutConstraint!
@IBOutlet weak var rewardsView: UIView!
@IBOutlet weak var rewardsLabel: UILabel!
@IBOutlet weak var sumBadgeImage: UIImageView!
@IBOutlet weak var sumBadgeLabel: UILabel!
@IBOutlet weak var dfyBadgeImage: UIImageView!
@IBOutlet weak var dfyBadgeLabel: UILabel!
@IBOutlet weak var couponBadgeImage: UIImageView!
@IBOutlet weak var couponBadgeLabel: UILabel!
@IBOutlet weak var marketBadgeImage: UIImageView!
@IBOutlet weak var marketBadgeLabel: UILabel!
public var coupons:Array<swiftApi.CouponItemModel> = swiftApi().getCouponList()
public var dfyCoupons:Array<swiftApi.ActiveDFYCouponModel> = swiftApi().getActiveDFYCoupons()
public var loyaltyBadge:swiftApi.LoyaltyBadgeModel = swiftApi().getLoyaltyBadge()
public var profile:swiftApi.ProfileModel? = swiftApi().getConsumer()
// TODO: Add correct unifiedCoupons
public var unifiedCoupons:Array<swiftApi.CouponItemModel> = swiftApi().getCouponList()
var timerWallet: DispatchSourceTimer?
var seconds: Int = 0
......@@ -57,6 +69,30 @@ import SwiftEventBus
super.viewDidLoad()
self.hidesBottomBarWhenPushed = true
// TODO: DELETE ===>
// let coupon = swiftApi.ActiveDFYCouponModel()
// coupon._value = "12"
// // coupon._date = "2022-12-05 01:55:01"
// coupon._date = "2022-10-26 23:59:01"
// coupon._code = "123456789"
// let coupon2 = swiftApi.ActiveDFYCouponModel()
// coupon2._value = "23"
// coupon2._date = "2022-11-05 01:55"
// coupon2._code = "234567891"
// let coupon3 = swiftApi.ActiveDFYCouponModel()
// coupon3._value = "34"
// coupon3._date = "2022-07-01 01:55"
// coupon3._code = "345678912"
// let couponsArray: Array<swiftApi.ActiveDFYCouponModel> = [coupon, coupon2, coupon3, coupon3, coupon3]
// swiftApi().setActiveDFYCoupons(dfyCoupons: couponsArray)
// dfyCoupons = swiftApi().getActiveDFYCoupons()
// TODO: DELETE <===
setBackButton()
setNavigationTitle("My Rewards")
......@@ -341,7 +377,9 @@ import SwiftEventBus
emptyImage.image = UIImage(named: "ic_empty_wallet", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!"
if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) {
// TODO: FIX emptyView check
// if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) {
if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0 && unifiedCoupons.count == 0) {
emptyView.isHidden = false
} else {
emptyView.isHidden = true
......@@ -523,37 +561,172 @@ import SwiftEventBus
extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
public func numberOfSections(in tableView: UITableView) -> Int {
return 1
return 3
}
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if (section == 0) {
// TODO: Dynamic
return 3
// return self.unifiedCoupons.count
} else if (section == 1) {
return 1
}
return self.coupons.count
}
public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 120.0 + 8.0
// return UITableViewAutomaticDimension
if (indexPath.section == 0) {
if (self.unifiedCoupons.count > 0) {
return 120.0 + 8.0
} else {
return 0.0
}
} else if (indexPath.section == 1) {
// TODO: Uncomment
if (self.dfyCoupons.count > 0) {
return UITableView.automaticDimension
} else {
return 0.0
}
} else {
if (self.coupons.count > 0) {
return 120.0 + 8.0
} else {
return 0.0
}
}
}
public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if (section == 0) {
let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 75))
view.backgroundColor = .clear
let titleLabel = UILabel(frame: CGRect(x: 20, y: 40, width: view.frame.width - 40, height: 21))
titleLabel.font = UIFont(name: "PFSquareSansPro-Medium", size: 21)
titleLabel.textColor = UIColor(rgb: 0xFFFFFF)
titleLabel.text = "COSMOTE SuperMarket Deals"
view.addSubview(titleLabel)
return view
} else if (section == 1) {
let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 68))
view.backgroundColor = .clear
let imageView = UIImageView(frame: CGRect(x: 20, y: 20, width: view.frame.width / 3.5, height: 38))
imageView.contentMode = .scaleAspectFit
if let dfyHeaderImage = UIImage(named: "dfy_logo_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) {
imageView.image = dfyHeaderImage
}
view.addSubview(imageView)
return view
} else {
// let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 71))
let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 65))
view.backgroundColor = .clear
// let titleLabel = UILabel(frame: CGRect(x: 20, y: 40, width: view.frame.width - 40, height: 21))
let titleLabel = UILabel(frame: CGRect(x: 20, y: 30, width: view.frame.width - 40, height: 21))
titleLabel.font = UIFont(name: "PFSquareSansPro-Medium", size: 21)
titleLabel.textColor = UIColor(rgb: 0xFFFFFF)
titleLabel.text = "Τα δώρα μου"
view.addSubview(titleLabel)
return view
}
}
public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if (section == 0) {
if (self.unifiedCoupons.count > 0) {
return 75.0
} else {
return 0.0
}
} else if (section == 1) {
if (self.dfyCoupons.count > 0) {
return 68.0
} else {
return 0.0
}
} else {
if (self.coupons.count > 0) {
return 65.0
} else {
return 0.0
}
}
}
public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
// return CGFloat.leastNormalMagnitude
return 0.0
}
public func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return nil
}
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "CouponsTableViewCellId", for: indexPath) as! CouponsTableViewCell
cell.configureCell(coupon: coupons[indexPath.row])
return cell
if (indexPath.section == 0) {
let cell = tableView.dequeueReusableCell(withIdentifier: "UnifiedCouponsTableViewCellId", for: indexPath) as! UnifiedCouponsTableViewCell
cell.configureCell(coupon: coupons[indexPath.row])
return cell
} else if (indexPath.section == 1) {
let cell = tableView.dequeueReusableCell(withIdentifier: "ActiveCodeTableViewCellId", for: indexPath) as! ActiveCodeTableViewCell
// cell.configureCell(coupon: coupons[indexPath.row])
return cell
} else {
let cell = tableView.dequeueReusableCell(withIdentifier: "CouponsTableViewCellId", for: indexPath) as! CouponsTableViewCell
cell.configureCell(coupon: coupons[indexPath.row])
return cell
}
}
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data
let couponName = couponSetData?.name ?? ""
swiftApi().logTrackersEvent("click", ("Coupon:" + couponName))
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController
vc.coupon = coupons[indexPath.row]
vc.isFromWallet = true
self.navigationController?.pushViewController(vc, animated: true)
if (indexPath.section == 0) {
// TODO: open unified CouponBarcodeViewController
// let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data
// let couponName = couponSetData?.name ?? ""
// swiftApi().logTrackersEvent("click", ("Coupon:" + couponName))
//
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController
// vc.coupon = coupons[indexPath.row]
// vc.isFromWallet = true
// self.navigationController?.pushViewController(vc, animated: true)
} else if (indexPath.section == 1) {
print("Active DFY coupon banner Tapped!")
swiftApi().logTrackersEvent("click", ("LoyaltyWalletScreen:" + "ActiveDealsBanner"))
let couponDetails = swiftApi.ActiveDFYCouponEventModel()
couponDetails._isPressed = true
SwiftEventBus.post("dfy_coupon_details", sender: couponDetails)
} else {
let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data
let couponName = couponSetData?.name ?? ""
swiftApi().logTrackersEvent("click", ("Coupon:" + couponName))
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController
vc.coupon = coupons[indexPath.row]
vc.isFromWallet = true
self.navigationController?.pushViewController(vc, animated: true)
}
}
}
......