Manos Chorianopoulos

add Active DFY coupon banner action

...@@ -885,12 +885,27 @@ ...@@ -885,12 +885,27 @@
885 <constraint firstAttribute="height" constant="80" id="TBq-qC-qmK"/> 885 <constraint firstAttribute="height" constant="80" id="TBq-qC-qmK"/>
886 </constraints> 886 </constraints>
887 </imageView> 887 </imageView>
888 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QDZ-s2-zNu">
889 + <rect key="frame" x="0.0" y="0.0" width="394" height="100"/>
890 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
891 + <state key="normal" title="Button"/>
892 + <buttonConfiguration key="configuration" style="plain" title="Button">
893 + <color key="baseForegroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
894 + </buttonConfiguration>
895 + <connections>
896 + <action selector="activeCodeButtonAction:" destination="pKQ-52-a1r" eventType="touchUpInside" id="pNP-1r-8Bh"/>
897 + </connections>
898 + </button>
888 </subviews> 899 </subviews>
889 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 900 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
890 <constraints> 901 <constraints>
891 <constraint firstItem="MCY-xv-vpg" firstAttribute="centerY" secondItem="zFT-By-XHL" secondAttribute="centerY" id="66I-ZK-UnP"/> 902 <constraint firstItem="MCY-xv-vpg" firstAttribute="centerY" secondItem="zFT-By-XHL" secondAttribute="centerY" id="66I-ZK-UnP"/>
892 <constraint firstAttribute="height" constant="100" id="7r0-fu-7H9"/> 903 <constraint firstAttribute="height" constant="100" id="7r0-fu-7H9"/>
904 + <constraint firstItem="QDZ-s2-zNu" firstAttribute="leading" secondItem="zFT-By-XHL" secondAttribute="leading" id="QSk-2b-h0O"/>
905 + <constraint firstItem="QDZ-s2-zNu" firstAttribute="top" secondItem="zFT-By-XHL" secondAttribute="top" id="UFH-fL-W9r"/>
906 + <constraint firstAttribute="trailing" secondItem="QDZ-s2-zNu" secondAttribute="trailing" id="XY1-C1-aaz"/>
893 <constraint firstAttribute="trailing" secondItem="xwu-AC-ij3" secondAttribute="trailing" constant="20" id="hig-xS-w4D"/> 907 <constraint firstAttribute="trailing" secondItem="xwu-AC-ij3" secondAttribute="trailing" constant="20" id="hig-xS-w4D"/>
908 + <constraint firstAttribute="bottom" secondItem="QDZ-s2-zNu" secondAttribute="bottom" id="kCH-kp-0Ee"/>
894 <constraint firstItem="MCY-xv-vpg" firstAttribute="leading" secondItem="zFT-By-XHL" secondAttribute="leading" constant="20" id="mKy-hw-qMm"/> 909 <constraint firstItem="MCY-xv-vpg" firstAttribute="leading" secondItem="zFT-By-XHL" secondAttribute="leading" constant="20" id="mKy-hw-qMm"/>
895 <constraint firstItem="xwu-AC-ij3" firstAttribute="centerY" secondItem="zFT-By-XHL" secondAttribute="centerY" id="rL7-sU-WdF"/> 910 <constraint firstItem="xwu-AC-ij3" firstAttribute="centerY" secondItem="zFT-By-XHL" secondAttribute="centerY" id="rL7-sU-WdF"/>
896 <constraint firstItem="xwu-AC-ij3" firstAttribute="leading" secondItem="MCY-xv-vpg" secondAttribute="trailing" constant="20" id="wp5-Po-R5O"/> 911 <constraint firstItem="xwu-AC-ij3" firstAttribute="leading" secondItem="MCY-xv-vpg" secondAttribute="trailing" constant="20" id="wp5-Po-R5O"/>
......
...@@ -381,6 +381,12 @@ import SwiftEventBus ...@@ -381,6 +381,12 @@ import SwiftEventBus
381 let vc = storyboard.instantiateViewController(withIdentifier: "LoyaltyAnalysisViewController") as! SwiftWarplyFramework.LoyaltyAnalysisViewController 381 let vc = storyboard.instantiateViewController(withIdentifier: "LoyaltyAnalysisViewController") as! SwiftWarplyFramework.LoyaltyAnalysisViewController
382 self.navigationController?.pushViewController(vc, animated: true) 382 self.navigationController?.pushViewController(vc, animated: true)
383 } 383 }
384 + @IBAction func activeCodeButtonAction(_ sender: Any) {
385 + print("Active DFY coupon banner Tapped!")
386 + let couponDetails = swiftApi.ActiveDFYCouponEventModel()
387 + couponDetails._isPressed = true
388 + SwiftEventBus.post("dfy_coupon_details", sender: couponDetails)
389 + }
384 390
385 } 391 }
386 392
......
...@@ -3480,6 +3480,24 @@ public class swiftApi { ...@@ -3480,6 +3480,24 @@ public class swiftApi {
3480 } 3480 }
3481 3481
3482 3482
3483 + public class ActiveDFYCouponEventModel {
3484 + private var isPressed: Bool
3485 +
3486 + public init() {
3487 + self.isPressed = false
3488 + }
3489 +
3490 + public var _isPressed: Bool {
3491 + get { // getter
3492 + return self.isPressed
3493 + }
3494 + set(newValue) { //setter
3495 + self.isPressed = newValue
3496 + }
3497 + }
3498 + }
3499 +
3500 +
3483 public class WarplyCCMSEnabledModel { 3501 public class WarplyCCMSEnabledModel {
3484 private var isActivated: Bool 3502 private var isActivated: Bool
3485 3503
......