Manos Chorianopoulos

nonTelco popup in wallet

...@@ -58,6 +58,10 @@ import SwiftEventBus ...@@ -58,6 +58,10 @@ import SwiftEventBus
58 tableView.dataSource = self 58 tableView.dataSource = self
59 59
60 print("Active Gifts Count: " + String(coupons.count)) 60 print("Active Gifts Count: " + String(coupons.count))
61 +
62 + if ((profile != nil) && (profile?._nonTelco == true)) {
63 + showDialog("", "Παρακαλούμε πολύ πρόσθεσε τις συνδέσεις σου στην COSMOTE για να έχεις πρόσβαση στα προνόμια του νέου Loyalty προγράμματος της COSMOTE!");
64 + }
61 65
62 headerImage.image = UIImage(named: "ic_background_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) 66 headerImage.image = UIImage(named: "ic_background_circle", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
63 dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil) 67 dfyEarnImage.image = UIImage(named: "wallet_dfy_earn", in: Bundle(for: MyEmptyClass.self), compatibleWith: nil)
...@@ -330,6 +334,27 @@ import SwiftEventBus ...@@ -330,6 +334,27 @@ import SwiftEventBus
330 } 334 }
331 } 335 }
332 } 336 }
337 +
338 + // MARK: - Functions
339 + func showDialog(_ alertTitle: String, _ alertSubTitle: String) -> Void {
340 +
341 + let alert = UIAlertController(title: alertTitle, message: alertSubTitle, preferredStyle: .alert)
342 + alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
343 + switch action.style{
344 + case .default:
345 + self.navigationController?.popViewController(animated: true)
346 + self.dismiss(animated: true, completion: {})
347 +
348 + case .cancel:
349 + print("cancel")
350 +
351 + case .destructive:
352 + print("destructive")
353 +
354 + }
355 + }))
356 + self.present(alert, animated: true, completion: nil)
357 + }
333 358
334 // MARK: - Actions 359 // MARK: - Actions
335 @IBAction func qustionnaireButtonAction(_ sender: Any) { 360 @IBAction func qustionnaireButtonAction(_ sender: Any) {
......