Manos Chorianopoulos

ProfileVC error fixes

......@@ -16,6 +16,7 @@ enum SectionType {
case profileHeader // ProfileHeaderTableViewCell (no items)
case profileQuestionnaire // ProfileQuestionnaireTableViewCell (no items)
case profileCouponFilters // ProfileCouponFiltersTableViewCell (no items)
case profileCoupon // ProfileCouponTableViewCell
case staticContent // Any cell that displays static content
}
......@@ -23,6 +24,7 @@ enum ItemType {
case campaigns // [CampaignItemModel]
case couponSets // [CouponSetItemModel]
case coupons // [CouponItemModel]
case offers // [OfferModel] - temporary, will migrate to dynamic coupons later
case filters // [CouponFilterModel]
case none // For sections with no items
}
......
......@@ -246,6 +246,7 @@ import UIKit
// Προτάσεις για εσένα
let forYouOffers = allOffers.filter { $0.category == "Προτάσεις για εσένα" }
forYouOffersSection = SectionModel(
sectionType: .myRewardsHorizontalCouponsets,
title: "Προτάσεις για εσένα",
items: forYouOffers,
itemType: .offers
......@@ -254,6 +255,7 @@ import UIKit
// Active Offers
let activeOffers = allOffers.filter { $0.active ?? false }
activeOffersSection = SectionModel(
sectionType: .profileCoupon,
title: "Ενεργά",
items: activeOffers,
itemType: .offers
......@@ -264,6 +266,7 @@ import UIKit
// Favorite Offers
let favoriteOffers = allOffers.filter { $0.isFavorite }
favoriteOffersSection = SectionModel(
sectionType: .profileCoupon,
title: "Αγαπημένα",
items: favoriteOffers,
itemType: .offers
......@@ -272,6 +275,7 @@ import UIKit
// Redeemed Offers
let redeemedOffers = allOffers.filter { $0.redeemed ?? false }
redeemedOffersSection = SectionModel(
sectionType: .profileCoupon,
title: "Εξαργυρωμένα",
items: redeemedOffers,
itemType: .offers
......