Manos Chorianopoulos

add Active DFY coupon banner action

......@@ -885,12 +885,27 @@
<constraint firstAttribute="height" constant="80" id="TBq-qC-qmK"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QDZ-s2-zNu">
<rect key="frame" x="0.0" y="0.0" width="394" height="100"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Button">
<color key="baseForegroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</buttonConfiguration>
<connections>
<action selector="activeCodeButtonAction:" destination="pKQ-52-a1r" eventType="touchUpInside" id="pNP-1r-8Bh"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="MCY-xv-vpg" firstAttribute="centerY" secondItem="zFT-By-XHL" secondAttribute="centerY" id="66I-ZK-UnP"/>
<constraint firstAttribute="height" constant="100" id="7r0-fu-7H9"/>
<constraint firstItem="QDZ-s2-zNu" firstAttribute="leading" secondItem="zFT-By-XHL" secondAttribute="leading" id="QSk-2b-h0O"/>
<constraint firstItem="QDZ-s2-zNu" firstAttribute="top" secondItem="zFT-By-XHL" secondAttribute="top" id="UFH-fL-W9r"/>
<constraint firstAttribute="trailing" secondItem="QDZ-s2-zNu" secondAttribute="trailing" id="XY1-C1-aaz"/>
<constraint firstAttribute="trailing" secondItem="xwu-AC-ij3" secondAttribute="trailing" constant="20" id="hig-xS-w4D"/>
<constraint firstAttribute="bottom" secondItem="QDZ-s2-zNu" secondAttribute="bottom" id="kCH-kp-0Ee"/>
<constraint firstItem="MCY-xv-vpg" firstAttribute="leading" secondItem="zFT-By-XHL" secondAttribute="leading" constant="20" id="mKy-hw-qMm"/>
<constraint firstItem="xwu-AC-ij3" firstAttribute="centerY" secondItem="zFT-By-XHL" secondAttribute="centerY" id="rL7-sU-WdF"/>
<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
let vc = storyboard.instantiateViewController(withIdentifier: "LoyaltyAnalysisViewController") as! SwiftWarplyFramework.LoyaltyAnalysisViewController
self.navigationController?.pushViewController(vc, animated: true)
}
@IBAction func activeCodeButtonAction(_ sender: Any) {
print("Active DFY coupon banner Tapped!")
let couponDetails = swiftApi.ActiveDFYCouponEventModel()
couponDetails._isPressed = true
SwiftEventBus.post("dfy_coupon_details", sender: couponDetails)
}
}
......
......@@ -3480,6 +3480,24 @@ public class swiftApi {
}
public class ActiveDFYCouponEventModel {
private var isPressed: Bool
public init() {
self.isPressed = false
}
public var _isPressed: Bool {
get { // getter
return self.isPressed
}
set(newValue) { //setter
self.isPressed = newValue
}
}
}
public class WarplyCCMSEnabledModel {
private var isActivated: Bool
......