Manos Chorianopoulos

Wallet changes

...@@ -839,7 +839,7 @@ ...@@ -839,7 +839,7 @@
839 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="J7v-XB-iCp"> 839 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="J7v-XB-iCp">
840 <rect key="frame" x="0.0" y="0.0" width="90" height="90"/> 840 <rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
841 </imageView> 841 </imageView>
842 - <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"> 842 + <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="E1I-Ms-Wub">
843 <rect key="frame" x="5" y="54" width="80" height="14"/> 843 <rect key="frame" x="5" y="54" width="80" height="14"/>
844 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="14"/> 844 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="14"/>
845 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> 845 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
...@@ -865,7 +865,7 @@ ...@@ -865,7 +865,7 @@
865 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="cYY-uD-dwf"> 865 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="cYY-uD-dwf">
866 <rect key="frame" x="0.0" y="0.0" width="75" height="75"/> 866 <rect key="frame" x="0.0" y="0.0" width="75" height="75"/>
867 </imageView> 867 </imageView>
868 - <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"> 868 + <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="uDb-BJ-aht">
869 <rect key="frame" x="5" y="46" width="65" height="11"/> 869 <rect key="frame" x="5" y="46" width="65" height="11"/>
870 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/> 870 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
871 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> 871 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
...@@ -906,7 +906,7 @@ ...@@ -906,7 +906,7 @@
906 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="blj-YT-unI"> 906 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="blj-YT-unI">
907 <rect key="frame" x="0.0" y="0.0" width="75" height="75"/> 907 <rect key="frame" x="0.0" y="0.0" width="75" height="75"/>
908 </imageView> 908 </imageView>
909 - <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"> 909 + <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="rPe-HK-KW1">
910 <rect key="frame" x="5" y="46" width="65" height="11"/> 910 <rect key="frame" x="5" y="46" width="65" height="11"/>
911 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/> 911 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
912 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> 912 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
...@@ -947,7 +947,7 @@ ...@@ -947,7 +947,7 @@
947 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="EZL-9s-XvQ"> 947 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_dfy_earn" translatesAutoresizingMaskIntoConstraints="NO" id="EZL-9s-XvQ">
948 <rect key="frame" x="0.0" y="0.0" width="75" height="75"/> 948 <rect key="frame" x="0.0" y="0.0" width="75" height="75"/>
949 </imageView> 949 </imageView>
950 - <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"> 950 + <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="rid-Wp-gA9">
951 <rect key="frame" x="5" y="46" width="65" height="11"/> 951 <rect key="frame" x="5" y="46" width="65" height="11"/>
952 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/> 952 <fontDescription key="fontDescription" name="PFSquareSansPro-ExtraBlack" family="PF Square Sans Pro" pointSize="11"/>
953 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> 953 <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
...@@ -1531,23 +1531,23 @@ ...@@ -1531,23 +1531,23 @@
1531 </connections> 1531 </connections>
1532 </tableViewCell> 1532 </tableViewCell>
1533 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponsTableViewCellId" id="DUH-nG-QWi" customClass="UnifiedCouponsTableViewCell" customModule="SwiftWarplyFramework"> 1533 <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponsTableViewCellId" id="DUH-nG-QWi" customClass="UnifiedCouponsTableViewCell" customModule="SwiftWarplyFramework">
1534 - <rect key="frame" x="0.0" y="923.5" width="414" height="44"/> 1534 + <rect key="frame" x="0.0" y="923.5" width="414" height="64.5"/>
1535 <autoresizingMask key="autoresizingMask"/> 1535 <autoresizingMask key="autoresizingMask"/>
1536 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DUH-nG-QWi" id="rx6-wA-MYI"> 1536 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DUH-nG-QWi" id="rx6-wA-MYI">
1537 - <rect key="frame" x="0.0" y="0.0" width="414" height="44"/> 1537 + <rect key="frame" x="0.0" y="0.0" width="414" height="64.5"/>
1538 <autoresizingMask key="autoresizingMask"/> 1538 <autoresizingMask key="autoresizingMask"/>
1539 <subviews> 1539 <subviews>
1540 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WW2-mP-ZJD"> 1540 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WW2-mP-ZJD">
1541 - <rect key="frame" x="10" y="0.0" width="394" height="44"/> 1541 + <rect key="frame" x="10" y="0.0" width="394" height="64.5"/>
1542 <subviews> 1542 <subviews>
1543 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Gde-3J-Ew9"> 1543 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="coupon_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Gde-3J-Ew9">
1544 - <rect key="frame" x="0.0" y="0.0" width="394" height="44"/> 1544 + <rect key="frame" x="0.0" y="0.0" width="394" height="64.5"/>
1545 </imageView> 1545 </imageView>
1546 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="87q-5c-uea"> 1546 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="87q-5c-uea">
1547 - <rect key="frame" x="20" y="10" width="79" height="24"/> 1547 + <rect key="frame" x="20" y="10" width="79" height="44.5"/>
1548 <subviews> 1548 <subviews>
1549 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XsA-Nw-7Pr"> 1549 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XsA-Nw-7Pr">
1550 - <rect key="frame" x="18" y="18" width="43" height="0.0"/> 1550 + <rect key="frame" x="18" y="18" width="43" height="8.5"/>
1551 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 1551 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
1552 </imageView> 1552 </imageView>
1553 </subviews> 1553 </subviews>
...@@ -1560,41 +1560,26 @@ ...@@ -1560,41 +1560,26 @@
1560 </constraints> 1560 </constraints>
1561 </view> 1561 </view>
1562 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u97-5H-Y40"> 1562 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u97-5H-Y40">
1563 - <rect key="frame" x="104" y="5" width="10" height="34"/> 1563 + <rect key="frame" x="104" y="5" width="10" height="54.5"/>
1564 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 1564 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
1565 <constraints> 1565 <constraints>
1566 <constraint firstAttribute="width" constant="10" id="Tcx-FG-KC0"/> 1566 <constraint firstAttribute="width" constant="10" id="Tcx-FG-KC0"/>
1567 </constraints> 1567 </constraints>
1568 </view> 1568 </view>
1569 - <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"> 1569 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Ng-4X-yjm">
1570 - <rect key="frame" x="119" y="15" width="255" height="0.0"/> 1570 + <rect key="frame" x="119" y="15" width="163.5" height="17"/>
1571 <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/> 1571 <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/>
1572 <color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> 1572 <color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
1573 <nil key="highlightedColor"/> 1573 <nil key="highlightedColor"/>
1574 </label> 1574 </label>
1575 - <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="fjU-NZ-UM8"> 1575 + <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">
1576 - <rect key="frame" x="119" y="20" width="255" height="4"/> 1576 + <rect key="frame" x="292.5" y="26.5" width="81.5" height="12"/>
1577 - <subviews> 1577 + <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
1578 - <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"> 1578 + <color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
1579 - <rect key="frame" x="0.0" y="0.0" width="127.5" height="4"/> 1579 + <nil key="highlightedColor"/>
1580 - <fontDescription key="fontDescription" name="PFSquareSansPro-Bold" family="PF Square Sans Pro" pointSize="31"/> 1580 + </label>
1581 - <color key="textColor" red="0.2274509804" green="0.32156862749999998" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
1582 - <nil key="highlightedColor"/>
1583 - </label>
1584 - <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">
1585 - <rect key="frame" x="132.5" y="0.0" width="122.5" height="4"/>
1586 - <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
1587 - <color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
1588 - <nil key="highlightedColor"/>
1589 - </label>
1590 - </subviews>
1591 - <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
1592 - <constraints>
1593 - <constraint firstItem="lhE-IF-PdV" firstAttribute="width" secondItem="fjU-NZ-UM8" secondAttribute="width" multiplier="0.5" id="jV0-Rz-MOC"/>
1594 - </constraints>
1595 - </stackView>
1596 <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"> 1581 <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">
1597 - <rect key="frame" x="119" y="29" width="255" height="0.0"/> 1582 + <rect key="frame" x="119" y="37.5" width="255" height="12"/>
1598 <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/> 1583 <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="12"/>
1599 <color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/> 1584 <color key="textColor" red="0.3803921569" green="0.4431372549" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
1600 <nil key="highlightedColor"/> 1585 <nil key="highlightedColor"/>
...@@ -1603,27 +1588,25 @@ ...@@ -1603,27 +1588,25 @@
1603 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 1588 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
1604 <constraints> 1589 <constraints>
1605 <constraint firstAttribute="bottom" secondItem="u97-5H-Y40" secondAttribute="bottom" constant="5" id="1Lc-bv-1Al"/> 1590 <constraint firstAttribute="bottom" secondItem="u97-5H-Y40" secondAttribute="bottom" constant="5" id="1Lc-bv-1Al"/>
1606 - <constraint firstAttribute="trailing" secondItem="7Ng-4X-yjm" secondAttribute="trailing" constant="20" id="1nu-j0-QIj"/>
1607 <constraint firstItem="Gde-3J-Ew9" firstAttribute="leading" secondItem="WW2-mP-ZJD" secondAttribute="leading" id="40f-ex-Phx"/> 1591 <constraint firstItem="Gde-3J-Ew9" firstAttribute="leading" secondItem="WW2-mP-ZJD" secondAttribute="leading" id="40f-ex-Phx"/>
1608 <constraint firstItem="7Ng-4X-yjm" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="5TF-wG-jX1"/> 1592 <constraint firstItem="7Ng-4X-yjm" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="5TF-wG-jX1"/>
1609 <constraint firstItem="87q-5c-uea" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="10" id="6AJ-EI-bPD"/> 1593 <constraint firstItem="87q-5c-uea" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="10" id="6AJ-EI-bPD"/>
1610 <constraint firstAttribute="trailing" secondItem="Gde-3J-Ew9" secondAttribute="trailing" id="Aal-fh-wUH"/> 1594 <constraint firstAttribute="trailing" secondItem="Gde-3J-Ew9" secondAttribute="trailing" id="Aal-fh-wUH"/>
1611 - <constraint firstItem="fjU-NZ-UM8" firstAttribute="centerY" secondItem="WW2-mP-ZJD" secondAttribute="centerY" id="BOY-1A-D30"/> 1595 + <constraint firstItem="KJD-Db-B4t" firstAttribute="leading" secondItem="7Ng-4X-yjm" secondAttribute="trailing" constant="10" id="CE4-RE-oQa"/>
1612 <constraint firstItem="7Ng-4X-yjm" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="15" id="EFT-xp-xck"/> 1596 <constraint firstItem="7Ng-4X-yjm" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="15" id="EFT-xp-xck"/>
1597 + <constraint firstAttribute="trailing" secondItem="KJD-Db-B4t" secondAttribute="trailing" constant="20" id="FxZ-Fg-Cto"/>
1613 <constraint firstItem="87q-5c-uea" firstAttribute="width" secondItem="WW2-mP-ZJD" secondAttribute="width" multiplier="0.2" id="Jct-QS-76d"/> 1598 <constraint firstItem="87q-5c-uea" firstAttribute="width" secondItem="WW2-mP-ZJD" secondAttribute="width" multiplier="0.2" id="Jct-QS-76d"/>
1614 - <constraint firstItem="fjU-NZ-UM8" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="Kr7-AR-EG1"/>
1615 <constraint firstItem="u97-5H-Y40" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="5" id="MwF-kc-vsh"/> 1599 <constraint firstItem="u97-5H-Y40" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" constant="5" id="MwF-kc-vsh"/>
1616 - <constraint firstItem="fjU-NZ-UM8" firstAttribute="top" relation="greaterThanOrEqual" secondItem="7Ng-4X-yjm" secondAttribute="bottom" constant="5" id="Q7K-FB-afo"/> 1600 + <constraint firstItem="KJD-Db-B4t" firstAttribute="centerY" secondItem="WW2-mP-ZJD" secondAttribute="centerY" id="NmT-xf-UuO"/>
1617 <constraint firstItem="C5t-xz-oAO" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="Qud-Nb-9mK"/> 1601 <constraint firstItem="C5t-xz-oAO" firstAttribute="leading" secondItem="u97-5H-Y40" secondAttribute="trailing" constant="5" id="Qud-Nb-9mK"/>
1602 + <constraint firstItem="7Ng-4X-yjm" firstAttribute="width" secondItem="KJD-Db-B4t" secondAttribute="width" multiplier="2" id="Tcm-US-ex1"/>
1618 <constraint firstItem="Gde-3J-Ew9" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" id="kMk-q4-Ig9"/> 1603 <constraint firstItem="Gde-3J-Ew9" firstAttribute="top" secondItem="WW2-mP-ZJD" secondAttribute="top" id="kMk-q4-Ig9"/>
1619 <constraint firstAttribute="bottom" secondItem="Gde-3J-Ew9" secondAttribute="bottom" id="kVb-zO-dgp"/> 1604 <constraint firstAttribute="bottom" secondItem="Gde-3J-Ew9" secondAttribute="bottom" id="kVb-zO-dgp"/>
1620 <constraint firstItem="87q-5c-uea" firstAttribute="leading" secondItem="WW2-mP-ZJD" secondAttribute="leading" constant="20" id="kW3-Fe-zjx"/> 1605 <constraint firstItem="87q-5c-uea" firstAttribute="leading" secondItem="WW2-mP-ZJD" secondAttribute="leading" constant="20" id="kW3-Fe-zjx"/>
1621 - <constraint firstAttribute="trailing" secondItem="fjU-NZ-UM8" secondAttribute="trailing" constant="20" id="paQ-99-YFA"/>
1622 <constraint firstAttribute="bottom" secondItem="87q-5c-uea" secondAttribute="bottom" constant="10" id="qXI-m9-UWA"/> 1606 <constraint firstAttribute="bottom" secondItem="87q-5c-uea" secondAttribute="bottom" constant="10" id="qXI-m9-UWA"/>
1623 <constraint firstItem="u97-5H-Y40" firstAttribute="leading" secondItem="87q-5c-uea" secondAttribute="trailing" constant="5" id="rU6-Db-qdS"/> 1607 <constraint firstItem="u97-5H-Y40" firstAttribute="leading" secondItem="87q-5c-uea" secondAttribute="trailing" constant="5" id="rU6-Db-qdS"/>
1624 <constraint firstAttribute="trailing" secondItem="C5t-xz-oAO" secondAttribute="trailing" constant="20" id="sjh-Xe-FAi"/> 1608 <constraint firstAttribute="trailing" secondItem="C5t-xz-oAO" secondAttribute="trailing" constant="20" id="sjh-Xe-FAi"/>
1625 <constraint firstAttribute="bottom" secondItem="C5t-xz-oAO" secondAttribute="bottom" constant="15" id="ujL-p5-XBS"/> 1609 <constraint firstAttribute="bottom" secondItem="C5t-xz-oAO" secondAttribute="bottom" constant="15" id="ujL-p5-XBS"/>
1626 - <constraint firstItem="C5t-xz-oAO" firstAttribute="top" relation="greaterThanOrEqual" secondItem="fjU-NZ-UM8" secondAttribute="bottom" constant="5" id="yPM-CY-avN"/>
1627 </constraints> 1610 </constraints>
1628 </view> 1611 </view>
1629 </subviews> 1612 </subviews>
...@@ -1640,7 +1623,6 @@ ...@@ -1640,7 +1623,6 @@
1640 <outlet property="borderView" destination="u97-5H-Y40" id="unw-S4-1cW"/> 1623 <outlet property="borderView" destination="u97-5H-Y40" id="unw-S4-1cW"/>
1641 <outlet property="couponBgImage" destination="Gde-3J-Ew9" id="zAU-dC-iJ3"/> 1624 <outlet property="couponBgImage" destination="Gde-3J-Ew9" id="zAU-dC-iJ3"/>
1642 <outlet property="couponImage" destination="XsA-Nw-7Pr" id="sPO-ba-7pB"/> 1625 <outlet property="couponImage" destination="XsA-Nw-7Pr" id="sPO-ba-7pB"/>
1643 - <outlet property="dicountLabel" destination="lhE-IF-PdV" id="w8c-Rx-0yP"/>
1644 <outlet property="discriptionLabel" destination="KJD-Db-B4t" id="Iac-05-eFb"/> 1626 <outlet property="discriptionLabel" destination="KJD-Db-B4t" id="Iac-05-eFb"/>
1645 <outlet property="expirationLabel" destination="C5t-xz-oAO" id="PvS-Fj-fua"/> 1627 <outlet property="expirationLabel" destination="C5t-xz-oAO" id="PvS-Fj-fua"/>
1646 <outlet property="nameLabel" destination="7Ng-4X-yjm" id="FfZ-6W-xyF"/> 1628 <outlet property="nameLabel" destination="7Ng-4X-yjm" id="FfZ-6W-xyF"/>
......
...@@ -13,28 +13,9 @@ class UnifiedCouponsTableViewCell: UITableViewCell { ...@@ -13,28 +13,9 @@ class UnifiedCouponsTableViewCell: UITableViewCell {
13 @IBOutlet weak var couponImage: UIImageView! 13 @IBOutlet weak var couponImage: UIImageView!
14 @IBOutlet weak var borderView: UIView! 14 @IBOutlet weak var borderView: UIView!
15 @IBOutlet weak var nameLabel: UILabel! 15 @IBOutlet weak var nameLabel: UILabel!
16 - @IBOutlet weak var dicountLabel: UILabel!
17 @IBOutlet weak var discriptionLabel: UILabel! 16 @IBOutlet weak var discriptionLabel: UILabel!
18 @IBOutlet weak var expirationLabel: UILabel! 17 @IBOutlet weak var expirationLabel: UILabel!
19 18
20 - var postImageURL: String? {
21 - didSet {
22 - if let url = postImageURL {
23 - self.couponImage.image = UIImage() // UIImage(named: "loading")
24 -
25 - UIImage.loadImageUsingCacheWithUrlString(url) { image in
26 - // set the image only when we are still displaying the content for the image we finished downloading
27 - if url == self.postImageURL {
28 - self.couponImage.image = image
29 - }
30 - }
31 - }
32 - else {
33 - self.couponImage.image = nil
34 - }
35 - }
36 - }
37 -
38 19
39 public override func awakeFromNib() { 20 public override func awakeFromNib() {
40 super.awakeFromNib() 21 super.awakeFromNib()
...@@ -61,37 +42,25 @@ class UnifiedCouponsTableViewCell: UITableViewCell { ...@@ -61,37 +42,25 @@ class UnifiedCouponsTableViewCell: UITableViewCell {
61 } 42 }
62 43
63 44
64 - func configureCell(coupon: swiftApi.CouponItemModel) { 45 + func configureCell(coupon: swiftApi.UnifiedCouponModel) {
65 -// COUPONSET: desc, img_preview, name, terms, merchant_uuid, discount_type, final_price 46 + var activeCouponsCount:Int = 0
66 -// COUPON: coupon, expiration, discount, status 47 + for coupon in coupon._coupons {
67 -// MERCHANT: _img_preview,_admin_name 48 + if (coupon.status == 1) {
68 - 49 + activeCouponsCount += 1
69 - let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList() 50 + }
51 + }
70 52
71 - let couponSetData: swiftApi.CouponSetItemModel? = coupon.couponset_data 53 + nameLabel.text = "COSMOTE SuperMarket Deals"
72 54
73 - nameLabel.text = "" 55 + discriptionLabel.text =
56 + activeCouponsCount == 1 ? "έχεις " + String(activeCouponsCount) + " ενεργό κουπόνι"
57 + : "έχεις " + String(activeCouponsCount) + " ενεργά κουπόνια"
74 58
75 - for merchant in merchantList { 59 + if let earliestExpiration = coupon._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) {
76 - if (merchant._uuid == couponSetData?.merchant_uuid) { 60 + expirationLabel.text = "Ισχύει έως " + (earliestExpiration.expiration ?? "")
77 - // couponImage.load(link: merchant._img_preview, placeholder: UIImage(), cache: URLCache()) 61 + } else {
78 -// self.postImageURL = merchant._img_preview 62 + expirationLabel.text = ""
79 - nameLabel.text = merchant._admin_name
80 - break;
81 - }
82 } 63 }
83 -
84 -// couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
85 -// nameLabel.text = couponSetData?.name ?? ""
86 - let discount = couponSetData?.discount_type == "value" ? ((coupon.discount ?? "") + "€")
87 - : couponSetData?.discount_type == "percentage" ? ((coupon.discount ?? "") + "%")
88 - : couponSetData?.discount_type == "plus_one" ? "1+1"
89 - : ((coupon.discount ?? "") + "€")
90 - dicountLabel.text = discount
91 - // let htmlText = couponSetData?.inner_text ?? ""
92 - // discriptionLabel.text = htmlText.htmlToString
93 - discriptionLabel.text = couponSetData?.inner_text ?? ""
94 - expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "")
95 } 64 }
96 65
97 } 66 }
......
...@@ -63,10 +63,14 @@ import SwiftEventBus ...@@ -63,10 +63,14 @@ import SwiftEventBus
63 public var loyaltyBadge:swiftApi.LoyaltyBadgeModel = swiftApi().getLoyaltyBadge() 63 public var loyaltyBadge:swiftApi.LoyaltyBadgeModel = swiftApi().getLoyaltyBadge()
64 public var profile:swiftApi.ProfileModel? = swiftApi().getConsumer() 64 public var profile:swiftApi.ProfileModel? = swiftApi().getConsumer()
65 // TODO: Add correct unifiedCoupons 65 // TODO: Add correct unifiedCoupons
66 - public var unifiedCoupons:Array<swiftApi.CouponItemModel> = swiftApi().getCouponList() 66 + public var unifiedCoupons:Array<swiftApi.UnifiedCouponModel> = []
67 67
68 var timerWallet: DispatchSourceTimer? 68 var timerWallet: DispatchSourceTimer?
69 var seconds: Int = 0 69 var seconds: Int = 0
70 +
71 + var totalCouponValue = swiftApi().getDealsCouponsSum()
72 + let totalCouponDiscount = Float(round(100 * swiftApi().getLoyaltyBadge()._value) / 100)
73 + var unifiedCouponsDiscount:Float = 0.0
70 74
71 public override func viewDidLoad() { 75 public override func viewDidLoad() {
72 super.viewDidLoad() 76 super.viewDidLoad()
...@@ -97,6 +101,8 @@ import SwiftEventBus ...@@ -97,6 +101,8 @@ import SwiftEventBus
97 // dfyCoupons = swiftApi().getActiveDFYCoupons() 101 // dfyCoupons = swiftApi().getActiveDFYCoupons()
98 // TODO: DELETE <=== 102 // TODO: DELETE <===
99 103
104 + getUnifiedCouponsRequest()
105 +
100 setBackButton() 106 setBackButton()
101 setNavigationTitle("My Rewards") 107 setNavigationTitle("My Rewards")
102 108
...@@ -169,7 +175,7 @@ import SwiftEventBus ...@@ -169,7 +175,7 @@ import SwiftEventBus
169 dfyEarnBannerView.layer.shadowOpacity = 1.0 175 dfyEarnBannerView.layer.shadowOpacity = 1.0
170 dfyEarnBannerView.layer.shadowRadius = 3.0 176 dfyEarnBannerView.layer.shadowRadius = 3.0
171 177
172 - var totalCouponValue = swiftApi().getDealsCouponsSum() 178 +// var totalCouponValue = swiftApi().getDealsCouponsSum()
173 179
174 if (totalCouponValue == 0.0) { 180 if (totalCouponValue == 0.0) {
175 dfyEarnBannerView.isHidden = true 181 dfyEarnBannerView.isHidden = true
...@@ -240,7 +246,7 @@ import SwiftEventBus ...@@ -240,7 +246,7 @@ import SwiftEventBus
240 couponEarnView.layer.shadowOpacity = 1.0 246 couponEarnView.layer.shadowOpacity = 1.0
241 couponEarnView.layer.shadowRadius = 3.0 247 couponEarnView.layer.shadowRadius = 3.0
242 248
243 - let totalCouponDiscount = Float(round(100 * loyaltyBadge._value) / 100) 249 +// let totalCouponDiscount = Float(round(100 * loyaltyBadge._value) / 100)
244 var totalCouponDiscountString = "0" 250 var totalCouponDiscountString = "0"
245 totalCouponDiscountString = String(format: "%.2f", totalCouponDiscount).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil) 251 totalCouponDiscountString = String(format: "%.2f", totalCouponDiscount).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil)
246 252
...@@ -273,25 +279,43 @@ import SwiftEventBus ...@@ -273,25 +279,43 @@ import SwiftEventBus
273 print("Loyalty Badge Count: " + String(loyaltyBadge._couponCount)) 279 print("Loyalty Badge Count: " + String(loyaltyBadge._couponCount))
274 280
275 // Rewards View - Market Badge 281 // Rewards View - Market Badge
282 +//
283 +// var unifiedCouponsDiscount:Float = 0.0
284 +// for uniCoupon in unifiedCoupons {
285 +// for coupon in uniCoupon._coupons {
286 +// if (coupon.status == 1) {
287 +// if let discountFloat = Float(coupon.discount ?? "0.0") {
288 +// unifiedCouponsDiscount += discountFloat
289 +// }
290 +// }
291 +// }
292 +// }
293 +//
294 +// let marketDiscount = Float(round(100 * unifiedCouponsDiscount) / 100)
295 +// var marketDiscountString = "0"
296 +// marketDiscountString = String(format: "%.2f", marketDiscount).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil)
297 +//
298 +// self.marketBadgeLabel.text = marketDiscountString + "€"
299 +
276 // TODO: Fix empty check 300 // TODO: Fix empty check
277 - if (false) { 301 +// if (unifiedCouponsDiscount == 0.0) {
278 - marketBadgeImage.image = UIImage(named: "wallet_market_empty", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) 302 +// marketBadgeImage.image = UIImage(named: "wallet_market_empty", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
279 - marketBadgeLabel.isHidden = true 303 +// marketBadgeLabel.isHidden = true
280 - 304 +//
281 - } else { 305 +// } else {
282 - marketBadgeImage.image = UIImage(named: "wallet_market", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) 306 +// marketBadgeImage.image = UIImage(named: "wallet_market", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
283 - marketBadgeLabel.isHidden = false 307 +// marketBadgeLabel.isHidden = false
284 - } 308 +// }
285 // TODO: Fix dynamic value 309 // TODO: Fix dynamic value
286 - marketBadgeLabel.text = "10,00" + "€" 310 +// marketBadgeLabel.text = "0,00" + "€"
287 311
288 // Rewards View 312 // Rewards View
289 // TODO: Add market value 313 // TODO: Add market value
290 - let sumRewards = totalCouponValue + totalCouponDiscount 314 +// let sumRewards = totalCouponValue + totalCouponDiscount + unifiedCouponsDiscount
291 -// sumRewards = Float(round(100 * sumRewards) / 100) 315 +//// sumRewards = Float(round(100 * sumRewards) / 100)
292 - var sumRewardsString = "0" 316 +// var sumRewardsString = "0"
293 - sumRewardsString = String(format: "%.2f", sumRewards).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil) 317 +// sumRewardsString = String(format: "%.2f", sumRewards).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil)
294 - sumBadgeLabel.text = sumRewardsString + "€" 318 +// sumBadgeLabel.text = sumRewardsString + "€"
295 319
296 // activeCodeView 320 // activeCodeView
297 activeCodeView.layer.cornerRadius = 5.0 321 activeCodeView.layer.cornerRadius = 5.0
...@@ -433,24 +457,24 @@ import SwiftEventBus ...@@ -433,24 +457,24 @@ import SwiftEventBus
433 emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!" 457 emptyLabel.text = "Δεν έχεις κάποιον ενεργό κωδικό ή κουπόνι! Μπες τώρα στην ενότητα COSMOTE For You και βρες αποκλειστικές προσφορές!"
434 458
435 // TODO: FIX emptyView check - add market badge check 459 // TODO: FIX emptyView check - add market badge check
436 - if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0) { 460 +// if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && unifiedCouponsDiscount == 0.0) {
437 - rewardsView.isHidden = true 461 +// rewardsView.isHidden = true
438 - rewardsViewHeight.constant = 0 462 +// rewardsViewHeight.constant = 0
439 - } else { 463 +// } else {
440 - rewardsView.isHidden = false 464 +// rewardsView.isHidden = false
441 - rewardsViewHeight.constant = rewardsView.intrinsicContentSize.height 465 +// rewardsViewHeight.constant = rewardsView.intrinsicContentSize.height
442 - } 466 +// }
443 467
444 // TODO: FIX emptyView check - add market badge check 468 // TODO: FIX emptyView check - add market badge check
445 // if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) { 469 // if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) {
446 - if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0 && unifiedCoupons.count == 0) { 470 +// if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0 && unifiedCoupons.count == 0 && unifiedCouponsDiscount == 0.0) {
447 - emptyView.isHidden = false 471 +// emptyView.isHidden = false
448 - emptyViewHeight.constant = rewardsView.intrinsicContentSize.height 472 +// emptyViewHeight.constant = rewardsView.intrinsicContentSize.height
449 - } else { 473 +// } else {
450 - emptyView.isHidden = true 474 +// emptyView.isHidden = true
451 - emptyViewHeight.constant = 0 475 +// emptyViewHeight.constant = 0
452 - } 476 +// }
453 - 477 + updateMarketBadge()
454 } 478 }
455 479
456 public override func viewWillAppear(_ animated: Bool) { 480 public override func viewWillAppear(_ animated: Bool) {
...@@ -494,6 +518,8 @@ import SwiftEventBus ...@@ -494,6 +518,8 @@ import SwiftEventBus
494 } 518 }
495 519
496 self.coupons = swiftApi().getCouponList() 520 self.coupons = swiftApi().getCouponList()
521 + self.unifiedCoupons = swiftApi().getUnifiedCouponList()
522 + self.updateMarketBadge()
497 self.tableView.reloadData() 523 self.tableView.reloadData()
498 524
499 self.startTimer() 525 self.startTimer()
...@@ -577,6 +603,77 @@ import SwiftEventBus ...@@ -577,6 +603,77 @@ import SwiftEventBus
577 seconds = 0 603 seconds = 0
578 } 604 }
579 605
606 + func updateMarketBadge() {
607 + for uniCoupon in self.unifiedCoupons {
608 + for coupon in uniCoupon._coupons {
609 + if (coupon.status == 1) {
610 + if let discountFloat = Float(coupon.discount ?? "0.0") {
611 + unifiedCouponsDiscount += discountFloat
612 + }
613 + }
614 + }
615 + }
616 +
617 + let marketDiscount = Float(round(100 * unifiedCouponsDiscount) / 100)
618 + var marketDiscountString = "0"
619 + marketDiscountString = String(format: "%.2f", marketDiscount).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil)
620 +
621 + self.marketBadgeLabel.text = marketDiscountString + "€"
622 +
623 + if (unifiedCouponsDiscount == 0.0) {
624 + marketBadgeImage.image = UIImage(named: "wallet_market_empty", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
625 + marketBadgeLabel.isHidden = true
626 +
627 + } else {
628 + marketBadgeImage.image = UIImage(named: "wallet_market", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
629 + marketBadgeLabel.isHidden = false
630 + }
631 +
632 + let sumRewards = totalCouponValue + totalCouponDiscount + unifiedCouponsDiscount
633 +// sumRewards = Float(round(100 * sumRewards) / 100)
634 + var sumRewardsString = "0"
635 + sumRewardsString = String(format: "%.2f", sumRewards).replacingOccurrences(of: ".", with: ",", options: .literal, range: nil)
636 + sumBadgeLabel.text = sumRewardsString + "€"
637 +
638 + if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && unifiedCouponsDiscount == 0.0) {
639 + rewardsView.isHidden = true
640 + rewardsViewHeight.constant = 0
641 + } else {
642 + rewardsView.isHidden = false
643 + rewardsViewHeight.constant = rewardsView.intrinsicContentSize.height
644 + }
645 +
646 + // TODO: FIX emptyView check - add market badge check
647 +// if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0) {
648 + if (totalCouponValue == 0.0 && loyaltyBadge._couponCount == 0 && dfyCoupons.count == 0 && coupons.count == 0 && unifiedCoupons.count == 0 && unifiedCouponsDiscount == 0.0) {
649 + emptyView.isHidden = false
650 + emptyViewHeight.constant = rewardsView.intrinsicContentSize.height
651 + } else {
652 + emptyView.isHidden = true
653 + emptyViewHeight.constant = 0
654 + }
655 + }
656 +
657 + // MARK: - API Functions
658 + func getUnifiedCouponsRequest() {
659 + swiftApi().getUnifiedCouponsAsync(getUnifiedCouponsCallback, failureCallback: {errorCode in
660 + self.unifiedCoupons = []
661 + })
662 + }
663 +
664 + func getUnifiedCouponsCallback (_ couponsData: Array<swiftApi.UnifiedCouponModel>?) -> Void {
665 + if (couponsData != nil) {
666 + self.unifiedCoupons = couponsData ?? []
667 +
668 + DispatchQueue.main.async {
669 + self.updateMarketBadge()
670 + self.tableView.reloadData()
671 + }
672 + } else {
673 + self.unifiedCoupons = []
674 + }
675 + }
676 +
580 // MARK: - Actions 677 // MARK: - Actions
581 @IBAction func qustionnaireButtonAction(_ sender: Any) { 678 @IBAction func qustionnaireButtonAction(_ sender: Any) {
582 swiftApi().logTrackersEvent("click", ("LoyaltyWalletScreen:" + "Questionnaire")) 679 swiftApi().logTrackersEvent("click", ("LoyaltyWalletScreen:" + "Questionnaire"))
...@@ -670,9 +767,7 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -670,9 +767,7 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
670 767
671 public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 768 public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
672 if (section == 0) { 769 if (section == 0) {
673 - // TODO: Dynamic 770 + return self.unifiedCoupons.count
674 - return 3
675 -// return self.unifiedCoupons.count
676 } else if (section == 1) { 771 } else if (section == 1) {
677 if (self.dfyCoupons.count > 0) { 772 if (self.dfyCoupons.count > 0) {
678 return 1 773 return 1
...@@ -793,7 +888,7 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -793,7 +888,7 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
793 888
794 if (indexPath.section == 0) { 889 if (indexPath.section == 0) {
795 let cell = tableView.dequeueReusableCell(withIdentifier: "UnifiedCouponsTableViewCellId", for: indexPath) as! UnifiedCouponsTableViewCell 890 let cell = tableView.dequeueReusableCell(withIdentifier: "UnifiedCouponsTableViewCellId", for: indexPath) as! UnifiedCouponsTableViewCell
796 - cell.configureCell(coupon: coupons[indexPath.row]) 891 + cell.configureCell(coupon: unifiedCoupons[indexPath.row])
797 return cell 892 return cell
798 893
799 } else if (indexPath.section == 1) { 894 } else if (indexPath.section == 1) {
......