|
@ -91,6 +91,8 @@ class SendMoneyExchangeRateViewController: UIViewController { |
|
|
private lazy var couponListTapGesture: UITapGestureRecognizer = UITapGestureRecognizer() |
|
|
private lazy var couponListTapGesture: UITapGestureRecognizer = UITapGestureRecognizer() |
|
|
|
|
|
|
|
|
private var plainSendingAmount: String? |
|
|
private var plainSendingAmount: String? |
|
|
|
|
|
var output: RecipientsPresenter? |
|
|
|
|
|
var viewModel: RecipientsViewModel? |
|
|
|
|
|
|
|
|
private var action: ActionBehaviour? { |
|
|
private var action: ActionBehaviour? { |
|
|
didSet { |
|
|
didSet { |
|
@ -182,7 +184,8 @@ class SendMoneyExchangeRateViewController: UIViewController { |
|
|
setup() |
|
|
setup() |
|
|
self.cardView.isHidden = true |
|
|
self.cardView.isHidden = true |
|
|
cardView.layer.cornerRadius = 10 |
|
|
cardView.layer.cornerRadius = 10 |
|
|
presenter?.getRewardPoint() |
|
|
|
|
|
|
|
|
self.showProgressHud() |
|
|
|
|
|
presenter?.getRewardPoint(receiverID: self.reciepient?.receiverID ?? "", isAccountValidationRequired: self.reciepient?.isAccountValidationRequired ?? "", payoutPartner: self.reciepient?.payoutPartner ?? "") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) { |
|
|
override func viewWillAppear(_ animated: Bool) { |
|
@ -460,10 +463,12 @@ class SendMoneyExchangeRateViewController: UIViewController { |
|
|
extension SendMoneyExchangeRateViewController: SendMoneyExchangeRateViewInterface { |
|
|
extension SendMoneyExchangeRateViewController: SendMoneyExchangeRateViewInterface { |
|
|
|
|
|
|
|
|
func show(model: SendMoneyExchangeRateModel) { |
|
|
func show(model: SendMoneyExchangeRateModel) { |
|
|
|
|
|
self.hideProgressHud() |
|
|
exchangeRateModel = model |
|
|
exchangeRateModel = model |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func show(error: String) { |
|
|
func show(error: String) { |
|
|
|
|
|
self.hideProgressHud() |
|
|
showExchangeRateInfomation(isHidden: false) |
|
|
showExchangeRateInfomation(isHidden: false) |
|
|
alert(type: .error, message: error) |
|
|
alert(type: .error, message: error) |
|
|
} |
|
|
} |
|
@ -477,11 +482,26 @@ extension SendMoneyExchangeRateViewController: SendMoneyExchangeRateViewInterfac |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func setError(with error: Error) { |
|
|
func setError(with error: Error) { |
|
|
|
|
|
self.hideProgressHud() |
|
|
alert(message: error.localizedDescription) |
|
|
alert(message: error.localizedDescription) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func show(model: RewardPointModel) { |
|
|
func show(model: RewardPointModel) { |
|
|
|
|
|
self.hideProgressHud() |
|
|
self.rewardPointModel = model |
|
|
self.rewardPointModel = model |
|
|
|
|
|
if model.showValidationdAlert == "Y" { |
|
|
|
|
|
self.gmeAlert(type:.error, |
|
|
|
|
|
title: "Validation failed", |
|
|
|
|
|
message: model.validationMsg, |
|
|
|
|
|
rightButtonTitle: "Proceed", |
|
|
|
|
|
leftButtonTitle: "Edit", rightButtonAction: { |
|
|
|
|
|
|
|
|
|
|
|
}, leftButtonAction: { |
|
|
|
|
|
if let reciepient = self.reciepient, let viewModel = self.viewModel { |
|
|
|
|
|
self.output?.openEditRecipient(who: reciepient, with: viewModel) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|