Browse Source

inbound uat test done

pull/1/head
InKwon James Kim 5 years ago
parent
commit
c0707b866a
  1. 2
      GME Remit/Models/Response/TransactionModel.swift
  2. 13
      GME Remit/Modules/RemittanceModules/InboundModules/InboundReceipt/User Interface/View/InboundReceipt.storyboard
  3. 27
      GME Remit/Modules/RemittanceModules/InboundModules/InboundReceipt/User Interface/View/InboundReceiptViewController.swift
  4. 1
      GME Remit/MultiLanguages/en.lproj/Localizable.strings

2
GME Remit/Models/Response/TransactionModel.swift

@ -52,6 +52,7 @@ class TransactionModel: Mappable {
var inboundSenderName: String? var inboundSenderName: String?
var inboundMobileNo: String? var inboundMobileNo: String?
var inboundControlNo: String? var inboundControlNo: String?
var inboundIsAccountReg: Bool?
required init?(map: Map) { required init?(map: Map) {
@ -80,5 +81,6 @@ class TransactionModel: Mappable {
inboundSenderName <- map["senderName"] inboundSenderName <- map["senderName"]
inboundMobileNo <- map["MobileNo"] inboundMobileNo <- map["MobileNo"]
inboundControlNo <- map["controlNo"] inboundControlNo <- map["controlNo"]
inboundIsAccountReg <- map["IsAccountReg"]
} }
} }

13
GME Remit/Modules/RemittanceModules/InboundModules/InboundReceipt/User Interface/View/InboundReceipt.storyboard

@ -159,7 +159,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="B0y-K9-Cr0"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="B0y-K9-Cr0">
<rect key="frame" x="30" y="166" width="295" height="36"/>
<rect key="frame" x="30" y="162.5" width="295" height="39.5"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yst-bw-KeH"> <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yst-bw-KeH">
<rect key="frame" x="0.0" y="0.0" width="295" height="20"/> <rect key="frame" x="0.0" y="0.0" width="295" height="20"/>
@ -177,13 +177,13 @@
<rect key="frame" x="78" y="0.0" width="139" height="20"/> <rect key="frame" x="78" y="0.0" width="139" height="20"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="IBK" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="PXk-kC-HgM"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="IBK" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="PXk-kC-HgM">
<rect key="frame" x="0.0" y="0.0" width="22.5" height="20"/>
<rect key="frame" x="0.0" y="0.0" width="27.5" height="20"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="110223458044" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ysv-FY-2Ev"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="110223458044" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ysv-FY-2Ev">
<rect key="frame" x="25.5" y="0.0" width="113.5" height="20"/>
<rect key="frame" x="30.5" y="0.0" width="108.5" height="20"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
@ -204,9 +204,9 @@
<constraint firstItem="CSj-Zu-3pe" firstAttribute="width" secondItem="izg-bz-vlD" secondAttribute="width" id="pqJ-Pc-LXc"/> <constraint firstItem="CSj-Zu-3pe" firstAttribute="width" secondItem="izg-bz-vlD" secondAttribute="width" id="pqJ-Pc-LXc"/>
</constraints> </constraints>
</stackView> </stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="You have to register account at GME" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dWC-PH-K0l">
<rect key="frame" x="0.0" y="22" width="295" height="14"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="You have to register account at GME" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dWC-PH-K0l">
<rect key="frame" x="0.0" y="22" width="295" height="17.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
@ -578,6 +578,7 @@
<outlet property="bankAccountLabel" destination="Ysv-FY-2Ev" id="H34-Hg-0eP"/> <outlet property="bankAccountLabel" destination="Ysv-FY-2Ev" id="H34-Hg-0eP"/>
<outlet property="bankAccountTitleLabel" destination="t1Y-8m-K81" id="Rd2-3W-Lnn"/> <outlet property="bankAccountTitleLabel" destination="t1Y-8m-K81" id="Rd2-3W-Lnn"/>
<outlet property="bankContentLabel" destination="TOM-qp-7zr" id="YDu-Tm-fD0"/> <outlet property="bankContentLabel" destination="TOM-qp-7zr" id="YDu-Tm-fD0"/>
<outlet property="bankMessageContainerView" destination="yst-bw-KeH" id="fNB-5L-ZqV"/>
<outlet property="bankNameLabel" destination="PXk-kC-HgM" id="Kjn-eX-nxt"/> <outlet property="bankNameLabel" destination="PXk-kC-HgM" id="Kjn-eX-nxt"/>
<outlet property="bankTitleLabel" destination="jrx-xv-i6r" id="ADu-g6-tdp"/> <outlet property="bankTitleLabel" destination="jrx-xv-i6r" id="ADu-g6-tdp"/>
<outlet property="buttonContainerView" destination="1OV-x4-AkU" id="UV7-rG-YnP"/> <outlet property="buttonContainerView" destination="1OV-x4-AkU" id="UV7-rG-YnP"/>

27
GME Remit/Modules/RemittanceModules/InboundModules/InboundReceipt/User Interface/View/InboundReceiptViewController.swift

@ -62,6 +62,7 @@ class InboundReceiptViewController: UIViewController {
@IBOutlet private weak var cancelButton: UIButton! @IBOutlet private weak var cancelButton: UIButton!
@IBOutlet private weak var registerButton: UIButton! @IBOutlet private weak var registerButton: UIButton!
@IBOutlet private weak var bankMessageContainerView: UIStackView!
@IBOutlet private weak var buttonContainerView: UIStackView! @IBOutlet private weak var buttonContainerView: UIStackView!
// MARK: VC's Life cycle // MARK: VC's Life cycle
override func viewDidLoad() { override func viewDidLoad() {
@ -109,7 +110,6 @@ extension InboundReceiptViewController {
registerButton.layer.cornerRadius = 5 registerButton.layer.cornerRadius = 5
DispatchQueue.main.async {[weak self] in DispatchQueue.main.async {[weak self] in
self?.messageTitleLabel.text = "you_have_to_register_text".localized()
self?.controlTitleLabel.text = "control_no_text".localized() self?.controlTitleLabel.text = "control_no_text".localized()
self?.transactionDateTitleLabel.text = "transaction_date_text".localized() self?.transactionDateTitleLabel.text = "transaction_date_text".localized()
self?.senderNameTitleLabel.text = "sender_name_text".localized() self?.senderNameTitleLabel.text = "sender_name_text".localized()
@ -172,23 +172,38 @@ extension InboundReceiptViewController {
output.model.map {BankEnum(rawValue: $0.inboundBankCode ?? "")?.ciImage} output.model.map {BankEnum(rawValue: $0.inboundBankCode ?? "")?.ciImage}
.drive(receiveBankImageView.rx.image).disposed(by: disposeBag) .drive(receiveBankImageView.rx.image).disposed(by: disposeBag)
output.model.map {$0.inboundIsAccountReg ?? true}
.drive(bankMessageContainerView.rx.isHidden).disposed(by: disposeBag)
output.model.map {$0.inboundIsAccountReg ?? true}
.drive(buttonContainerView.rx.isHidden).disposed(by: disposeBag)
Driver.combineLatest(output.model.map { $0.inboundIsAccountReg ?? true}, output.status)
.drive(onNext: {[weak self] in
switch $0.1 {
case .hold:
let message = ($0.0) ?
"transaction_will_be_processed_text".localized() : "you_have_to_register_text".localized()
self?.messageContainerView.isHidden = false
self?.messageTitleLabel.text = message
case .success, .cancel:
self?.messageContainerView.isHidden = true
}
}
).disposed(by: disposeBag)
output.status.drive(onNext: {[weak self] in output.status.drive(onNext: {[weak self] in
switch $0 { switch $0 {
case .success: case .success:
self?.statusTitleLabel.text = "transfer_success_text".localized() self?.statusTitleLabel.text = "transfer_success_text".localized()
self?.messageContainerView.isHidden = true
self?.senderToGMEProcess.isHidden = false self?.senderToGMEProcess.isHidden = false
self?.gmeToReceiverProcess.isHidden = false self?.gmeToReceiverProcess.isHidden = false
self?.buttonContainerView.isHidden = true
case .hold: case .hold:
self?.statusTitleLabel.text = "transfer_holding_text".localized() self?.statusTitleLabel.text = "transfer_holding_text".localized()
self?.messageContainerView.isHidden = false
self?.senderToGMEProcess.isHidden = false self?.senderToGMEProcess.isHidden = false
self?.gmeToReceiverProcess.isHidden = true self?.gmeToReceiverProcess.isHidden = true
self?.buttonContainerView.isHidden = false
case .cancel: case .cancel:
self?.statusTitleLabel.text = "transfer_canceled_text".localized() self?.statusTitleLabel.text = "transfer_canceled_text".localized()
self?.buttonContainerView.isHidden = true
} }
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
} }

1
GME Remit/MultiLanguages/en.lproj/Localizable.strings

@ -714,6 +714,7 @@
"transfer_holding_text" = "Transfer Holding"; "transfer_holding_text" = "Transfer Holding";
"transfer_canceled_text" = "Transfer Canceled"; "transfer_canceled_text" = "Transfer Canceled";
"you_have_to_register_text" = "You have to register account at GME"; "you_have_to_register_text" = "You have to register account at GME";
"transaction_will_be_processed_text" = "Transaction will be process soon";
"control_no_text" = "Control No."; "control_no_text" = "Control No.";
"sender_name_text" = "Sender Name"; "sender_name_text" = "Sender Name";
"received_amount_text" = "Received Amount"; "received_amount_text" = "Received Amount";

Loading…
Cancel
Save