Showing
7 changed files
with
27 additions
and
21 deletions
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> | 7 | <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> |
8 | <dict> | 8 | <dict> |
9 | <key>orderHint</key> | 9 | <key>orderHint</key> |
10 | - <integer>1</integer> | 10 | + <integer>0</integer> |
11 | </dict> | 11 | </dict> |
12 | </dict> | 12 | </dict> |
13 | </dict> | 13 | </dict> | ... | ... |
... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
7 | <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> | 7 | <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> |
8 | <dict> | 8 | <dict> |
9 | <key>orderHint</key> | 9 | <key>orderHint</key> |
10 | - <integer>0</integer> | 10 | + <integer>1</integer> |
11 | </dict> | 11 | </dict> |
12 | </dict> | 12 | </dict> |
13 | </dict> | 13 | </dict> | ... | ... |
No preview for this file type
... | @@ -2401,14 +2401,14 @@ | ... | @@ -2401,14 +2401,14 @@ |
2401 | <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | 2401 | <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
2402 | <prototypes> | 2402 | <prototypes> |
2403 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponBCHeaderTableViewCell" id="1eX-19-ysb" customClass="UnifiedCouponBCHeaderTableViewCell" customModule="SwiftWarplyFramework"> | 2403 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponBCHeaderTableViewCell" id="1eX-19-ysb" customClass="UnifiedCouponBCHeaderTableViewCell" customModule="SwiftWarplyFramework"> |
2404 | - <rect key="frame" x="0.0" y="50" width="414" height="847.5"/> | 2404 | + <rect key="frame" x="0.0" y="50" width="414" height="842.5"/> |
2405 | <autoresizingMask key="autoresizingMask"/> | 2405 | <autoresizingMask key="autoresizingMask"/> |
2406 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="1eX-19-ysb" id="izt-1Z-wey"> | 2406 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="1eX-19-ysb" id="izt-1Z-wey"> |
2407 | - <rect key="frame" x="0.0" y="0.0" width="414" height="847.5"/> | 2407 | + <rect key="frame" x="0.0" y="0.0" width="414" height="842.5"/> |
2408 | <autoresizingMask key="autoresizingMask"/> | 2408 | <autoresizingMask key="autoresizingMask"/> |
2409 | <subviews> | 2409 | <subviews> |
2410 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zYD-ey-wun"> | 2410 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zYD-ey-wun"> |
2411 | - <rect key="frame" x="0.0" y="0.0" width="414" height="847.5"/> | 2411 | + <rect key="frame" x="0.0" y="0.0" width="414" height="842.5"/> |
2412 | <subviews> | 2412 | <subviews> |
2413 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="4Aj-WZ-M9m"> | 2413 | <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="4Aj-WZ-M9m"> |
2414 | <rect key="frame" x="0.0" y="0.0" width="414" height="200"/> | 2414 | <rect key="frame" x="0.0" y="0.0" width="414" height="200"/> |
... | @@ -2485,14 +2485,14 @@ | ... | @@ -2485,14 +2485,14 @@ |
2485 | <nil key="highlightedColor"/> | 2485 | <nil key="highlightedColor"/> |
2486 | </label> | 2486 | </label> |
2487 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="33M-UT-Ysb" userLabel="Border 2 View"> | 2487 | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="33M-UT-Ysb" userLabel="Border 2 View"> |
2488 | - <rect key="frame" x="20" y="644.5" width="374" height="1"/> | 2488 | + <rect key="frame" x="20" y="639.5" width="374" height="1"/> |
2489 | <color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/> | 2489 | <color key="backgroundColor" red="0.90196078430000004" green="0.90196078430000004" blue="0.90196078430000004" alpha="1" colorSpace="calibratedRGB"/> |
2490 | <constraints> | 2490 | <constraints> |
2491 | <constraint firstAttribute="height" constant="1" id="6LJ-d0-AsC"/> | 2491 | <constraint firstAttribute="height" constant="1" id="6LJ-d0-AsC"/> |
2492 | </constraints> | 2492 | </constraints> |
2493 | </view> | 2493 | </view> |
2494 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UR2-dr-Wbn"> | 2494 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UR2-dr-Wbn"> |
2495 | - <rect key="frame" x="103.5" y="655.5" width="207" height="50"/> | 2495 | + <rect key="frame" x="103.5" y="650.5" width="207" height="50"/> |
2496 | <constraints> | 2496 | <constraints> |
2497 | <constraint firstAttribute="height" constant="50" id="AMS-Hv-WqS"/> | 2497 | <constraint firstAttribute="height" constant="50" id="AMS-Hv-WqS"/> |
2498 | </constraints> | 2498 | </constraints> |
... | @@ -2507,13 +2507,13 @@ | ... | @@ -2507,13 +2507,13 @@ |
2507 | </connections> | 2507 | </connections> |
2508 | </button> | 2508 | </button> |
2509 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Το κουπόνι ισχύει έως 05/12/2022" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SPU-J6-4re"> | 2509 | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Το κουπόνι ισχύει έως 05/12/2022" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SPU-J6-4re"> |
2510 | - <rect key="frame" x="20" y="740.5" width="374" height="15"/> | 2510 | + <rect key="frame" x="20" y="735.5" width="374" height="15"/> |
2511 | <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/> | 2511 | <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/> |
2512 | <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> | 2512 | <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> |
2513 | <nil key="highlightedColor"/> | 2513 | <nil key="highlightedColor"/> |
2514 | </label> | 2514 | </label> |
2515 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="52P-0b-ua5"> | 2515 | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="52P-0b-ua5"> |
2516 | - <rect key="frame" x="103.5" y="790.5" width="207" height="50"/> | 2516 | + <rect key="frame" x="103.5" y="785.5" width="207" height="50"/> |
2517 | <constraints> | 2517 | <constraints> |
2518 | <constraint firstAttribute="height" constant="50" id="W45-Tv-hXa"/> | 2518 | <constraint firstAttribute="height" constant="50" id="W45-Tv-hXa"/> |
2519 | </constraints> | 2519 | </constraints> |
... | @@ -2570,7 +2570,7 @@ | ... | @@ -2570,7 +2570,7 @@ |
2570 | <constraint firstItem="4Aj-WZ-M9m" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" id="rdH-Q3-LPg"/> | 2570 | <constraint firstItem="4Aj-WZ-M9m" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" id="rdH-Q3-LPg"/> |
2571 | <constraint firstItem="M7m-4Y-3sb" firstAttribute="centerX" secondItem="zYD-ey-wun" secondAttribute="centerX" id="u6h-Gd-lQ0"/> | 2571 | <constraint firstItem="M7m-4Y-3sb" firstAttribute="centerX" secondItem="zYD-ey-wun" secondAttribute="centerX" id="u6h-Gd-lQ0"/> |
2572 | <constraint firstItem="KgC-mB-kHF" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="w4n-nG-Bmg"/> | 2572 | <constraint firstItem="KgC-mB-kHF" firstAttribute="leading" secondItem="zYD-ey-wun" secondAttribute="leading" constant="20" id="w4n-nG-Bmg"/> |
2573 | - <constraint firstItem="33M-UT-Ysb" firstAttribute="top" secondItem="iDt-Pz-bkd" secondAttribute="bottom" constant="15" id="z2q-JF-fHL"/> | 2573 | + <constraint firstItem="33M-UT-Ysb" firstAttribute="top" secondItem="iDt-Pz-bkd" secondAttribute="bottom" constant="10" id="z2q-JF-fHL"/> |
2574 | </constraints> | 2574 | </constraints> |
2575 | </view> | 2575 | </view> |
2576 | </subviews> | 2576 | </subviews> |
... | @@ -2611,7 +2611,7 @@ | ... | @@ -2611,7 +2611,7 @@ |
2611 | </connections> | 2611 | </connections> |
2612 | </tableViewCell> | 2612 | </tableViewCell> |
2613 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CouponsTableViewCellId" id="TAK-Ug-AzU" customClass="CouponsTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> | 2613 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CouponsTableViewCellId" id="TAK-Ug-AzU" customClass="CouponsTableViewCell" customModule="SwiftWarplyFramework" customModuleProvider="target"> |
2614 | - <rect key="frame" x="0.0" y="897.5" width="414" height="118"/> | 2614 | + <rect key="frame" x="0.0" y="892.5" width="414" height="118"/> |
2615 | <autoresizingMask key="autoresizingMask"/> | 2615 | <autoresizingMask key="autoresizingMask"/> |
2616 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TAK-Ug-AzU" id="LFe-Vj-kjJ"> | 2616 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TAK-Ug-AzU" id="LFe-Vj-kjJ"> |
2617 | <rect key="frame" x="0.0" y="0.0" width="414" height="118"/> | 2617 | <rect key="frame" x="0.0" y="0.0" width="414" height="118"/> |
... | @@ -2749,7 +2749,7 @@ | ... | @@ -2749,7 +2749,7 @@ |
2749 | </connections> | 2749 | </connections> |
2750 | </tableViewCell> | 2750 | </tableViewCell> |
2751 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponBCFooterTableViewCell" id="LD5-ES-J67" customClass="UnifiedCouponBCFooterTableViewCell" customModule="SwiftWarplyFramework"> | 2751 | <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="UnifiedCouponBCFooterTableViewCell" id="LD5-ES-J67" customClass="UnifiedCouponBCFooterTableViewCell" customModule="SwiftWarplyFramework"> |
2752 | - <rect key="frame" x="0.0" y="1015.5" width="414" height="189"/> | 2752 | + <rect key="frame" x="0.0" y="1010.5" width="414" height="189"/> |
2753 | <autoresizingMask key="autoresizingMask"/> | 2753 | <autoresizingMask key="autoresizingMask"/> |
2754 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LD5-ES-J67" id="DmN-AA-8n5"> | 2754 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LD5-ES-J67" id="DmN-AA-8n5"> |
2755 | <rect key="frame" x="0.0" y="0.0" width="414" height="189"/> | 2755 | <rect key="frame" x="0.0" y="0.0" width="414" height="189"/> | ... | ... |
... | @@ -122,7 +122,8 @@ import AVFoundation | ... | @@ -122,7 +122,8 @@ import AVFoundation |
122 | func configureCell(coupon: swiftApi.UnifiedCouponModel?, couponsVisible: Bool) { | 122 | func configureCell(coupon: swiftApi.UnifiedCouponModel?, couponsVisible: Bool) { |
123 | 123 | ||
124 | couponView.layer.cornerRadius = 8 | 124 | couponView.layer.cornerRadius = 8 |
125 | - couponNumberLabel.text = ((coupon?._code != 0) ? String(coupon?._code ?? 0) : "") | 125 | +// couponNumberLabel.text = ((coupon?._code != 0) ? String(coupon?._code ?? 0) : "") |
126 | + couponNumberLabel.text = coupon?._barcode ?? "" | ||
126 | couponView.frame = CGRect(x: 0.0, y: 0.0, width: couponView.intrinsicContentSize.width, height: 55) | 127 | couponView.frame = CGRect(x: 0.0, y: 0.0, width: couponView.intrinsicContentSize.width, height: 55) |
127 | 128 | ||
128 | let barcodeString = constructBarcode(coupon: coupon) ?? "" | 129 | let barcodeString = constructBarcode(coupon: coupon) ?? "" |
... | @@ -150,15 +151,15 @@ import AVFoundation | ... | @@ -150,15 +151,15 @@ import AVFoundation |
150 | // === Hide Barcode Section | 151 | // === Hide Barcode Section |
151 | // barcodeImage.isHidden = true | 152 | // barcodeImage.isHidden = true |
152 | // barcodeImageHeight.constant = CGFloat(0) | 153 | // barcodeImageHeight.constant = CGFloat(0) |
153 | -// barcodeLabel.isHidden = true | 154 | + barcodeLabel.isHidden = true |
154 | -// barcodeLabelHeight.constant = CGFloat(0) | 155 | + barcodeLabelHeight.constant = CGFloat(0) |
155 | // | 156 | // |
156 | // borderViewHeight.constant = CGFloat(0) | 157 | // borderViewHeight.constant = CGFloat(0) |
157 | // borderView2Height.constant = CGFloat(0) | 158 | // borderView2Height.constant = CGFloat(0) |
158 | // | 159 | // |
159 | // border1TopSpace.constant = CGFloat(0) // 20 | 160 | // border1TopSpace.constant = CGFloat(0) // 20 |
160 | // barcodeImageTopSpace.constant = CGFloat(0) // 10 | 161 | // barcodeImageTopSpace.constant = CGFloat(0) // 10 |
161 | -// barcodeLabelTopSpace.constant = CGFloat(0) // 10 | 162 | + barcodeLabelTopSpace.constant = CGFloat(0) // 10 |
162 | // border2TopSpace.constant = CGFloat(0) // 15 | 163 | // border2TopSpace.constant = CGFloat(0) // 15 |
163 | // | 164 | // |
164 | showBarcodeButton.isHidden = true | 165 | showBarcodeButton.isHidden = true | ... | ... |
... | @@ -117,7 +117,7 @@ import SwiftEventBus | ... | @@ -117,7 +117,7 @@ import SwiftEventBus |
117 | showDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές."); | 117 | showDialog("Αδυναμία ενεργοποίησης", "Πρόσθεσε σύνδεση COSMOTE σταθερής, κινητής ή TV για να έχεις πρόσβαση στις προσφορές."); |
118 | } | 118 | } |
119 | 119 | ||
120 | - headerImage.image = UIImage(named: "ic_background_circle", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | 120 | + headerImage.image = UIImage(named: "ic_background_straight", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
121 | dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | 121 | dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
122 | couponEarnImage.image = UIImage(named: "wallet_coupons_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | 122 | couponEarnImage.image = UIImage(named: "wallet_coupons_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) |
123 | dfyLogoImage.image = UIImage(named: "dfy_logo_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | 123 | dfyLogoImage.image = UIImage(named: "dfy_logo_white", in: MyEmptyClass.resourceBundle(), compatibleWith: nil) | ... | ... |
... | @@ -6819,7 +6819,7 @@ public class swiftApi { | ... | @@ -6819,7 +6819,7 @@ public class swiftApi { |
6819 | let dateString = dictionary["created"] as? String? ?? "" | 6819 | let dateString = dictionary["created"] as? String? ?? "" |
6820 | let dateFormatter = DateFormatter() | 6820 | let dateFormatter = DateFormatter() |
6821 | dateFormatter.locale = Locale(identifier: "en_US_POSSIX") | 6821 | dateFormatter.locale = Locale(identifier: "en_US_POSSIX") |
6822 | - dateFormatter.dateFormat = "E, MMM dd yyyy HH:mm:ss" | 6822 | + dateFormatter.dateFormat = "E, dd MMM yyyy HH:mm:ss 'GMT'" |
6823 | if let date = dateFormatter.date(from: dateString ?? "") { | 6823 | if let date = dateFormatter.date(from: dateString ?? "") { |
6824 | dateFormatter.dateFormat = "dd/MM/yyyy" | 6824 | dateFormatter.dateFormat = "dd/MM/yyyy" |
6825 | let resultString = dateFormatter.string(from: date) | 6825 | let resultString = dateFormatter.string(from: date) |
... | @@ -6908,10 +6908,15 @@ public class swiftApi { | ... | @@ -6908,10 +6908,15 @@ public class swiftApi { |
6908 | } | 6908 | } |
6909 | } | 6909 | } |
6910 | } | 6910 | } |
6911 | - | 6911 | + |
6912 | - swiftApi().setUnifiedCouponList(unifiedCouponsArray) | 6912 | + // Sort by date |
6913 | + let dateFormatter = DateFormatter() | ||
6914 | + dateFormatter.dateFormat = "dd/MM/yyyy" | ||
6915 | + let sortedUnifiedCouponsArray = unifiedCouponsArray.sorted(by: { dateFormatter.date(from:$0._created)?.compare(dateFormatter.date(from:$1._created)!) == .orderedDescending }) | ||
6916 | + | ||
6917 | + swiftApi().setUnifiedCouponList(sortedUnifiedCouponsArray) | ||
6913 | swiftApi().setOldUnifiedCouponList(oldUnifiedCouponsArray) | 6918 | swiftApi().setOldUnifiedCouponList(oldUnifiedCouponsArray) |
6914 | - successCallback(unifiedCouponsArray) | 6919 | + successCallback(sortedUnifiedCouponsArray) |
6915 | } | 6920 | } |
6916 | } else { | 6921 | } else { |
6917 | successCallback(nil) | 6922 | successCallback(nil) | ... | ... |
-
Please register or login to post a comment