Manos Chorianopoulos

fix CouponsTableViewCell name, image

......@@ -42,13 +42,26 @@ import UIKit
func configureCell(coupon: swiftApi.CouponItemModel) {
// COUPONSET: desc, img_preview, name, terms
// COUPONSET: desc, img_preview, name, terms, merchant_uuid
// COUPON: coupon, expiration, discount, status
// MERCHANT: _img_preview,_admin_name
let merchantList:Array<swiftApi.MerchantModel> = swiftApi().getMerchantList()
let couponSetData: swiftApi.CouponSetItemModel? = coupon.couponset_data
couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
nameLabel.text = couponSetData?.name ?? ""
nameLabel.text = ""
for merchant in merchantList {
if (merchant._uuid == couponSetData?.merchant_uuid) {
couponImage.load(link: merchant._img_preview, placeholder: UIImage(), cache: URLCache())
nameLabel.text = merchant._admin_name
break;
}
}
// couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
// nameLabel.text = couponSetData?.name ?? ""
dicountLabel.text = (coupon.discount ?? "") + "€"
discriptionLabel.text = couponSetData?.short_description ?? ""
expirationLabel.text = "Ισχύει έως "+(coupon.expiration ?? "")
......