Showing
2 changed files
with
16 additions
and
16 deletions
... | @@ -55,7 +55,7 @@ import AVFoundation | ... | @@ -55,7 +55,7 @@ import AVFoundation |
55 | couponImageHeight.constant = 255 //230 // 253 // self.uiscreen.height * 0.25 | 55 | couponImageHeight.constant = 255 //230 // 253 // self.uiscreen.height * 0.25 |
56 | 56 | ||
57 | nameLabel.text = "Εκπτωτικό κουπόνι COSMOTE SUPERMARKET DEALS!" | 57 | nameLabel.text = "Εκπτωτικό κουπόνι COSMOTE SUPERMARKET DEALS!" |
58 | -// discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών." | 58 | + discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών." |
59 | 59 | ||
60 | merchantDescrTextView.text = "" | 60 | merchantDescrTextView.text = "" |
61 | merchantDescrTextViewTopSpace.constant = CGFloat(0) | 61 | merchantDescrTextViewTopSpace.constant = CGFloat(0) |
... | @@ -127,24 +127,24 @@ import AVFoundation | ... | @@ -127,24 +127,24 @@ import AVFoundation |
127 | 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) |
128 | 128 | ||
129 | 129 | ||
130 | - let activeCoupons = coupon?._coupons.filter { $0.status == 1 } | 130 | +// let activeCoupons = coupon?._coupons.filter { $0.status == 1 } |
131 | - let activeCouponsDiscount = (activeCoupons?.reduce(0) { $0 + (Float($1.discount ?? "0") ?? 0) }) ?? 0 | 131 | +// let activeCouponsDiscount = (activeCoupons?.reduce(0) { $0 + (Float($1.discount ?? "0") ?? 0) }) ?? 0 |
132 | 132 | ||
133 | -// discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών αξίας " + String(activeCouponsDiscount) + "€." | 133 | +// // discriptionLabel.text = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών αξίας " + String(activeCouponsDiscount) + "€." |
134 | 134 | ||
135 | - // ======== | 135 | +// // ======== |
136 | - let discrNormalText1 = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών αξίας " | 136 | +// let discrNormalText1 = "Χρησιμοποίησε τον παρακάτω κωδικό και πάρε έκπτωση στα ενεργά κουπόνια προσφορών αξίας " |
137 | - let discrBoldText = String(activeCouponsDiscount) + "€." | 137 | +// let discrBoldText = String(activeCouponsDiscount) + "€." |
138 | 138 | ||
139 | - let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 16) ?? UIFont.systemFont(ofSize: 15), NSAttributedString.Key.foregroundColor: UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)] | 139 | +// let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 16) ?? UIFont.systemFont(ofSize: 15), NSAttributedString.Key.foregroundColor: UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)] |
140 | - let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 16) ?? UIFont.boldSystemFont(ofSize: 15), NSAttributedString.Key.foregroundColor: UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)] | 140 | +// let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 16) ?? UIFont.boldSystemFont(ofSize: 15), NSAttributedString.Key.foregroundColor: UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)] |
141 | 141 | ||
142 | - let sumAttributedString = NSMutableAttributedString(string:discrNormalText1, attributes:attrRegular) | 142 | +// let sumAttributedString = NSMutableAttributedString(string:discrNormalText1, attributes:attrRegular) |
143 | - let sumBoldString = NSMutableAttributedString(string: discrBoldText, attributes:attrBold) | 143 | +// let sumBoldString = NSMutableAttributedString(string: discrBoldText, attributes:attrBold) |
144 | 144 | ||
145 | - sumAttributedString.append(sumBoldString) | 145 | +// sumAttributedString.append(sumBoldString) |
146 | - discriptionLabel.attributedText = sumAttributedString | 146 | +// discriptionLabel.attributedText = sumAttributedString |
147 | - // ======== | 147 | +// // ======== |
148 | 148 | ||
149 | // let barcodeString = constructBarcode(coupon: coupon) ?? "" | 149 | // let barcodeString = constructBarcode(coupon: coupon) ?? "" |
150 | let barcodeString = coupon?._barcode ?? "" | 150 | let barcodeString = coupon?._barcode ?? "" | ... | ... |
... | @@ -51,7 +51,7 @@ import UIKit | ... | @@ -51,7 +51,7 @@ import UIKit |
51 | func configureCell(coupon: swiftApi.UnifiedCouponModel) { | 51 | func configureCell(coupon: swiftApi.UnifiedCouponModel) { |
52 | let activeCoupons = coupon._coupons.filter { $0.status == 1 } | 52 | let activeCoupons = coupon._coupons.filter { $0.status == 1 } |
53 | let activeCouponsCount = activeCoupons.count | 53 | let activeCouponsCount = activeCoupons.count |
54 | - let activeCouponsDiscount = activeCoupons.reduce(0) { $0 + (Float($1.discount ?? "0") ?? 0) } | 54 | + // let activeCouponsDiscount = activeCoupons.reduce(0) { $0 + (Float($1.discount ?? "0") ?? 0) } |
55 | 55 | ||
56 | // var activeCouponsCount:Int = 0 | 56 | // var activeCouponsCount:Int = 0 |
57 | // for coupon in coupon._coupons { | 57 | // for coupon in coupon._coupons { |
... | @@ -67,7 +67,7 @@ import UIKit | ... | @@ -67,7 +67,7 @@ import UIKit |
67 | ( | 67 | ( |
68 | activeCouponsCount == 1 ? " ενεργό κουπόνι" : " ενεργά κουπόνια" | 68 | activeCouponsCount == 1 ? " ενεργό κουπόνι" : " ενεργά κουπόνια" |
69 | ) | 69 | ) |
70 | - + " αξίας " + String(activeCouponsDiscount) + "€" | 70 | + // + " αξίας " + String(activeCouponsDiscount) + "€" |
71 | 71 | ||
72 | if let earliestExpiration = activeCoupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) { | 72 | if let earliestExpiration = activeCoupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) { |
73 | expirationLabel.text = "Ισχύει έως " + (earliestExpiration.expiration ?? "") | 73 | expirationLabel.text = "Ισχύει έως " + (earliestExpiration.expiration ?? "") | ... | ... |
-
Please register or login to post a comment