diff --git a/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRates.storyboard b/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRates.storyboard index 7fc5bbc7..a091c2aa 100644 --- a/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRates.storyboard +++ b/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRates.storyboard @@ -32,7 +32,7 @@ - + @@ -358,10 +358,9 @@ - + - + + - + - - - - - + + + + + + + + + - + - - - - - - - - + + + + + - - - - - - - - + + + + - + - + - - - diff --git a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift index d8378bbe..d9fdeb58 100644 --- a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift +++ b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift @@ -7,109 +7,100 @@ // import UIKit +import ValidationTextField class ForgotPasswordViewController: UIViewController { - - struct StringConstants { - let headerTitle = "forgot_password_title_text".localized() - let subHeaderTitle = "forgot_password_subtitle_text".localized() - let userIdPlaceholder = "user_Id_placeholder_text".localized() - let dobPlaceholder = "dob_text".localized() - let resetText = "reset_text".localized() - let cancelText = "cancel_text".localized() - let userIdTitleText = "login_user_id_text".localized() - let dobTitleText = "dob_text".localized() - } - - // MARK: IBOutlets - @IBOutlet weak var headerLabel: UILabel! - @IBOutlet weak var subHeaderLabel: UILabel! - @IBOutlet weak var userIdTitleLabel: UILabel! - @IBOutlet weak var dobTitleLabel: UILabel! - - - @IBOutlet weak var userNameTextField: UITextField! - @IBOutlet weak var dobTextField: UITextField! - @IBOutlet weak var resetButton: UIButton! - @IBOutlet weak var cancelButton: UIButton! - - - // MARK: Properties - - var presenter: ForgotPasswordModuleInterface? - let datePicker = UIDatePicker() - - // MARK: VC's Life cycle - - override func viewDidLoad() { - super.viewDidLoad() - self.setup() - } - - // MARK: IBActions - - @IBAction func _continue(_ sender: UIButton) { - let username = self.userNameTextField.text! -// let dob = self.dobTextField.text! - let dob = "" - self.presenter?.reset(username: username, dob: dob) + + struct StringConstants { + let headerTitle = "forgot_password_title_text".localized() + let subHeaderTitle = "forgot_password_subtitle_text".localized() + let userIdPlaceholder = "forgot_password_userId_placeholder_text".localized() + let resetText = "reset_text".localized() + let userIdTitleText = "login_user_id_text".localized() + } + + // MARK: IBOutlets + @IBOutlet weak var headerLabel: UILabel! + @IBOutlet weak var subHeaderLabel: UILabel! + + @IBOutlet weak var userNameTextField: ValidationTextField! + @IBOutlet weak var resetButton: UIButton! + + // MARK: Properties + + var presenter: ForgotPasswordModuleInterface? + + var isValid = false { + didSet { + resetButton.isEnabled = isValid + resetButton.backgroundColor = isValid ? AppConstants.themeRedColor : .lightGray } - - @IBAction func cancel(_ sender: UIButton) { - self.presenter?.cancel() + } + // MARK: VC's Life cycle + + override func viewDidLoad() { + super.viewDidLoad() + self.setup() + } + + // MARK: IBActions + + @IBAction func _continue(_ sender: UIButton) { + let username = self.userNameTextField.text! + self.presenter?.reset(username: username, dob: "") + } + + // MARK: Other Functions + + private func setup() { + // all setup should be done here + self.setupPicturedNavBar() + configureLanguage() + + userNameTextField.statusImageView.isHidden = true + userNameTextField.validCondition = { + if $0.count > 3 { + self.isValid = true + return self.isValid + } else { + self.isValid = false + return self.isValid + } } + resetButton.layer.cornerRadius = 10 + } + + func configureLanguage() { + let font = UIFont.init(name: "SanFranciscoDisplay-regular", size: 12)! + userNameTextField.titleFont = font + userNameTextField.placeholder = StringConstants().userIdPlaceholder + userNameTextField.titleText = StringConstants().userIdTitleText - // MARK: Other Functions - - private func setup() { - // all setup should be done here - self.setupDatePicker() - self.setupPicturedNavBar() - configureLanguage() - } + resetButton.setTitle(StringConstants().resetText, for: UIControl.State.normal) - func configureLanguage() { - self.userNameTextField.placeholder = StringConstants().userIdPlaceholder - self.dobTextField.placeholder = StringConstants().dobPlaceholder - self.resetButton.setTitle(StringConstants().resetText, for: UIControl.State.normal) - self.cancelButton.setTitle(StringConstants().cancelText, for: UIControl.State.normal) - self.headerLabel.text = StringConstants().headerTitle - self.subHeaderLabel.text = StringConstants().subHeaderTitle - self.userIdTitleLabel.text = "email_text".localized() - self.dobTitleLabel.text = StringConstants().dobTitleText - } + headerLabel.text = StringConstants().headerTitle - private func setupDatePicker() { - self.datePicker.datePickerMode = .date - self.dobTextField.inputView = datePicker - datePicker.maximumDate = Date() - self.datePicker.addTarget(self, action: #selector(handleDatePicker(sender:)), for: .valueChanged) - } - - @objc private func handleDatePicker(sender: UIDatePicker) { - let dateFormatter = DateFormatter() - dateFormatter.dateFormat = "yyyy-MM-dd" - self.dobTextField.text = dateFormatter.string(from: sender.date) - } + subHeaderLabel.text = StringConstants().subHeaderTitle + } } // MARK: ForgotPasswordViewInterface extension ForgotPasswordViewController: ForgotPasswordViewInterface { - func showLoading() { - self.showProgressHud() - } - - func hideLoading() { - self.hideProgressHud() - } - - func show(message: String) { - self.alertWithOk(type: .normal, message: message, title: "Success", okTitle: "Ok") { - self.presenter?.cancel() - } - } - - func show(error: String) { - self.alert(type: .error, message: error) + func showLoading() { + self.showProgressHud() + } + + func hideLoading() { + self.hideProgressHud() + } + + func show(message: String) { + self.alertWithOk(type: .normal, message: message, title: "Success", okTitle: "Ok") { + self.presenter?.cancel() } + } + + func show(error: String) { + self.alert(type: .error, message: error) + } } diff --git a/GMERemittance/Module/Login/User Interface/View/Login.storyboard b/GMERemittance/Module/Login/User Interface/View/Login.storyboard index d8e03c07..18116d96 100644 --- a/GMERemittance/Module/Login/User Interface/View/Login.storyboard +++ b/GMERemittance/Module/Login/User Interface/View/Login.storyboard @@ -1,5 +1,5 @@ - + @@ -18,296 +18,148 @@ - - + + - - + + - + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + - + + + + - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - + - + diff --git a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift index 3dafafee..2f8bce53 100644 --- a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift +++ b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift @@ -9,6 +9,7 @@ import UIKit import Localize_Swift import LocalAuthentication +import ValidationTextField class LoginViewController: UIViewController { struct StringConstants { @@ -18,6 +19,7 @@ class LoginViewController: UIViewController { let userIdTitle = "userid_title_text".localized() let userIdPlaceholder = "userid_placeholder_text".localized() let passwordTitle = "password_text".localized() + let passwordPlaceholder = "enter_login_password_text".localized() let forgotPasswordText = "forgot_password_text".localized() let newToGmeText = "new_to_gme_text".localized() @@ -28,27 +30,15 @@ class LoginViewController: UIViewController { // MARK: IBOutlets - @IBOutlet weak var userNameTextField: UITextField! - @IBOutlet weak var passwordTextField: UITextField! + @IBOutlet weak var userNameTextField: ValidationTextField! + @IBOutlet weak var passwordTextField: ValidationTextField! // views - @IBOutlet weak var backgroundTextfieldsView: UIView! - @IBOutlet weak var userIdBackgroundView: UIView! - @IBOutlet weak var passwordBackgroundView: UIView! - @IBOutlet weak var headerTitle: UILabel! @IBOutlet weak var subtitle: UILabel! - @IBOutlet weak var userIdTitleLabel: UILabel! - - @IBOutlet weak var passwordTitleLabel: UILabel! - @IBOutlet weak var newToGmeLabel: UILabel! - @IBOutlet weak var registerHereButton: UIButton! - @IBOutlet weak var forgotPasswordButton: UIButton! - @IBOutlet weak var forgotPasswordView: UIView! - @IBOutlet weak var logoImageView: UIImageView! @IBOutlet weak var loginButton: UIButton! var encryptedPassword : String? { @@ -83,8 +73,6 @@ class LoginViewController: UIViewController { super.viewWillAppear(animated) } - - override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) self.navigationItem.title = "" @@ -110,10 +98,22 @@ class LoginViewController: UIViewController { // all setup should be done here setupNavBar() setupColor() - self.userNameTextField.delegate = self - self.passwordTextField.delegate = self - self.userNameTextField.returnKeyType = .next - // showAnimation() + userNameTextField.delegate = self + passwordTextField.delegate = self + userNameTextField.returnKeyType = .next + + let font = UIFont.init(name: "SanFranciscoDisplay-regular", size: 12)! + userNameTextField.titleFont = font + userNameTextField.statusImageView.isHidden = true + userNameTextField.validCondition = { $0.count > 3 } + userNameTextField.errorMessage = "userid_error_text".localized() + + passwordTextField.titleFont = font + passwordTextField.statusImageView.isHidden = true + passwordTextField.validCondition = { $0.count > 5 } + passwordTextField.errorMessage = "password_policy_error".localized() + + loginButton.layer.cornerRadius = 10 } func authenticateUser() { @@ -147,89 +147,35 @@ class LoginViewController: UIViewController { } private func configureLanguage() { - self.headerTitle.text = StringConstants().headerTitle - self.subtitle.text = StringConstants().subHeaderTitle - self.userIdTitleLabel.text = StringConstants().userIdTitle - self.userNameTextField.placeholder = StringConstants().userIdPlaceholder - self.passwordTitleLabel.text = StringConstants().passwordTitle + headerTitle.text = StringConstants().headerTitle + subtitle.text = StringConstants().subHeaderTitle + + userNameTextField.titleText = StringConstants().userIdTitle + userNameTextField.placeholder = StringConstants().userIdPlaceholder + + passwordTextField.titleText = StringConstants().passwordTitle + passwordTextField.placeholder = StringConstants().passwordPlaceholder + + forgotPasswordButton.setTitle(StringConstants().forgotPasswordText, for: .normal) + + newToGmeLabel.text = StringConstants().newToGmeText - self.forgotPasswordButton.setTitle(StringConstants().forgotPasswordText, for: .normal) - self.newToGmeLabel.text = StringConstants().newToGmeText - self.registerHereButton.setTitle(StringConstants().registerHereText, for: .normal) - self.loginButton.setTitle(StringConstants().loginText, for: .normal) + registerHereButton.setTitle(StringConstants().registerHereText, for: .normal) + + loginButton.setTitle(StringConstants().loginText, for: .normal) } - func setupColor() { self.loginButton.backgroundColor = AppConstants.themeRedColor self.headerTitle.textColor = AppConstants.themeRedColor } - func showAnimation() { - setupInitialPositionsOfviews() - animateViews() - } - - private func setupInitialPositionsOfviews() { - self.userIdBackgroundView.center.x -= self.view.bounds.width - self.passwordBackgroundView.center.x -= self.view.bounds.width - self.loginButton.transform = CGAffineTransform.init(scaleX: 0, y: 1) - self.headerTitle.alpha = 0 - self.headerTitle.center.y -= 200 - self.subtitle.alpha = 0 - self.forgotPasswordView.alpha = 0 - self.logoImageView.center.y += (self.logoImageView.bounds.height + 20) - self.loginButton.setTitle("", for: UIControl.State.normal) - - } - - private func animateViews() { - // user id - UIView.animate(withDuration: 0.5, animations: { - self.userIdBackgroundView.center.x += self.view.bounds.width - }) - - // password - UIView.animate(withDuration: 0.5, delay: 0.3, options: [], animations: { - self.passwordBackgroundView.center.x += self.view.bounds.width - }, completion: nil) - - // login button - UIView.animate(withDuration: 0.5, delay: 0.4, options: [], animations: { - self.loginButton.transform = CGAffineTransform.identity - }, completion: { (_) in - self.loginButton.setTitle("Login", for: UIControl.State.normal) - }) - - - // subtitle - UIView.animate(withDuration: 0.5, delay: 0.7, options: [], animations: { - self.subtitle.alpha = 1 - }, completion: nil) - - // forgot password - UIView.animate(withDuration: 0.5, delay: 0.9, options: [], animations: { - self.forgotPasswordView.alpha = 1 - }) - - - // header title - // logoimageview - UIView.animate(withDuration: 0.7, delay: 0, options: [], animations: { - // todo - self.headerTitle.alpha = 1 - self.headerTitle.center.y += 200 - self.logoImageView.center.y -= (self.logoImageView.bounds.height + 20) - }, completion: nil) - - } private func setupNavBar() { self.setupPicturedNavBar() } private func authenticate(){ - guard let email = KeyChain.shared.get(key: .id), let typedEmail = self.userNameTextField.text, @@ -329,7 +275,15 @@ extension LoginViewController: SecureKeypadDelegate { func didComplete(_ encryptedString: String, length: Int) { if encryptedString != "" { self.encryptedPassword = encryptedString - self.passwordTextField.text = "password" + + var garbagePW = "" + for _ in 0.. KycForm1Model { + // For use id number field in kycForm2 + GMEDB.shared.user.set(dobTextField.text, .dateOfBirth) + return KycForm1Model( firstName: firstNameTextField.text ?? "", middleName: "", diff --git a/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift b/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift index 95f58b60..ee24ae9c 100644 --- a/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift +++ b/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift @@ -578,6 +578,9 @@ extension KycForm2ViewController { } private func generateModel() -> KycForm2Model { + // For use PenneyTest Submit + GMEDB.shared.user.set(accountNumberTextField.text, .primaryAccountNumber) + return KycForm2Model( bank: selectedBank?.id ?? "", accountNumber: accountNumberTextField.text ?? "", diff --git a/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmit.storyboard b/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmit.storyboard index 2323b641..a687d721 100644 --- a/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmit.storyboard +++ b/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmit.storyboard @@ -1,6 +1,6 @@ - - + + @@ -15,177 +15,140 @@ - - + + - - - + + + - - + + - - + + + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - + + + + + + + + + + + + + - - - - + + + + - + - - - - - - - + + + + + + - + - + diff --git a/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift b/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift index 5a8510e9..4af1fe4b 100644 --- a/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift +++ b/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift @@ -20,7 +20,6 @@ class PennyTestSubmitViewController: UIViewController { let viewSampleText = "view_sample_text".localized() let resendRequestText = "resend_request_text".localized() let submitText = "submit_text".localized() - let notNowText = "not_now_text".localized() } // MARK: Properties @@ -28,6 +27,13 @@ class PennyTestSubmitViewController: UIViewController { var presenter: PennyTestSubmitModuleInterface? weak var parentViewcontroller: UIViewController? + private var isValid = false { + didSet { + submitButton.isEnabled = isValid + submitButton.backgroundColor = isValid ? AppConstants.themeRedColor : .lightGray + } + } + // MARK: IBOutlets @IBOutlet weak var dipositReferencelabel: UILabel! @@ -36,7 +42,6 @@ class PennyTestSubmitViewController: UIViewController { @IBOutlet weak var viewSampleButton: UIButton! @IBOutlet weak var resendButton: UIButton! @IBOutlet weak var submitButton: UIButton! - @IBOutlet weak var notNowButton: UIButton! // MARK: VC's Life cycle override func viewDidLoad() { @@ -62,6 +67,17 @@ class PennyTestSubmitViewController: UIViewController { self.titleLabel.text = message configureText() + + submitButton.layer.cornerRadius = 10 + verificationCodeTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) + } + + @objc private func editingChanged(_ textField: UITextField) { + guard let text = textField.text else { + return + } + + isValid = text.count == 4 ? true : false } private func configureText() { @@ -70,7 +86,6 @@ class PennyTestSubmitViewController: UIViewController { self.viewSampleButton.setTitle(StringConstants().viewSampleText, for: UIControl.State.normal) self.resendButton.setTitle(StringConstants().resendRequestText, for: UIControl.State.normal) self.submitButton.setTitle(StringConstants().submitText, for: UIControl.State.normal) - self.notNowButton.setTitle(StringConstants().notNowText, for: UIControl.State.normal) } @IBAction func viewSample(_ sender: Any) { @@ -157,14 +172,14 @@ class PennyTestSubmitViewController: UIViewController { } @IBAction func Verify(_ sender: UIButton) { - let customerId = Utility.getMyId() - let certNumber = self.verificationCodeTextField.text!.removeSpacesTrailingPreceding() - if certNumber.isEmpty || certNumber.count != 4 { - self.alert(type: .error, message: "valid_verification_code_error".localized()) - return + guard let certNumber = self.verificationCodeTextField.text?.removeSpacesTrailingPreceding() + else { + self.alert(type: .error, message: "valid_verification_code_error".localized()) + return } - let accountNumber = Utility.getMyPrimaryAccountNumber() + let customerId = GMEDB.shared.user.string(.senderId) ?? "" + let accountNumber = GMEDB.shared.user.string(.primaryAccountNumber) ?? "" let params = [ @@ -204,7 +219,7 @@ class PennyTestSubmitViewController: UIViewController { GMEDB.shared.user.set(PennyTestStatusCode.completed.rawValue, .pennyTestStatusCode) self.doLogin() } - } + } ) }) { (error) in self.alert(type: .error, message: error.localizedDescription) @@ -308,6 +323,3 @@ extension PennyTestSubmitViewController: InitiatePennyTestService { extension PennyTestSubmitViewController: UserInfoService { } - - - diff --git a/GMERemittance/Module/RegisterModules/Register/User Interface/View/Register.storyboard b/GMERemittance/Module/RegisterModules/Register/User Interface/View/Register.storyboard index 5ed4585c..1059e785 100644 --- a/GMERemittance/Module/RegisterModules/Register/User Interface/View/Register.storyboard +++ b/GMERemittance/Module/RegisterModules/Register/User Interface/View/Register.storyboard @@ -1,11 +1,12 @@ - + + @@ -21,174 +22,153 @@ - - - - - + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - + - + + + - - - - - + + + + + + + + + + + + - + - - - - + + + + + diff --git a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift index 835ade25..92820a64 100644 --- a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift +++ b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift @@ -100,7 +100,7 @@ class SplashScreenViewController: UIViewController { $0.subtitle } ?? [""] - guard let defaultAmount = codeEnum?.defaultRecipientAmount else { + guard let defaultAmount = codeEnum?.getDefaultRecipientAcount(currency: selectedExchangeRateModel?.currency ?? "") else { calcBy = "c" senderTextField.text = codeEnum?.defaultSenderAmount.likeCommaMoney() recipientTextField.text = "" @@ -164,6 +164,8 @@ class SplashScreenViewController: UIViewController { super.viewWillAppear(animated) self.navigationItem.title = "" hideNavBar() + setLanguageBackgroundView() + timer?.fire() if selectedLanguage == nil { @@ -226,7 +228,7 @@ class SplashScreenViewController: UIViewController { hideNavBar() setUpButtons() - setLanguageBackgroundView() + appVersionLabel.text = Utility.getAppVersion() setExchangeRateUI() diff --git a/GMERemittance/Utility/CountryEnum.swift b/GMERemittance/Utility/CountryEnum.swift index d30ce374..7b57caf9 100644 --- a/GMERemittance/Utility/CountryEnum.swift +++ b/GMERemittance/Utility/CountryEnum.swift @@ -658,32 +658,32 @@ extension CountryEnum { } extension CountryEnum { - var defaultRecipientAmount: String? { + func getDefaultRecipientAcount(currency: String) -> String? { let amount: String? - switch self{ - case .np: amount = "100000" // nepal - case .kh: amount = "500" // cambodia - case .ph: amount = "50000" // philipines - case .lk: amount = "100000" // sri lanka - case .vn: amount = "50000000" // Vietnam - case .in: amount = "50000" // india - case .pk: amount = "100000" // pakistan - case .az: amount = "1000" // azerbaijan - case .bd: amount = "100000" // Bangladesh - case .by: amount = "1000" // Belarus - case .ge: amount = "1000" // Georgia - case .kz: amount = "1000" // Kazakhstan - case .kg: amount = "1000" // Kyrgyzstan - case .my: amount = "10000" // Malaysia - case .md: amount = "1000" // Moldova - case .mn: amount = "1000" // Mongolia - case .mm: amount = "1500000" // Myanmar - case .ru: amount = "1000" // Russian Federation - case .sg: amount = "2000" // Singapore - case .tj: amount = "1000" // Tajikistan - case .th: amount = "30000" // Thailand - case .uz: amount = "1000" // Uzbekistan + switch self { + case .np: amount = currency == defaultCurrency ? "100000" : nil // nepal + case .kh: amount = currency == defaultCurrency ? "500" : nil // cambodia + case .ph: amount = currency == defaultCurrency ? "50000" : nil // philipines + case .lk: amount = currency == defaultCurrency ? "100000" : nil // sri lanka + case .vn: amount = currency == defaultCurrency ? "50000000" : nil // Vietnam + case .in: amount = currency == defaultCurrency ? "50000" : nil // india + case .pk: amount = currency == defaultCurrency ? "100000" : nil // pakistan + case .az: amount = currency == defaultCurrency ? "1000" : nil // azerbaijan + case .bd: amount = currency == defaultCurrency ? "100000" : nil // Bangladesh + case .by: amount = currency == defaultCurrency ? "1000" : nil // Belarus + case .ge: amount = currency == defaultCurrency ? "1000" : nil // Georgia + case .kz: amount = currency == defaultCurrency ? "1000" : nil // Kazakhstan + case .kg: amount = currency == defaultCurrency ? "1000" : nil // Kyrgyzstan + case .my: amount = currency == defaultCurrency ? "10000" : nil // Malaysia + case .md: amount = currency == defaultCurrency ? "1000" : nil // Moldova + case .mn: amount = currency == defaultCurrency ? "1000" : nil // Mongolia + case .mm: amount = currency == defaultCurrency ? "1500000" : nil // Myanmar + case .ru: amount = currency == defaultCurrency ? "1000" : nil // Russian Federation + case .sg: amount = currency == defaultCurrency ? "2000" : nil // Singapore + case .tj: amount = currency == defaultCurrency ? "1000" : nil // Tajikistan + case .th: amount = currency == defaultCurrency ? "30000" : nil // Thailand + case .uz: amount = currency == defaultCurrency ? "1000" : nil // Uzbekistan default: amount = nil } @@ -694,4 +694,34 @@ extension CountryEnum { var defaultSenderAmount: String { return "1000000" } + + private var defaultCurrency: String { + let currency: String + switch self { + case .np: currency = "NPR" // nepal + case .kh: currency = "USD" // cambodia + case .ph: currency = "PHP" // philipines + case .lk: currency = "LKR" // sri lanka + case .vn: currency = "VND" // Vietnam + case .in: currency = "INR" // india + case .pk: currency = "PKR" // pakistan + case .az: currency = "USD" // azerbaijan + case .bd: currency = "USD" // Bangladesh + case .by: currency = "USD" // Belarus + case .ge: currency = "USD" // Georgia + case .kz: currency = "USD" // Kazakhstan + case .kg: currency = "USD" // Kyrgyzstan + case .my: currency = "MYR" // Malaysia + case .md: currency = "USD" // Moldova + case .mn: currency = "USD" // Mongolia + case .mm: currency = "MMK" // Myanmar + case .ru: currency = "USD" // Russian Federation + case .sg: currency = "SGD" // Singapore + case .tj: currency = "USD" // Tajikistan + case .th: currency = "THB" // Thailand + case .uz: currency = "USD" // Uzbekistan + default: currency = "KRW" + } + return currency + } } diff --git a/th.lproj/Localizable.strings b/th.lproj/Localizable.strings index a23ca4a8..faea215d 100644 --- a/th.lproj/Localizable.strings +++ b/th.lproj/Localizable.strings @@ -392,13 +392,7 @@ "otp_empty_error" = "รหัส OTP ต้องไม่ว่างเปล่า"; "requesting_otp_text" = "ร้องขอ OTP"; - - - - - - -"resend_money_text" = "ทำรายการใหม่"; +"resend_money_text" = "ทำรายการอีกครั้ง"; "resend_search_hint_text" = "เลขที่ใบเสร็จ GME No. /ชื่อผู้รับ/ชื่อธนาคาร";