Showing
2 changed files
with
16 additions
and
3 deletions
No preview for this file type
| ... | @@ -42,13 +42,26 @@ import UIKit | ... | @@ -42,13 +42,26 @@ import UIKit |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | func configureCell(coupon: swiftApi.CouponItemModel) { | 44 | func configureCell(coupon: swiftApi.CouponItemModel) { |
| 45 | -// COUPONSET: desc, img_preview, name, terms | 45 | +// COUPONSET: desc, img_preview, name, terms, merchant_uuid |
| 46 | // COUPON: coupon, expiration, discount, status | 46 | // COUPON: coupon, expiration, discount, status |
| 47 | +// MERCHANT: _img_preview,_admin_name | ||
| 48 | + | ||
| 49 | + let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList() | ||
| 47 | 50 | ||
| 48 | let couponSetData: swiftApi.CouponSetItemModel? = coupon.couponset_data | 51 | let couponSetData: swiftApi.CouponSetItemModel? = coupon.couponset_data |
| 49 | 52 | ||
| 50 | - couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) | 53 | + nameLabel.text = "" |
| 51 | - nameLabel.text = couponSetData?.name ?? "" | 54 | + |
| 55 | + for merchant in merchantList { | ||
| 56 | + if (merchant._uuid == couponSetData?.merchant_uuid) { | ||
| 57 | + couponImage.load(link: merchant._img_preview, placeholder: UIImage(), cache: URLCache()) | ||
| 58 | + nameLabel.text = merchant._admin_name | ||
| 59 | + break; | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | +// couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) | ||
| 64 | +// nameLabel.text = couponSetData?.name ?? "" | ||
| 52 | dicountLabel.text = (coupon.discount ?? "") + "€" | 65 | dicountLabel.text = (coupon.discount ?? "") + "€" |
| 53 | discriptionLabel.text = couponSetData?.short_description ?? "" | 66 | discriptionLabel.text = couponSetData?.short_description ?? "" |
| 54 | expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "") | 67 | expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "") | ... | ... |
-
Please register or login to post a comment