From 8e7aad1a22fd56bda79367799c6e27f549889ce9 Mon Sep 17 00:00:00 2001 From: InKwon James Kim Date: Wed, 28 Aug 2019 19:04:02 +0900 Subject: [PATCH] edit validate condition of fields --- .../View/AutoDebitViewController.swift | 2 +- .../View/ExchangeRateCollectionViewCell.swift | 2 +- .../View/ExchangeRatesViewController.swift | 2 +- .../View/ForgotPassword.storyboard | 6 +- .../View/ForgotPasswordViewController.swift | 2 +- .../User Interface/View/Login.storyboard | 12 +- .../View/LoginViewController.swift | 2 +- .../ProfileChangePasswordViewController.swift | 2 +- .../View/Cell/RecipientCell.swift | 12 +- .../User Interface/View/Recipients.storyboard | 37 ++--- .../View/RecipientsViewController.swift | 22 +-- .../Model/Response/DynamicFieldModel.swift | 8 +- .../View/SetupRecipient.storyboard | 44 +++--- .../View/SetupRecipientViewController.swift | 130 +++++++++++++----- .../Wireframe/SetupRecipientWireframe.swift | 24 ++-- .../View/kycForm1ViewController.swift | 2 +- .../View/kycForm2ViewController.swift | 2 +- .../View/kycForm3ViewController.swift | 4 +- .../View/PennyTestViewController.swift | 2 +- .../View/PennyTestSubmitViewController.swift | 4 +- .../View/RegisterViewController.swift | 2 +- .../View/DetailOrderViewController.swift | 2 +- .../User Interface/View/Cell/OrderCell.swift | 2 +- .../View/OrderHistoryViewController.swift | 2 +- .../View/RedeemViewController.swift | 2 +- .../Cell/RewardItemCollectionViewCell.swift | 2 +- .../View/PaymentSelectionViewController.swift | 6 +- .../View/SelectCouponViewController.swift | 2 +- .../View/SendMoneyCodeViewController.swift | 4 +- .../SendMoneyExchangeRateViewController.swift | 10 +- .../BankBranchPickerViewController.swift | 4 +- .../BankPicker/BankPickerViewController.swift | 4 +- .../View/SendMoneyReceipt.storyboard | 121 +++++++--------- .../View/SendMoneyReceiptViewController.swift | 22 ++- .../SendMoneyVerificationViewController.swift | 16 ++- .../AutoRefundsViewController.swift | 2 +- .../View/SplashScreenViewController.swift | 8 +- .../en.lproj/Localizable.strings | 56 +++++++- .../View/Cell/AddressTableViewCell.swift | 2 +- .../View/TablePresenterViewController.swift | 4 +- 40 files changed, 351 insertions(+), 243 deletions(-) diff --git a/GME Remit/Modules/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift b/GME Remit/Modules/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift index d902dbd2..a3512def 100644 --- a/GME Remit/Modules/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift +++ b/GME Remit/Modules/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift @@ -89,7 +89,7 @@ class AutoDebitViewController: UIViewController { setupDelegates() - viewAddAccount.layer.cornerRadius = 10 + viewAddAccount.layer.cornerRadius = 5 if self.presentingViewController == nil { self.navigationItem.leftBarButtonItem = nil diff --git a/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRateCollectionViewCell.swift b/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRateCollectionViewCell.swift index bfb8eb62..6f28fdc4 100644 --- a/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRateCollectionViewCell.swift +++ b/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRateCollectionViewCell.swift @@ -24,7 +24,7 @@ class ExchangeRateCollectionViewCell: UICollectionViewCell { self.imageview.image = image self.paymentLabel.text = paymentServiceMethod?.subtitle self.subtitleLabel.text = "" - cellBackgroundview.layer.cornerRadius = 10 + cellBackgroundview.layer.cornerRadius = 5 cellSelected ? showBorderColor() : hideBorderColor() } diff --git a/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift b/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift index eca68ffe..cb1a1d87 100644 --- a/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift +++ b/GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift @@ -596,7 +596,7 @@ class ExchangeRatesViewController: UIViewController { }) setupLanguage() - executeButton.layer.cornerRadius = 10 + executeButton.layer.cornerRadius = 5 executeButton.backgroundColor = .themeRed senderTextField.textColor = .themeRed reciepientTextField.textColor = .themeRed diff --git a/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPassword.storyboard b/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPassword.storyboard index e93c4419..e043de74 100644 --- a/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPassword.storyboard +++ b/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPassword.storyboard @@ -63,12 +63,12 @@ - + - + - + diff --git a/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift b/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift index 829d8045..ee844cb4 100644 --- a/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift +++ b/GME Remit/Modules/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift @@ -68,7 +68,7 @@ class ForgotPasswordViewController: UIViewController { return self.isValid } } - resetButton.layer.cornerRadius = 10 + resetButton.layer.cornerRadius = 5 } func configureLanguage() { diff --git a/GME Remit/Modules/Login/User Interface/View/Login.storyboard b/GME Remit/Modules/Login/User Interface/View/Login.storyboard index 89c49b20..d598a03e 100644 --- a/GME Remit/Modules/Login/User Interface/View/Login.storyboard +++ b/GME Remit/Modules/Login/User Interface/View/Login.storyboard @@ -36,12 +36,12 @@ - + - + - + @@ -51,7 +51,7 @@ - + @@ -63,7 +63,7 @@ - + + - + - - + - - + + - + @@ -671,7 +648,7 @@ Share with concerned party only - + @@ -680,7 +657,7 @@ Share with concerned party only - + diff --git a/GME Remit/Modules/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift b/GME Remit/Modules/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift index 8f616404..713a6840 100644 --- a/GME Remit/Modules/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift +++ b/GME Remit/Modules/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift @@ -65,7 +65,6 @@ class SendMoneyReceiptViewController: UIViewController { @IBOutlet weak var successMessageTitleLabel: UILabel! @IBOutlet weak var concernedPartyText: UILabel! - @IBOutlet weak var tansactionDateTitleLabel: UILabel! @IBOutlet weak var recieverTitleLabel: UILabel! @IBOutlet weak var addressTitleLabel: UILabel! @@ -175,16 +174,27 @@ class SendMoneyReceiptViewController: UIViewController { func setupBackButton() { if shouldShowCancelAmmendButton { self.navigationController?.navigationItem.hidesBackButton = false - let button = UIBarButtonItem.init(image: #imageLiteral(resourceName: "backIconBlack"), style: UIBarButtonItem.Style.plain, target: self, action: #selector(self.back)) + let button = UIBarButtonItem.init( + image: #imageLiteral(resourceName: "backIconBlack"), style: UIBarButtonItem.Style.plain, + target: self, + action: #selector(self.back) + ) self.navigationItem.backBarButtonItem = button self.doneButton.isHidden = true self.transactionReportButtonStackView.isHidden = false - } - else { + } else { self.doneButton.isHidden = false + self.doneButton.backgroundColor = .themeRed + self.doneButton.layer.cornerRadius = 5 + self.transactionReportButtonStackView.isHidden = true self.navigationController?.navigationItem.hidesBackButton = true - let button = UIBarButtonItem.init(title: nil, style: UIBarButtonItem.Style.plain, target: nil, action: nil) + let button = UIBarButtonItem.init( + title: nil, + style: UIBarButtonItem.Style.plain, + target: nil, + action: nil + ) self.navigationItem.leftBarButtonItem = button } } @@ -199,7 +209,6 @@ class SendMoneyReceiptViewController: UIViewController { let lastName = self.reciept?.rLastName ?? "" let middleName = self.reciept?.rMiddleName ?? "" - let fullName = firstName + " " + middleName + " " + lastName self.recieverNameLabelLabel.text = fullName.uppercased() @@ -251,4 +260,3 @@ extension SendMoneyReceiptViewController: SendMoneyReceiptViewInterface { self.reciept = model } } - diff --git a/GME Remit/Modules/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift b/GME Remit/Modules/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift index 1eac372e..fda43bbc 100644 --- a/GME Remit/Modules/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift +++ b/GME Remit/Modules/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift @@ -136,7 +136,7 @@ class SendMoneyVerificationViewController: UITableViewController { private func setup() { configureLanguage() - agreeAndSendButton.layer.cornerRadius = 10 + agreeAndSendButton.layer.cornerRadius = 5 agreeAndSendButton.backgroundColor = .themeRed agreeAndSendButton.titleLabel?.font = .sanfrancisco(.medium, size: 18) @@ -182,7 +182,7 @@ class SendMoneyVerificationViewController: UITableViewController { } - func showSecureKeypad(){ + func showSecureKeypad() { let secureKeypad = SecureKeypad(target: self) secureKeypad.delegate = self secureKeypad.present(animated: true) @@ -253,9 +253,9 @@ extension SendMoneyVerificationViewController: SendMoneyVerificationViewInterfac } func showLoading() { - if let _ = hudDelegate { + if hudDelegate != nil { self.hudDelegate?.showLoading() - }else { + } else { self.showProgressHud() } @@ -276,14 +276,18 @@ extension SendMoneyVerificationViewController { // MARK: - BiometricAuthenticationViewControllerDelegate extension SendMoneyVerificationViewController: BiometricAuthenticationViewControllerDelegate { - func viewController(_ viewController: BiometricAuthenticationViewController, informationTitleLabel titleLabel: UILabel, authenticationButton button: UIButton) { + func viewController( + _ viewController: BiometricAuthenticationViewController, + informationTitleLabel titleLabel: UILabel, + authenticationButton button: UIButton + ) { titleLabel.text = "bio_sendmoney_intro_text".localized() button.setTitle("send_money_text".localized(), for: .normal) } func didComplete(_ viewController: BiometricAuthenticationViewController) { self.isUsingBiometricAuth = true - viewController.dismiss(animated: true){ + viewController.dismiss(animated: true) { guard let encryptedPW = KeyChain.shared.get(key: .password) else{ MainWireframe.logoutWarningAlert(message: "To use biometrics authentication you have to login again.") return diff --git a/GME Remit/Modules/SideMenu/Auto refund/AutoRefundsViewController.swift b/GME Remit/Modules/SideMenu/Auto refund/AutoRefundsViewController.swift index c67e273e..d2921eb0 100644 --- a/GME Remit/Modules/SideMenu/Auto refund/AutoRefundsViewController.swift +++ b/GME Remit/Modules/SideMenu/Auto refund/AutoRefundsViewController.swift @@ -61,7 +61,7 @@ class AutoRefundsViewController: UIViewController { headerTitleLabel.textColor = .themeRed refundButton.backgroundColor = .themeRed amountTextfield.textColor = .themeRed - refundButton.layer.cornerRadius = 10 + refundButton.layer.cornerRadius = 5 } @objc private func editingChanged(_ sender: UITextField) { diff --git a/GME Remit/Modules/SplashScreen/User Interface/View/SplashScreenViewController.swift b/GME Remit/Modules/SplashScreen/User Interface/View/SplashScreenViewController.swift index ab703e14..d43046a8 100644 --- a/GME Remit/Modules/SplashScreen/User Interface/View/SplashScreenViewController.swift +++ b/GME Remit/Modules/SplashScreen/User Interface/View/SplashScreenViewController.swift @@ -262,7 +262,7 @@ class SplashScreenViewController: UIViewController { dropDownImageView.image = image dropDownImageView.tintColor = UIColor.white - exchangeRootView.layer.cornerRadius = 10 + exchangeRootView.layer.cornerRadius = 5 exchangeRootView.clipsToBounds = true exchangeRootView.layer.addShadow(offset: CGSize(width: 2, height: 2)) @@ -285,7 +285,7 @@ class SplashScreenViewController: UIViewController { languageBackGroundView.addGestureRecognizer(languageSelectionGuesture) - languageBackGroundView.layer.cornerRadius = 10 + languageBackGroundView.layer.cornerRadius = 5 languageBackGroundView.clipsToBounds = true languageBackGroundView.layer.addShadow(offset: CGSize.init(width: 2, height: 2)) NotificationCenter.default.addObserver( @@ -336,8 +336,8 @@ class SplashScreenViewController: UIViewController { } private func setUpButtons() { - buttonSignUp.layer.cornerRadius = 10 - buttonLogin.layer.cornerRadius = 10 + buttonSignUp.layer.cornerRadius = 5 + buttonLogin.layer.cornerRadius = 5 buttonLogin.layer.borderWidth = 1 buttonLogin.layer.borderColor = UIColor.white.cgColor buttonSignUp.layer.borderWidth = 1 diff --git a/GME Remit/MultiLanguages/en.lproj/Localizable.strings b/GME Remit/MultiLanguages/en.lproj/Localizable.strings index 9c3c2785..c1dc9ca7 100644 --- a/GME Remit/MultiLanguages/en.lproj/Localizable.strings +++ b/GME Remit/MultiLanguages/en.lproj/Localizable.strings @@ -94,7 +94,7 @@ "state_text" = "State/Province"; "state_placeholder_text" = "Please select a state/province"; "district_text" = "District"; -"district_placeholder_text" = "Please select a state/province"; +"district_placeholder_text" = "Please select a district"; "email_text_optional" = "Email"; "placeholder_enter_receiver_email_text" = "Enter receiver's email address"; "transfer_reason_text" = "Transfer Reason"; @@ -540,3 +540,57 @@ // Home's messageView "autodebit_account_required_message" = "Please add your Auto Debit account to start using GME services."; + +// Dynamic recipient +"recipient_text" = "Recipient"; + +"country_text" = "Country"; +"payment_mode_text" = "Payment Mode"; +"bank_text" = "Bank"; +"branch_text" = "Branch"; +"account_text" = "Account"; +"first_name_text" = "First Name"; +"middle_name_text" = "Middle Name"; +"last_name_text" = "Last Name"; +"full_name_text" = "Full Name"; +"first_name_local_text" = "First Name as Your Language"; +"middle_name_local_text" = "Middle Name as Your Language"; +"last_name_local_text" = "Last Name as Your Language"; +"full_name_local_text" = "Full Name as Your Language"; +"id_type_text" = "ID Type"; +"id_number_text" = "ID Number"; +"mobile_text" = "Mobile No."; +"email_text" = "Email"; +"state_province_text" = "State/Province"; +"district_text" = "District"; +"city_text" = "City"; +"address_text" = "Address"; +"relation_text" = "Relation"; +"reason_text" = "Transfer Reason"; + +"country_placeholder_text" = "Select Recipient's Country"; +"payment_mode_placeholder_text" = "Select Recipient's Payment Mode"; +"bank_placeholder_text" = "Select Recipient's Bank"; +"branch_placeholder_text" = "Select Recipient's Branch"; +"account_placeholder_text" = "Enter Recipient's Bank Account"; +"first_name_placeholder_text" = "Enter Recipient's First Name"; +"middle_name_placeholder_text" = "Enter Recipient's Middle Name"; +"last_name_placeholder_text" = "Enter Recipient's Last Name"; +"full_name_placeholder_text" = "Enter Recipient's Full Name"; +"first_name_local_placeholder_text" = "Enter Recipient's First Name as Your Language"; +"middle_name_local_placeholder_text" = "Enter Recipient's Middle Name as Your Language"; +"last_name_local_placeholder_text" = "Enter Recipient's Last Name as Your Language"; +"full_name_local_placeholder_text" = "Enter Recipient's Full Name as Your Language"; +"id_type_placeholder_text" = "Select Recipient's ID Type"; +"id_number_placeholder_text" = "Enter Recipient's ID Number"; +"mobile_placeholder_text" = "Enter Recipient's Mobile No."; +"email_placeholder_text" = "Enter Recipient's Email"; +"stateProvince_placeholder_text" = "Select Recipient's State/Province"; +"district_placeholder_text" = "Select Recipient's District"; +"city_placeholder_text" = "Enter Recipient's City"; +"address_placeholder_text" = "Enter Recipient's Address"; +"relation_placeholder_text" = "Select Recipient's Relation"; +"reason_placeholder_text" = "Select Recipient's Transfer Reason"; + +"recipient_add_success_message_text" = "Do you want to send money to\n xxx?"; +"general_length_error_text" = "It must be at least xxx and less than ooo characters."; diff --git a/GME Remit/Utilities/SearchAddress/User Interface/View/Cell/AddressTableViewCell.swift b/GME Remit/Utilities/SearchAddress/User Interface/View/Cell/AddressTableViewCell.swift index c5581036..6742fbc1 100644 --- a/GME Remit/Utilities/SearchAddress/User Interface/View/Cell/AddressTableViewCell.swift +++ b/GME Remit/Utilities/SearchAddress/User Interface/View/Cell/AddressTableViewCell.swift @@ -19,7 +19,7 @@ class AddressTableViewCell: UITableViewCell { self.jibunAddress.text = model.jibunAddr self.zipCodeLabel.text = model.zipNo - self.contentView.layer.cornerRadius = 10 + self.contentView.layer.cornerRadius = 5 } } diff --git a/GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenterViewController.swift b/GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenterViewController.swift index 79360336..1b5a4de3 100644 --- a/GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenterViewController.swift +++ b/GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenterViewController.swift @@ -105,8 +105,8 @@ extension TablePresenterViewController: TablePresenterViewInterface { // MARK: Other Functions extension TablePresenterViewController { private func setup() { - mainView.layer.cornerRadius = 10 - closeButton.layer.cornerRadius = 10 + mainView.layer.cornerRadius = 5 + closeButton.layer.cornerRadius = 5 searchBar.delegate = self