From acaf32b914da64374ae0c92527cb9c8b67096794 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 9 May 2019 14:08:26 +0900 Subject: [PATCH] add payoutPartner field in SendMoneyBank model --- .../Model/SendMoneyPaymentModeModel.swift | 2 + .../View/SendMoneyPaymentMode.storyboard | 97 ++++++------------- .../SendMoneyPaymentModeViewController.swift | 7 +- 3 files changed, 37 insertions(+), 69 deletions(-) diff --git a/GMERemittance/Model/SendMoneyPaymentModeModel.swift b/GMERemittance/Model/SendMoneyPaymentModeModel.swift index 9e7e2f3c..47fd7107 100644 --- a/GMERemittance/Model/SendMoneyPaymentModeModel.swift +++ b/GMERemittance/Model/SendMoneyPaymentModeModel.swift @@ -84,6 +84,7 @@ class SendMoneyBank: Mappable { var accountValidationRequired: String? var payCurrency: [String]? var code: String? + var payoutPartner: String? init() { @@ -102,6 +103,7 @@ class SendMoneyBank: Mappable { payCurrency <- map["PayCurrency"] branches <- map["BranchList"] code <- map["Code"] + payoutPartner <- map["PayoutPartner"] } } diff --git a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard index 926deed4..2be7dcab 100644 --- a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard +++ b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentMode.storyboard @@ -35,8 +35,8 @@ - - + + @@ -159,7 +159,7 @@ - + @@ -203,90 +203,53 @@ - - - - - - - - - - - - - - - - - + - + + + - - - - + + + + + - - - - - - - + + + + diff --git a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift index 31977dbc..a6289c33 100644 --- a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift +++ b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift @@ -93,7 +93,11 @@ class SendMoneyPaymentModeViewController: UIViewController { var selectedBank: SendMoneyBank? { didSet { self.bankTextField.text = selectedBank?.name - + + if let payoutParter = self.selectedBank?.payoutPartner { + self.selectedPayoutMode?.payoutPartner = payoutParter + } + let shouldShowBranch = (self.selectedBank?.branchRequired ?? "false").lowercased() == "true" // self.branchStackView.isHidden = !shouldShowBranch if shouldShowBranch { @@ -219,7 +223,6 @@ class SendMoneyPaymentModeViewController: UIViewController { self.presenter?.validate(model: validationRequest) } } - } }