|
|
@ -18,6 +18,12 @@ enum ReceiptType { |
|
|
|
case overseas |
|
|
|
} |
|
|
|
|
|
|
|
enum ReceiptParent { |
|
|
|
case sendMoney |
|
|
|
case notice |
|
|
|
case report |
|
|
|
} |
|
|
|
|
|
|
|
class SendMoneyReceiptViewController: UIViewController { |
|
|
|
|
|
|
|
// MARK: IBOutlets |
|
|
@ -38,6 +44,9 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
let payoutAmountText = "total_payout_amount_text".localized() |
|
|
|
let gmeControlNumberText = "jme_control_no_text".localized() |
|
|
|
let doneText = "done_text".localized() |
|
|
|
let headerSuccess = "send_money_success_header_text".localized() |
|
|
|
let bodySuccess = "send_money_success_body_text".localized() |
|
|
|
let footerSuccess = "send_money_success_footer_text".localized() |
|
|
|
} |
|
|
|
|
|
|
|
@IBOutlet weak var fullnameLabel: UILabel! |
|
|
@ -45,6 +54,17 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
@IBOutlet weak var controlNoInfoLabel: UILabel! |
|
|
|
@IBOutlet weak var transactionDateLabel: UILabel! |
|
|
|
@IBOutlet weak var infoView: UIView! |
|
|
|
@IBOutlet weak var infoViewSuccess: UIView! |
|
|
|
@IBOutlet weak var weReceivedLabelSuccess: UILabel! |
|
|
|
|
|
|
|
@IBOutlet weak var amountLabelSuccess: UILabel! |
|
|
|
|
|
|
|
@IBOutlet weak var makePaymentLabelSuccess: UILabel! |
|
|
|
|
|
|
|
@IBOutlet weak var chargeLabelSuccess: UILabel! |
|
|
|
|
|
|
|
@IBOutlet weak var toJmeLabelSuccess: UILabel! |
|
|
|
|
|
|
|
@IBOutlet weak var shadowView: UIView! |
|
|
|
@IBOutlet weak var exchangeRateLabel: UILabel! |
|
|
|
@IBOutlet weak var relationLabel: UILabel! |
|
|
@ -97,7 +117,7 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
var presenter: SendMoneyReceiptModuleInterface? |
|
|
|
weak var hudDelegate: HUDStatusDelegate? |
|
|
|
var shouldShowCancelAmmendButton = false |
|
|
|
var isFromTransactionHistory = false |
|
|
|
var receiptParent: ReceiptParent = .sendMoney |
|
|
|
var controlNo: String? |
|
|
|
var transactionId: String? |
|
|
|
var type: MailBoxType? |
|
|
@ -124,6 +144,9 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
self.setupNormalNavigation() |
|
|
|
self.setupBackButton() |
|
|
|
|
|
|
|
self.infoView.isHidden = self.receiptParent == .sendMoney |
|
|
|
self.infoViewSuccess.isHidden = self.receiptParent != .sendMoney |
|
|
|
|
|
|
|
switch receiptType { |
|
|
|
case .overseas: |
|
|
|
transactionDateContainerView.isHidden = false |
|
|
@ -148,15 +171,11 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
|
|
|
|
override func viewDidAppear(_ animated: Bool) { |
|
|
|
super.viewDidAppear(animated) |
|
|
|
|
|
|
|
// if !isFromTransactionHistory { |
|
|
|
// StoreReviewHelper.shared.checkAndAskForReview() |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
// MARK: IBActions |
|
|
|
@IBAction func done(_ sender: UIButton) { |
|
|
|
if (isFromTransactionHistory) { |
|
|
|
if self.receiptParent == .report { |
|
|
|
self.navigationController?.popViewController(animated: true) |
|
|
|
} else { |
|
|
|
self.navigationController?.popToRootViewController(animated: true) |
|
|
@ -184,12 +203,17 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
// all setup should be done here |
|
|
|
setupBackButton() |
|
|
|
configureLanguage() |
|
|
|
infoViewSuccess.layer.cornerRadius = 20 |
|
|
|
infoView.layer.cornerRadius = 20 |
|
|
|
requestToCancelButton.layer.cornerRadius = 20 |
|
|
|
requestToChangeButton.layer.cornerRadius = 20 |
|
|
|
} |
|
|
|
|
|
|
|
func configureLanguage() { |
|
|
|
self.weReceivedLabelSuccess.text = StringConstants().headerSuccess |
|
|
|
self.makePaymentLabelSuccess.text = StringConstants().headerSuccess |
|
|
|
self.toJmeLabelSuccess.text = StringConstants().footerSuccess |
|
|
|
|
|
|
|
self.transferSuccessfullTitleLabel.text = StringConstants().transferSuccessText |
|
|
|
self.tansactionDateTitleLabel.text = StringConstants().transactionDateText |
|
|
|
self.recieverTitleLabel.text = StringConstants().recieverText |
|
|
@ -264,7 +288,11 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
self.accountNoView.isHidden = accountNo == "" |
|
|
|
self.accountNoLabel.text = self.reciept?.accountNo |
|
|
|
self.relationLabel.text = self.reciept?.collAmount?.decimalToCurrency(as: .krw) |
|
|
|
self.transferFeeLabel.text = self.reciept?.serviceCharge?.decimalToCurrency(as: .krw) |
|
|
|
|
|
|
|
let charge = self.reciept?.serviceCharge?.decimalToCurrency(as: .krw) |
|
|
|
self.transferFeeLabel.text = charge |
|
|
|
self.chargeLabelSuccess.text = charge |
|
|
|
|
|
|
|
self.exchangeRateLabel.text = self.reciept?.exRate |
|
|
|
|
|
|
|
let controlNo = self.reciept?.controNo ?? "" |
|
|
@ -276,6 +304,7 @@ class SendMoneyReceiptViewController: UIViewController { |
|
|
|
|
|
|
|
self.totalAmountLabel.text = totalAmount |
|
|
|
self.totalAmountHeaderLabel.text = totalAmount |
|
|
|
self.amountLabelSuccess.text = totalAmount |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|