Browse Source

add coupon name

pull/1/head
InKwon James Kim 5 years ago
parent
commit
6408eac878
  1. 2
      GMERemittance/Model/SendMoneyExchangeRate.swift
  2. 9
      GMERemittance/Model/SendMoneyReciept.swift
  3. 116
      GMERemittance/Module/ResendExchange/User Interface/View/ResendExchange.storyboard
  4. 47
      GMERemittance/Module/ResendExchange/User Interface/View/ResendExchangeViewController.swift
  5. 2
      GMERemittance/Module/SendMoney/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRate.storyboard
  6. 6
      GMERemittance/Module/SendMoney/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift
  7. 45
      GMERemittance/Module/SendMoney/SendMoneyReceipt/User Interface/View/SendMoneyReceipt.storyboard
  8. 18
      GMERemittance/Module/SendMoney/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift

2
GMERemittance/Model/SendMoneyExchangeRate.swift

@ -25,6 +25,7 @@ class SendMoneyExchangeRateModel: Mappable {
var schemeId: String?
var couponType: String?
var couponName: String?
var discountType: String?
var discountPercent: String?
var discountValue: String?
@ -49,6 +50,7 @@ class SendMoneyExchangeRateModel: Mappable {
reciepientCurrency <- map["pCurr"]
schemeId <- map["schemeId"]
couponType <- map["couponType"]
couponName <- map["couponName"]
discountType <- map["discountType"]
discountPercent <- map["discountPercent"]
discountValue <- map["discountValue"]

9
GMERemittance/Model/SendMoneyReciept.swift

@ -31,6 +31,10 @@ class SendMoneyReciept: Mappable {
var payoutAmount: String?
var transactionId: String?
var discountPercent: String?
var couponName: String?
var discountType: String?
var discountValue: String?
func mapping(map: Map) {
paymentMethod <- map["payOutMode"]
@ -52,6 +56,11 @@ class SendMoneyReciept: Mappable {
exRate <- map["exRate"]
serviceCharge <- map["serviceCharge"]
payoutAmount <- map["payOutAmount"]
discountPercent <- map["discountPercent"]
couponName <- map["couponName"]
discountType <- map["discountType"]
discountValue <- map["discountValue"]
}
init() {

116
GMERemittance/Module/ResendExchange/User Interface/View/ResendExchange.storyboard

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -13,6 +13,9 @@
<array key="SanFranciscoDisplay-Bold.otf">
<string>SanFranciscoDisplay-Bold</string>
</array>
<array key="SanFranciscoDisplay-Medium.otf">
<string>SanFranciscoDisplay-Medium</string>
</array>
<array key="SanFranciscoDisplay-Regular.otf">
<string>SanFranciscoDisplay-Regular</string>
</array>
@ -36,7 +39,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="0dp-2J-x5o">
<rect key="frame" x="10" y="20" width="355" height="226"/>
<rect key="frame" x="10" y="20" width="355" height="285"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="QGT-uB-WH5">
<rect key="frame" x="0.0" y="0.0" width="355" height="70"/>
@ -80,7 +83,7 @@
<rect key="frame" x="222" y="0.0" width="125" height="70"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="3QA-ou-Zac">
<rect key="frame" x="24" y="22" width="77" height="26"/>
<rect key="frame" x="25.5" y="22" width="74" height="26"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Korea" translatesAutoresizingMaskIntoConstraints="NO" id="vZD-fe-l60">
<rect key="frame" x="0.0" y="0.0" width="26" height="26"/>
@ -90,7 +93,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fWD-kn-5nM">
<rect key="frame" x="36" y="0.0" width="41" height="26"/>
<rect key="frame" x="36" y="0.0" width="38" height="26"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
@ -121,14 +124,14 @@
<constraint firstAttribute="height" constant="70" id="7bz-Ac-p8S"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="AFY-c1-G3T">
<rect key="frame" x="0.0" y="90" width="355" height="46"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="AFY-c1-G3T">
<rect key="frame" x="0.0" y="90" width="355" height="105"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gUz-OR-U8R">
<rect key="frame" x="0.0" y="0.0" width="355" height="20.5"/>
<rect key="frame" x="0.0" y="0.0" width="355" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p6j-Bv-gbe">
<rect key="frame" x="0.0" y="0.0" width="10" height="20.5"/>
<rect key="frame" x="0.0" y="0.0" width="10" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="CDs-Lk-Zzo"/>
</constraints>
@ -137,23 +140,34 @@
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="ZOr-JN-fja">
<rect key="frame" x="10" y="0.0" width="345" height="20.5"/>
<rect key="frame" x="10" y="0.0" width="345" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="QL4-sy-IsQ">
<rect key="frame" x="0.0" y="0.0" width="345" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" - (Transfer Fees Included" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PoS-xP-r27">
<rect key="frame" x="0.0" y="0.0" width="345" height="20.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text=" - (Transfer Fees Included" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PoS-xP-r27">
<rect key="frame" x="0.0" y="0.0" width="126.5" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bs7-Yq-c6D">
<rect key="frame" x="131.5" y="0.0" width="213.5" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<color key="textColor" red="0.92941176469999998" green="0.1058823529" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="shr-2X-JiH">
<rect key="frame" x="0.0" y="25.5" width="355" height="20.5"/>
<rect key="frame" x="0.0" y="55" width="355" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Djh-8V-b3T">
<rect key="frame" x="0.0" y="0.0" width="10" height="20.5"/>
<rect key="frame" x="0.0" y="0.0" width="10" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="6da-cM-UmC"/>
</constraints>
@ -162,10 +176,10 @@
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="2Bk-Q8-XyZ">
<rect key="frame" x="10" y="0.0" width="345" height="20.5"/>
<rect key="frame" x="10" y="0.0" width="345" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" - (Transfer Fees Included" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lpd-5g-qAX">
<rect key="frame" x="0.0" y="0.0" width="345" height="20.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
@ -178,7 +192,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="txz-Z2-j95">
<rect key="frame" x="0.0" y="156" width="355" height="70"/>
<rect key="frame" x="0.0" y="215" width="355" height="70"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gsA-E3-L0L">
<rect key="frame" x="0.0" y="0.0" width="355" height="70"/>
@ -222,7 +236,7 @@
<rect key="frame" x="0.0" y="0.0" width="125" height="70"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Js4-zb-lBt">
<rect key="frame" x="24" y="22" width="77" height="26"/>
<rect key="frame" x="25.5" y="22" width="74" height="26"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Korea" translatesAutoresizingMaskIntoConstraints="NO" id="lZL-MP-MUI">
<rect key="frame" x="0.0" y="0.0" width="26" height="26"/>
@ -232,7 +246,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VUq-zy-pIx">
<rect key="frame" x="36" y="0.0" width="41" height="26"/>
<rect key="frame" x="36" y="0.0" width="38" height="26"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
@ -271,8 +285,61 @@
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="aVs-rM-SYo">
<rect key="frame" x="0.0" y="325" width="375" height="61"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ECn-wb-YfD" userLabel="SeperateLine">
<rect key="frame" x="0.0" y="0.0" width="375" height="0.5"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="gF1-sq-iad"/>
</constraints>
</view>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WsD-fc-aOd">
<rect key="frame" x="0.0" y="0.5" width="375" height="60"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Coupon" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="psE-sT-Yzp">
<rect key="frame" x="20" y="20" width="58.5" height="20.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_dropdownSmall" translatesAutoresizingMaskIntoConstraints="NO" id="gBh-Uo-KUG">
<rect key="frame" x="335" y="20" width="20" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="VmP-4i-kc7"/>
<constraint firstAttribute="height" constant="20" id="yyo-o8-4EG"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hRM-mM-wmf">
<rect key="frame" x="317.5" y="22" width="7.5" height="16"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="gBh-Uo-KUG" firstAttribute="centerY" secondItem="WsD-fc-aOd" secondAttribute="centerY" id="eSp-yz-Aoh"/>
<constraint firstItem="gBh-Uo-KUG" firstAttribute="leading" secondItem="hRM-mM-wmf" secondAttribute="trailing" constant="10" id="jgZ-aA-7M4"/>
<constraint firstAttribute="trailing" secondItem="gBh-Uo-KUG" secondAttribute="trailing" constant="20" id="kO4-kR-pAx"/>
<constraint firstItem="psE-sT-Yzp" firstAttribute="centerY" secondItem="WsD-fc-aOd" secondAttribute="centerY" id="qnT-oo-aLH"/>
<constraint firstItem="hRM-mM-wmf" firstAttribute="centerY" secondItem="WsD-fc-aOd" secondAttribute="centerY" id="rxw-YV-eec"/>
<constraint firstAttribute="height" constant="60" id="um8-iD-V7v"/>
<constraint firstItem="psE-sT-Yzp" firstAttribute="leading" secondItem="WsD-fc-aOd" secondAttribute="leading" constant="20" id="uwJ-Yg-MqV"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5cT-hd-4W7" userLabel="SeperateLine">
<rect key="frame" x="0.0" y="60.5" width="375" height="0.5"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="5ks-Gz-kJW"/>
</constraints>
</view>
</subviews>
</stackView>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lj4-R8-JCO">
<rect key="frame" x="87.5" y="270" width="200" height="50"/>
<rect key="frame" x="87.5" y="406" width="200" height="50"/>
<color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="Pc3-2B-fh6"/>
@ -295,10 +362,13 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="lj4-R8-JCO" firstAttribute="centerX" secondItem="ORT-Zx-YgH" secondAttribute="centerX" id="1rQ-Te-Tc2"/>
<constraint firstItem="lj4-R8-JCO" firstAttribute="top" secondItem="0dp-2J-x5o" secondAttribute="bottom" constant="24" id="AS6-JU-Kqq"/>
<constraint firstItem="aVs-rM-SYo" firstAttribute="top" secondItem="0dp-2J-x5o" secondAttribute="bottom" constant="20" id="2mG-ew-9XU"/>
<constraint firstAttribute="trailing" secondItem="0dp-2J-x5o" secondAttribute="trailing" constant="10" id="XpX-rY-Tkz"/>
<constraint firstItem="aVs-rM-SYo" firstAttribute="leading" secondItem="ORT-Zx-YgH" secondAttribute="leading" id="a5U-fJ-zR1"/>
<constraint firstItem="0dp-2J-x5o" firstAttribute="top" secondItem="ORT-Zx-YgH" secondAttribute="top" constant="20" id="cra-Vv-yvJ"/>
<constraint firstAttribute="trailing" secondItem="aVs-rM-SYo" secondAttribute="trailing" id="inU-WK-9h8"/>
<constraint firstItem="0dp-2J-x5o" firstAttribute="leading" secondItem="ORT-Zx-YgH" secondAttribute="leading" constant="10" id="qPu-pO-RIt"/>
<constraint firstItem="lj4-R8-JCO" firstAttribute="top" secondItem="aVs-rM-SYo" secondAttribute="bottom" constant="20" id="uvf-Rj-gan"/>
</constraints>
</view>
</subviews>
@ -331,6 +401,9 @@
<outlet property="countryCodeLabel" destination="VUq-zy-pIx" id="SFm-9W-HMx"/>
<outlet property="countryFlagImage" destination="lZL-MP-MUI" id="7mc-z6-Ush"/>
<outlet property="countryListStackView" destination="mh1-Er-p1u" id="LoB-Hw-hj9"/>
<outlet property="couponDropDownImageView" destination="gBh-Uo-KUG" id="9y9-0M-3gM"/>
<outlet property="couponNameLabel" destination="hRM-mM-wmf" id="4AC-fk-9sS"/>
<outlet property="couponValueLabel" destination="bs7-Yq-c6D" id="RGA-mt-84X"/>
<outlet property="exchangeBackground1" destination="dAt-Rq-Gck" id="1zO-bH-rdx"/>
<outlet property="exchangeBackground2" destination="gsA-E3-L0L" id="o7l-Uc-dCS"/>
<outlet property="exchangeInfoStackView" destination="AFY-c1-G3T" id="8ro-yb-2wQ"/>
@ -367,6 +440,7 @@
</scenes>
<resources>
<image name="Korea" width="40" height="40"/>
<image name="ic_dropdownSmall" width="6" height="3"/>
</resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</document>

47
GMERemittance/Module/ResendExchange/User Interface/View/ResendExchangeViewController.swift

@ -33,7 +33,9 @@ class ResendExchangeViewController: UIViewController {
@IBOutlet weak var youSendTitleLabel: UILabel!
@IBOutlet weak var recipientGetsTitleLabel: UILabel!
@IBOutlet weak var couponValueLabel: UILabel!
@IBOutlet weak var couponNameLabel: UILabel!
@IBOutlet weak var couponDropDownImageView: UIImageView!
// MARK: Properties
@ -66,6 +68,9 @@ class ResendExchangeViewController: UIViewController {
let exchangeRate = self.exchangeRateModel?.exchangeRate ?? ""
self.exchangeRateLabel.text = exchangeRate + " (" + "current_exchange_rate_text".localized() + ")"
self.countryCodeLabel.text = exchangeRateModel?.reciepientCurrency
setCoupon()
UIView.animate(withDuration: 0.33) {
self.transferFeeInfoLabel.isHidden = false
self.exchangeRateLabel.isHidden = false
@ -148,6 +153,12 @@ class ResendExchangeViewController: UIViewController {
self.recipientGetsTitleLabel.text = "recepient_gets_text".localized()
self.youSendTitleLabel.text = "you_send_text".localized()
let dropDownImage = #imageLiteral(resourceName: "dropdown_white").withRenderingMode(UIImageRenderingMode.alwaysTemplate)
couponDropDownImageView.image = dropDownImage
couponDropDownImageView.tintColor = AppConstants.themeRedColor
couponNameLabel.text = "0"
couponValueLabel.text = ""
}
@ -172,6 +183,28 @@ class ResendExchangeViewController: UIViewController {
}
}
private func setCoupon(){
if exchangeRateModel?.schemeId != nil,
let couponName = exchangeRateModel?.couponName,
let discountType = exchangeRateModel?.discountType {
let discountRate = exchangeRateModel?.discountPercent ?? "0"
let discountValue = exchangeRateModel?.discountValue ?? "0"
switch discountType {
case "1": // Percent
couponNameLabel.text = "\(couponName)(\(discountRate)%)"
couponValueLabel.text = "-\(discountValue) KRW"
case "2": // Value
couponNameLabel.text = "\(couponName)(\(discountValue) KRW)"
couponValueLabel.text = "-\(discountValue) KRW"
default:
couponNameLabel.text = "0"
couponValueLabel.text = ""
}
}
}
func convertReciepient(model: ResendReceiver) -> Recipient {
var reciepient = Recipient()
reciepient.firstName = model.rFullName
@ -194,9 +227,9 @@ class ResendExchangeViewController: UIViewController {
/* SendMoneyPayoutMode */
// "deliveryMethodId": model.paymemtMode?.id ?? "",
// "payOutPartner": model.paymemtMode?.payoutPartner ?? "",
// "ReceiverAccountNo": model.paymemtMode?.accountNumber ?? "",
// "deliveryMethodId": model.paymemtMode?.id ?? "",
// "payOutPartner": model.paymemtMode?.payoutPartner ?? "",
// "ReceiverAccountNo": model.paymemtMode?.accountNumber ?? "",
let paymentMode = SendMoneyPayoutMode()
@ -208,7 +241,7 @@ class ResendExchangeViewController: UIViewController {
/* SendMoneyBank */
// "pAgent": model.bank?.id ?? "",
// "pAgent": model.bank?.id ?? "",
let bank = SendMoneyBank()
bank.id = self.resendInfoModel?.remitDetial?.PAgent
@ -216,8 +249,8 @@ class ResendExchangeViewController: UIViewController {
model.bank = bank
/* SendMoneyBankBranch */
// branch
// "pBranch": model.branch?.id ?? "",
// branch
// "pBranch": model.branch?.id ?? "",
let branch = SendMoneyBankBranch()
branch.id = self.resendInfoModel?.remitDetial?.PBranch
model.branch = branch

2
GMERemittance/Module/SendMoney/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRate.storyboard

@ -152,7 +152,7 @@
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZJk-do-i2p">
<rect key="frame" x="151.5" y="0.0" width="203.5" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="13"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<color key="textColor" red="0.92941176469999998" green="0.1058823529" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>

6
GMERemittance/Module/SendMoney/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift

@ -173,16 +173,18 @@ class SendMoneyExchangeRateViewController: UIViewController {
private func setCoupon(){
if exchangeRateModel?.schemeId != nil,
let couponName = exchangeRateModel?.couponName,
let discountType = exchangeRateModel?.discountType {
let discountRate = exchangeRateModel?.discountPercent ?? "0"
let discountValue = exchangeRateModel?.discountValue ?? "0"
switch discountType {
case "1": // Percent
couponNameLabel.text = "\("service_charge_text".localized()) -\(discountRate)%"
couponNameLabel.text = "\(couponName)(\(discountRate)%)"
couponValueLabel.text = "-\(discountValue) KRW"
case "2": // Value
couponNameLabel.text = "\("service_charge_text".localized()) -\(discountValue) KRW"
couponNameLabel.text = "\(couponName)(\(discountValue) KRW)"
couponValueLabel.text = "-\(discountValue) KRW"
default:
couponNameLabel.text = "0"

45
GMERemittance/Module/SendMoney/SendMoneyReceipt/User Interface/View/SendMoneyReceipt.storyboard

@ -42,7 +42,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="910"/>
<subviews>
<view contentMode="scaleToFill" placeholderIntrinsicWidth="375" placeholderIntrinsicHeight="894.5" translatesAutoresizingMaskIntoConstraints="NO" id="WYP-Q8-sI7">
<rect key="frame" x="0.0" y="0.0" width="375" height="894.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="946"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rub-fY-JfS">
<rect key="frame" x="10" y="12" width="355" height="222"/>
@ -206,10 +206,10 @@ Share with concerned party only</string>
</userDefinedRuntimeAttributes>
</view>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fKI-eb-ZTN">
<rect key="frame" x="10" y="291" width="355" height="513.5"/>
<rect key="frame" x="10" y="291" width="355" height="565"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="1.5" translatesAutoresizingMaskIntoConstraints="NO" id="N4e-L0-lEA">
<rect key="frame" x="0.0" y="0.0" width="355" height="513.5"/>
<rect key="frame" x="0.0" y="0.0" width="355" height="565"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P8E-dB-3bF">
<rect key="frame" x="0.0" y="0.0" width="355" height="50"/>
@ -478,8 +478,37 @@ Share with concerned party only</string>
<constraint firstAttribute="bottom" secondItem="p5h-cX-mhA" secondAttribute="bottom" id="bCl-nK-sKK"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Hzj-s4-Pz9">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2P3-eK-NLt">
<rect key="frame" x="0.0" y="412" width="355" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="SYa-o4-Mha">
<rect key="frame" x="13" y="0.0" width="329" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Used Coupon" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ncx-dc-Qlg" userLabel="Agent">
<rect key="frame" x="0.0" y="0.0" width="149" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="birthday(-20%)" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PP3-Tg-vui">
<rect key="frame" x="151" y="0.0" width="178" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="0.84999999999999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="SYa-o4-Mha" firstAttribute="top" secondItem="2P3-eK-NLt" secondAttribute="top" id="4OJ-CN-zjR"/>
<constraint firstItem="SYa-o4-Mha" firstAttribute="leading" secondItem="2P3-eK-NLt" secondAttribute="leading" constant="13" id="5Ip-SG-EQB"/>
<constraint firstAttribute="trailing" secondItem="SYa-o4-Mha" secondAttribute="trailing" constant="13" id="V5I-ac-3xm"/>
<constraint firstAttribute="bottom" secondItem="SYa-o4-Mha" secondAttribute="bottom" id="WcI-RZ-EN9"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Hzj-s4-Pz9">
<rect key="frame" x="0.0" y="463.5" width="355" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="7XD-gU-m2o">
<rect key="frame" x="13" y="0.0" width="329" height="50"/>
@ -508,7 +537,7 @@ Share with concerned party only</string>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fMD-Tq-Dwt">
<rect key="frame" x="0.0" y="463.5" width="355" height="50"/>
<rect key="frame" x="0.0" y="515" width="355" height="50"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="yct-cx-mP3">
<rect key="frame" x="13" y="0.0" width="329" height="50"/>
@ -553,7 +582,7 @@ Share with concerned party only</string>
</userDefinedRuntimeAttributes>
</view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="PMG-MW-2Jh">
<rect key="frame" x="10" y="824.5" width="355" height="40"/>
<rect key="frame" x="10" y="876" width="355" height="40"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CVW-u5-4q0">
<rect key="frame" x="0.0" y="0.0" width="172.5" height="40"/>
@ -593,7 +622,7 @@ Share with concerned party only</string>
</constraints>
</stackView>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vlt-YJ-pwY">
<rect key="frame" x="87.5" y="824.5" width="200" height="50"/>
<rect key="frame" x="87.5" y="876" width="200" height="50"/>
<color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="200" id="Cb6-zf-RuS"/>
@ -687,6 +716,8 @@ Share with concerned party only</string>
<outlet property="transactionReportButtonStackView" destination="PMG-MW-2Jh" id="ORN-l5-YsL"/>
<outlet property="transferFeeLabel" destination="5Mm-Rr-tjC" id="rnt-2u-HXK"/>
<outlet property="transferSuccessfullTitleLabel" destination="JkE-DM-feU" id="qBu-N3-Xdg"/>
<outlet property="usedCouponLabel" destination="PP3-Tg-vui" id="U6N-oQ-9Wc"/>
<outlet property="usedCouponTitleLabel" destination="ncx-dc-Qlg" id="Qc4-PE-JvX"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b3B-PU-UlH" userLabel="First Responder" sceneMemberID="firstResponder"/>

18
GMERemittance/Module/SendMoney/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift

@ -78,6 +78,8 @@ class SendMoneyReceiptViewController: UIViewController {
@IBOutlet weak var exRateTitleLabel: UILabel!
@IBOutlet weak var totalPayoutAmountTitleLabel: UILabel!
@IBOutlet weak var usedCouponTitleLabel: UILabel!
@IBOutlet weak var usedCouponLabel: UILabel!
// MARK: Properties
@ -220,9 +222,23 @@ class SendMoneyReceiptViewController: UIViewController {
let controlNo = self.reciept?.controNo ?? ""
self.gmeControlNumberLabel.text = StringConstants().gmeControlNumberText + ": " + controlNo
let totalAmount = self.reciept?.payoutAmount ?? ""
// let _totalAmt = Utility.getCommaSeperatedString(numberString: totalAmount) ?? ""
// let _totalAmt = Utility.getCommaSeperatedString(numberString: totalAmount) ?? ""
self.totalAmountLabel.text = totalAmount
self.totalAmountHeaderLabel.text = StringConstants().totalPayoutAmountText + ": \(totalAmount)"
//Coupon setting couponName(couponValue or discountPercent)
guard
let couponType = reciept?.discountType,
couponType != "",
let couponName = reciept?.couponName,
couponName != ""
else {
usedCouponLabel.text = "N/A"
return
}
usedCouponLabel.text = couponType == "1" ? "\(couponName)(\(reciept?.discountPercent ?? "0")%)" : "\(couponName)(\(reciept?.discountValue ?? "0") KRW)"
}
}

Loading…
Cancel
Save