Manos Chorianopoulos

add openCouponset func

......@@ -2207,6 +2207,31 @@ public class swiftApi {
}
}
public func openCouponset(_ controller: UIViewController) -> Void {
for campaign in GlobalVariables.campaigns {
if (campaign._campaign_type == "coupon") {
let couponsetUuid = campaign._couponset
if (couponsetUuid != "") {
let couponsetsList = swiftApi().getCouponSetList()
for item in couponsetsList {
if (item.uuid == couponsetUuid) {
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as! SwiftWarplyFramework.CouponViewController
vc.couponset = item
controller.navigationController?.pushViewController(vc, animated: true)
break;
}
}
}
}
}
}
public func setCampaignList(_ campaigns: Array<CampaignItemModel>) -> Void {
// let userTag = self.getUserTag()
// var campaignsArray:Array<CampaignItemModel> = []
......