Manos Chorianopoulos

add firebase, ccms, gifts events

...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 import UIKit 8 import UIKit
9 import RSBarcodes_Swift 9 import RSBarcodes_Swift
10 import AVFoundation 10 import AVFoundation
11 -import SwiftEventBus 11 +// import SwiftEventBus
12 12
13 @objc class CouponBarcodeViewController: UIViewController { 13 @objc class CouponBarcodeViewController: UIViewController {
14 @IBOutlet weak var backgroundImage: UIImageView! 14 @IBOutlet weak var backgroundImage: UIImageView!
...@@ -147,7 +147,7 @@ import SwiftEventBus ...@@ -147,7 +147,7 @@ import SwiftEventBus
147 @IBAction func redeemButtomAction(_ sender: Any) { 147 @IBAction func redeemButtomAction(_ sender: Any) {
148 // TODO: Add redeem action 148 // TODO: Add redeem action
149 149
150 - SwiftEventBus.post("couponBarcodeRedeem", sender: coupon) 150 + // SwiftEventBus.post("couponBarcodeRedeem", sender: coupon)
151 151
152 let alert = UIAlertController(title: "Το κουπόνι σου ενεργοποιήθηκε", message: "Μπορείς να το βρεις στην αρχική οθόνη της εφαρμογής και στην ενότητα ενεργά δώρα!", preferredStyle: .alert) 152 let alert = UIAlertController(title: "Το κουπόνι σου ενεργοποιήθηκε", message: "Μπορείς να το βρεις στην αρχική οθόνη της εφαρμογής και στην ενότητα ενεργά δώρα!", preferredStyle: .alert)
153 alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in 153 alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 // 6 //
7 7
8 import UIKit 8 import UIKit
9 -import SwiftEventBus 9 +// import SwiftEventBus
10 10
11 @objc class CouponViewController: UIViewController { 11 @objc class CouponViewController: UIViewController {
12 @IBOutlet weak var mainView: UIView! 12 @IBOutlet weak var mainView: UIView!
......
...@@ -83,7 +83,22 @@ extension CouponsViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -83,7 +83,22 @@ extension CouponsViewController: UITableViewDelegate, UITableViewDataSource{
83 83
84 public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 84 public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
85 85
86 - SwiftEventBus.post("couponBarcodePressed", sender: coupons[indexPath.row]) 86 + // SwiftEventBus.post("couponBarcodePressed", sender: coupons[indexPath.row])
87 +
88 + // firebase event
89 + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel()
90 + firebaseEvent._eventName = "abc"
91 + firebaseEvent.setParameter = ("1", "asd")
92 + SwiftEventBus.post("firebase", sender: firebaseEvent)
93 +
94 + // ccms event
95 + let ccms = swiftApi.LoyaltyContextualOfferModel()
96 + SwiftEventBus.post("ccms", sender: ccms)
97 +
98 + // gifts event
99 + let gift = swiftApi.LoyaltyGiftsForYouOfferClickEvent()
100 + gift._title = "testTitle"
101 + SwiftEventBus.post("gifts", sender: gift)
87 102
88 let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) 103 let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
89 let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! CouponBarcodeViewController 104 let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! CouponBarcodeViewController
......