Browse Source

Login Page changes and new register postal search view added

dev
puranpanthi 1 year ago
parent
commit
d381710993
  1. 10
      GME Remit.xcodeproj/project.pbxproj
  2. 30
      GME Remit/Modules/Login/User Interface/View/Login.storyboard
  3. 204
      GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewController.swift
  4. 10
      GME Remit/Modules/SplashScreen/User Interface/View/SplashScreenViewController.swift
  5. 70
      GME Remit/MultiLanguages/en.lproj/Localizable.strings
  6. 6
      GME Remit/Shared/AddressCityViewController.storyboard
  7. 100
      GME Remit/Shared/AddressCityViewController.swift
  8. 26
      GME Remit/Shared/Models/Address.swift
  9. 2
      GME Remit/Shared/Models/PostalData.swift

10
GME Remit.xcodeproj/project.pbxproj

@ -9048,11 +9048,10 @@
CODE_SIGN_ENTITLEMENTS = "GME Remit.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 1.0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 926Z34F5DW;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
@ -9069,7 +9068,7 @@
"$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.8;
ONLY_ACTIVE_ARCH = YES;
"OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--generate-entitlement-der";
OTHER_LDFLAGS = (
@ -9095,11 +9094,12 @@
CODE_SIGN_ENTITLEMENTS = "GME Remit/GME RemitRelease.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 1.0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 926Z34F5DW;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = arm64;
"EXCLUDED_ARCHS[sdk=*]" = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
@ -9117,7 +9117,7 @@
"$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.8;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(OTHER_LDFLAGS)",

30
GME Remit/Modules/Login/User Interface/View/Login.storyboard

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
@ -24,7 +24,7 @@
<!--Login View Controller-->
<scene sceneID="3PZ-9f-Dk0">
<objects>
<viewController storyboardIdentifier="LoginViewController" id="z4C-iC-QQa" customClass="LoginViewController" customModule="JME_Remit" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="LoginViewController" id="z4C-iC-QQa" customClass="LoginViewController" customModule="IME_London" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="DTh-9U-4Cr">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -35,7 +35,7 @@
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="wyS-aR-V4y">
<rect key="frame" x="0.0" y="0.0" width="320" height="132.5"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jme_logo" translatesAutoresizingMaskIntoConstraints="NO" id="4YQ-BK-vPB">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="IME_london-coin-curve" translatesAutoresizingMaskIntoConstraints="NO" id="4YQ-BK-vPB">
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="GUa-vy-zLw"/>
@ -45,7 +45,7 @@
<rect key="frame" x="0.0" y="70" width="320" height="62.5"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<string key="text">Welcome to
JME</string>
IME London</string>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="26"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
@ -73,7 +73,7 @@ JME</string>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Qm0-Vh-TcC">
<rect key="frame" x="20" y="210.5" width="280" height="120"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your ID for using JME" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="GkK-3R-8Nq" customClass="ValidationTextField" customModule="JME_Remit" customModuleProvider="target">
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your ID for using IME London" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="GkK-3R-8Nq" customClass="ValidationTextField" customModule="IME_London" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="280" height="50"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
@ -94,7 +94,7 @@ JME</string>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NgM-ZM-0uD">
<rect key="frame" x="0.0" y="70" width="280" height="50"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="********" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="pCq-Gh-cKW" customClass="ValidationTextField" customModule="JME_Remit" customModuleProvider="target">
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="********" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="pCq-Gh-cKW" customClass="ValidationTextField" customModule="IME_London" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="280" height="50"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" name="ThemeText"/>
@ -165,16 +165,16 @@ JME</string>
</connections>
</button>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="qZ0-Mc-eUA">
<rect key="frame" x="76.5" y="517.5" width="167.5" height="27"/>
<rect key="frame" x="54" y="517.5" width="212.5" height="27"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="New to JME?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vyR-zb-CBC">
<rect key="frame" x="0.0" y="0.0" width="75.5" height="27"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="New to IME London?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vyR-zb-CBC">
<rect key="frame" x="0.0" y="0.0" width="120.5" height="27"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GFb-Or-Tqp">
<rect key="frame" x="85.5" y="0.0" width="82" height="27"/>
<rect key="frame" x="130.5" y="0.0" width="82" height="27"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<state key="normal" title="Register Here">
<color key="titleColor" name="ThemeBlue"/>
@ -271,7 +271,7 @@ JME</string>
</scenes>
<designables>
<designable name="GkK-3R-8Nq">
<size key="intrinsicContentSize" width="187.5" height="34"/>
<size key="intrinsicContentSize" width="233" height="34"/>
</designable>
<designable name="pCq-Gh-cKW">
<size key="intrinsicContentSize" width="79" height="34"/>
@ -279,12 +279,12 @@ JME</string>
</designables>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources>
<image name="IME_london-coin-curve" width="1200" height="1200"/>
<image name="Show" width="20" height="14"/>
<image name="back_icon" width="23" height="17"/>
<image name="back_icon" width="24" height="24"/>
<image name="fingerprint" width="8" height="8"/>
<image name="jme_logo" width="93" height="60"/>
<image name="key" width="24" height="24"/>
<image name="profile" width="26" height="26"/>
<image name="profile" width="24" height="24"/>
<namedColor name="ThemeBlue">
<color red="0.047058823529411764" green="0.12941176470588237" blue="0.41176470588235292" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

204
GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewController.swift

@ -78,8 +78,8 @@ class NewUserRegisterViewController: UIViewController {
var presenter: NewUserRegisterModuleInterface?
private var isValid = false {
didSet {
// registerBttn.isEnabled = isValid
// registerBttn.backgroundColor = isValid ? .themeRed : .themeText
// registerBttn.isEnabled = isValid
// registerBttn.backgroundColor = isValid ? .themeRed : .themeText
registerBttn.isEnabled = true
registerBttn.backgroundColor = isValid ? .themeRed : .themeRed
}
@ -147,7 +147,7 @@ class NewUserRegisterViewController: UIViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// self.initializeSDK()
// self.initializeSDK()
}
override func viewWillDisappear(_ animated: Bool) {
@ -208,7 +208,7 @@ class NewUserRegisterViewController: UIViewController {
}
}
// MARK: Other Functions
// var trustDockResponse: TrustDockResponse?
var trustDockResponse: TrustDockResponse?
private func setup() {
configureLanguage()
@ -224,7 +224,7 @@ class NewUserRegisterViewController: UIViewController {
passwordTextField.returnKeyType = .next
passwordTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)
confirmPasswordTxtField.returnKeyType = .next
confirmPasswordTxtField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)
@ -261,38 +261,38 @@ class NewUserRegisterViewController: UIViewController {
}
@objc private func editingChanged(_ textField: ValidationTextField) {
switch textField {
case mobileNoTextField:
validDic["mobileNumber"] = mobileNoTextField.isValid
case fullNameTextField:
validDic["fullName"] = fullNameTextField.isValid
case genderTextField:
validDic["gender"] = genderTextField.isValid
case idTextField:
textField.removeNonASCII()
idTextField.filterForUserIDFormat()
validDic["id"] = idTextField.isValid
case postalCodeTextField:
validDic["postalCode"] = postalCodeTextField.isValid
case address1TextField:
validDic["address1"] = address1TextField.isValid
case address2TextField:
validDic["address2"] = address2TextField.isValid
case cityTextField:
validDic["city"] = cityTextField.isValid
case nationalityTextField:
validDic["country"] = nationalityTextField.isValid
case dobTextField:
validDic["dob"] = dobTextField.isValid
case passwordTextField:
validDic["password"] = passwordTextField.isValid
case confirmPasswordTxtField:
textField.removeNonASCII()
validDic["confirmPassword"] = confirmPasswordTxtField.isValid
default: ()
}
isValid = validDic.allSatisfy { $0.value }
switch textField {
case mobileNoTextField:
validDic["mobileNumber"] = mobileNoTextField.isValid
case fullNameTextField:
validDic["fullName"] = fullNameTextField.isValid
case genderTextField:
validDic["gender"] = genderTextField.isValid
case idTextField:
textField.removeNonASCII()
idTextField.filterForUserIDFormat()
validDic["id"] = idTextField.isValid
case postalCodeTextField:
validDic["postalCode"] = postalCodeTextField.isValid
case address1TextField:
validDic["address1"] = address1TextField.isValid
case address2TextField:
validDic["address2"] = address2TextField.isValid
case cityTextField:
validDic["city"] = cityTextField.isValid
case nationalityTextField:
validDic["country"] = nationalityTextField.isValid
case dobTextField:
validDic["dob"] = dobTextField.isValid
case passwordTextField:
validDic["password"] = passwordTextField.isValid
case confirmPasswordTxtField:
textField.removeNonASCII()
validDic["confirmPassword"] = confirmPasswordTxtField.isValid
default: ()
}
isValid = validDic.allSatisfy { $0.value }
}
@objc func tappedView() {
@ -367,14 +367,14 @@ extension NewUserRegisterViewController: OtpDelegate {
if tappedButton == "ok_text".localized() {
self.presenter?.checkOtp(otp: otp, userId: self.idTextField.text ?? "", customerType: self.customerType, model: self.registerModel)
}
}
}
}
// MARK: NewUserRegisterViewInterface
extension NewUserRegisterViewController: NewUserRegisterViewInterface {
func success() {
self.presenter?.requestOtp(userId: self.idTextField.text ?? "")
self.presenter?.requestOtp(userId: self.idTextField.text ?? "")
}
func showLoading() {
@ -401,9 +401,9 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
}
GMEDB.shared.user.set(id, .userId)
KeyChain.shared.save(data: id, key: .temporaryID)
// if let trustDockResponse = self.trustDockResponse {
// self.presenter?.showKyc(trudDockModel: trustDockResponse)
// }
if let trustDockResponse = self.trustDockResponse {
self.presenter?.showKyc(trudDockModel: trustDockResponse)
}
}
}
@ -411,7 +411,7 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
func showOtpView() {
guard let viewController = UIStoryboard(name: "OtpVerification", bundle: nil)
.instantiateViewController(withIdentifier: "OtpVerificationViewController") as? OtpVerificationViewController else {
return
return
}
viewController.delegate = self
self.present(viewController, animated: true, completion: nil)
@ -421,8 +421,8 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
if data.msg != "Success" {
referralCode.errorMessage = data.msg!
isValidReferCode = false
self.alert(type: .error, message: data.msg!)
// referralCode.validCondition = { isValid }
self.alert(type: .error, message: data.msg!)
// referralCode.validCondition = { isValid }
} else {
isValidReferCode = true
}
@ -431,24 +431,20 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
func obtainedPostal(data: PostalInformation) {
let address = data.data
print(address?.address)
// guard let viewController = UIStoryboard(name: "AddressCityViewController", bundle: nil)
// .instantiateViewController(withIdentifier: "AddressCityViewController") as? AddressCityViewController else {
// return
// }
//
// viewController.model = data.data!
// // viewController.delegate = self
// self.present(viewController, animated: true, completion: nil)
self.postalCodeTextField.text = self.postalCode
if data.errorCode == "1"{
self.alert(type: .error, message: data.message)
}else{
guard let viewController = UIStoryboard(name: "AddressCityViewController", bundle: nil)
.instantiateViewController(withIdentifier: "AddressCityViewController") as? AddressCityViewController else {
return
}
viewController.model = data.data!
viewController.delegate = self
self.present(viewController, animated: true, completion: nil)
}
let configure = TablePresenterConfiguration(presenterTitle: "Select City")
cityTextField.useAsDropDown(with: configure, items: address?.city)
let configure1 = TablePresenterConfiguration(presenterTitle: "Select Address1")
address1TextField.useAsDropDown(with: configure1, items: address?.address)
}
func obtainedGenderList(data: CountryInformation) {
@ -456,48 +452,56 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
let configure = TablePresenterConfiguration(presenterTitle: "Select Gender")
genderTextField.useAsDropDown(with: configure, items: data?.gender)
let configure1 = TablePresenterConfiguration(presenterTitle: "Select nationality")
nationalityTextField.useAsDropDown(with: configure1, items: data?.nativeCountry)
}
// fileprivate func initializeSDK() {
// // Checking internet connectivity
//
// let requestParams = NSMutableDictionary()
//
// let url = URL(string: "https://api.trustdock.io/v2/verifications?Authorization=gC8ULGtvqiwkMqTx4NzQexLL")!
//
// var request = URLRequest(url: url)
//
// // Creating URLRequest
// // var request = URLRequest(url: URL(string: "https://api.test.trustdock.io/v2/verifications?Authorization =SC5ra2f1GDqMaAVZX289bpuH") ?? "")
// request.httpMethod = "POST"
// request.httpBody = try? JSONSerialization.data(withJSONObject: requestParams, options: .prettyPrinted)
//
// request.addValue("application/json", forHTTPHeaderField: "Content-Type")
// request.addValue("Bearer \("gC8ULGtvqiwkMqTx4NzQexLL")", forHTTPHeaderField: "Authorization")
//
// let session = URLSession.shared.dataTask(with: request) {[unowned self] (data, response, error) in
// guard let data = data, error == nil else {
// let errorMessage = error?.localizedDescription ?? TrustDockSDKError.unknownError.localizedDescription
//
// return
// }
// do {
// let jsonData = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]
//
// let statusCode = (response as! HTTPURLResponse).statusCode
//
// let publicId = jsonData?["public_id"] as? String
// let id = jsonData?["id"] as? String
// let successMessage = (jsonData?["state"] as? String)
// self.trustDockResponse = TrustDockResponse(id: id ?? "", publicID: publicId ?? "", message: successMessage ?? "", statusCode: statusCode)
//
// } catch {
// }
// }
// session.resume()
// }
fileprivate func initializeSDK() {
// Checking internet connectivity
let requestParams = NSMutableDictionary()
let url = URL(string: "https://api.trustdock.io/v2/verifications?Authorization=gC8ULGtvqiwkMqTx4NzQexLL")!
var request = URLRequest(url: url)
// Creating URLRequest
// var request = URLRequest(url: URL(string: "https://api.test.trustdock.io/v2/verifications?Authorization =SC5ra2f1GDqMaAVZX289bpuH") ?? "")
request.httpMethod = "POST"
request.httpBody = try? JSONSerialization.data(withJSONObject: requestParams, options: .prettyPrinted)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("Bearer \("gC8ULGtvqiwkMqTx4NzQexLL")", forHTTPHeaderField: "Authorization")
let session = URLSession.shared.dataTask(with: request) {[unowned self] (data, response, error) in
guard let data = data, error == nil else {
let errorMessage = error?.localizedDescription ?? TrustDockSDKError.unknownError.localizedDescription
return
}
do {
let jsonData = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]
let statusCode = (response as! HTTPURLResponse).statusCode
let publicId = jsonData?["public_id"] as? String
let id = jsonData?["id"] as? String
let successMessage = (jsonData?["state"] as? String)
self.trustDockResponse = TrustDockResponse(id: id ?? "", publicID: publicId ?? "", message: successMessage ?? "", statusCode: statusCode)
} catch {
}
}
session.resume()
}
}
extension NewUserRegisterViewController: AddressPresenterDelegate{
func didSendData(city: String, Address: String){
self.cityTextField.text = city
self.address1TextField.text = Address
self.postalCodeTextField.text = self.postalCode
}
}

10
GME Remit/Modules/SplashScreen/User Interface/View/SplashScreenViewController.swift

@ -148,11 +148,11 @@ class SplashScreenViewController: UIViewController {
guard let transferFee = removeFraction?.stringWithoutZeroFraction else { return }
let currency = model.senderCurrency ?? ""
// serviceChargeTextField.text =
// "-\(transferFee) \(currency)\n(" + "transfer_fee_included_text".localized() + ")"
serviceChargeTextField.text =
"-\(transferFee) \(currency)\n(" + "transfer_fee_included_text".localized() + ")"
let exchangeRate = model.exchangeRate ?? ""
// exchangeRateTextField.text = "\(exchangeRate) \n" + "(" + "current_exchange_rate_text".localized() + ")"
exchangeRateTextField.text = "\(exchangeRate) \n" + "(" + "current_exchange_rate_text".localized() + ")"
calculatedInfoView.isHidden = false
@ -161,7 +161,7 @@ class SplashScreenViewController: UIViewController {
let roundedForUnit = round((calculatedForUnit) * 10) / 10
let translated = "current_exchange_rate_text".localized()
exchangeRateForUnitLabel.text = "\(translated) 1 \(selectedExchangeRateModel?.currency ?? "") = \(roundedForUnit) JPY"
exchangeRateForUnitLabel.text = "\(translated) 1 \(selectedExchangeRateModel?.currency ?? "") = \(roundedForUnit) GBP"
exchangeRateForUnitLabel.layer.cornerRadius = 5
exchangeRateForUnitLabel.layer.borderWidth = 0
exchangeRateForUnitLabel.backgroundColor = UIColor .clear
@ -245,7 +245,7 @@ class SplashScreenViewController: UIViewController {
hideNavBar()
setUpButtons()
appVersionLabel.text = "\(Utility.getAppVersion() ?? "") (jme)"
appVersionLabel.text = "\(Utility.getAppVersion() ?? "")"
// appVersionLabel.text = "0.0.1(jme)"
setExchangeRateUI()
setSegmentedControl()

70
GME Remit/MultiLanguages/en.lproj/Localizable.strings

@ -6,24 +6,24 @@
"connect_local_community_text" = "Connect to local community";
"earn_reward_point_text" = "Earn reward points and get surprise gifts";
"login_title_text" = "Welcome To\nJME";
"login_title_text" = "Welcome To\nIME London";
"login_subtitle_text" = "Login with your email address";
"login_user_id_text" = "Registered User ID";
"user_Id_placeholder_text" = "Registered Email";
"password_text" = "********";
"forgot_password_text" = "Forgot password";
"new_to_gme_text" = "New to JME? ";
"new_to_gme_text" = "New to IME London? ";
"login_register_here_text" = "Register Here";
"user_id_empty_error" = "User id cannot be empty";
"default_currency_text" = "JPY";
"default_currency_text" = "GBP";
//Existing User Registration
"id_number_text" = "ID Number";
"existing_jme_user_registration_text" = "Existing JME\nUser Registration";
"existing_jme_users_without_app_login" = "Existing JME Users without App Login";
"existing_userVerify_description" = "If you are already registered to JME and using its services currently please apply for mobile login by filling following information";
"existing_jme_user_registration_text" = "Existing IME London\nUser Registration";
"existing_jme_users_without_app_login" = "Existing IME London Users without App Login";
"existing_userVerify_description" = "If you are already registered to IME London and using its services currently please apply for mobile login by filling following information";
"for_validation_6_digit_pin_text" = "For validating your transaction, you will need a 6 digits transaction PIN, please specify a PIN below";
"new_pin_title" = "New PIN";
"new_pin_error_text" = "PIN should be 6 digit number";
@ -76,7 +76,7 @@
"jme_account_statement_text" = "Account Statement";
"deposit_slip_text" = "Slip Upload";
"upload_deposit_slip_text" = "Upload Deposit Slip";
"deposit_slip_remarks_text" = "Message to JME (optional)";
"deposit_slip_remarks_text" = "Message to IME London (optional)";
"please_provide_slip_photo_text" = "Please provide slip photo";
"home_text" = "Home";
"notice_text" = "Notice";
@ -87,9 +87,9 @@
"reward_point_text" = "Reward Point";
"available_balance_text" = "Your Available Balance";
"gme_wallet_no_text" = "JME Account No";
"gme_wallet_no_text" = "IME London Account No";
"auto_debit_account_text" = "Auto Debit Account";
"about_gme_text" = "About JME";
"about_gme_text" = "About IME London";
"settings_text" = "Settings";
"logout_text" = "LOG OUT";
"logout_confirmation_title_text" = "Logout";
@ -97,8 +97,8 @@
"exit_confirmation_text" = "Are you sure want to exit?";
"yes_text" = "Yes";
"no_text" = "No";
"jme_wallet_no_text" = "JME Account No.";
"jme_wallet_no_text_1" = "JME Remittance Card No.";
"jme_wallet_no_text" = "IME London Account No.";
"jme_wallet_no_text_1" = "IME London Remittance Card No.";
"how_to_deposit_text" = "How To Deposit";
"recipient_listing_title_text" = "Select Beneficiary";
@ -177,7 +177,7 @@
"service_charge_text" = "Service Charge";
"payout_agent_text" = "Payout Agent/Bank";
"i_have_read_to_text" = "I have read and agreed to ";
"jme_user_aggreement_text" = "1. JME Remittance User Agreement";
"jme_user_aggreement_text" = "1. IME London Remittance User Agreement";
"send_money_text" = "Send Money";
"enter_login_password_text" = "********";
"confirm_text" = "Confirm";
@ -195,8 +195,8 @@
"transfer_success_text" = "Transfer Successful";
"transfer_success_info_text" = "You have successfully transferred your money to ";
"total_payout_amount_text" = "Total Payout Amount";
"jme_control_no_text" = "JME Control No";
"gme_control_security_text" = "Please keep this Japan Money Express control no. very secure.";
"jme_control_no_text" = "IME London Control No";
"gme_control_security_text" = "Please keep this IME London control no. very secure.";
"share_party_text" = "Share with concerned party only";
"transaction_date_text" = "Transaction";
"receiver_text" = "Receiver";
@ -230,7 +230,7 @@
"setting_text" = "Setting";
"change_password_text" = "Change Password";
"about_me_description_text" = "Japan Money Express (JME) is a registered money transfer company with Kanto Local Financial Bureau under the Payment Services Act. JME provides easy, speedy, safe and reliable way to transfer money in many parts of the world.";
"about_me_description_text" = "IME London is a registered money transfer company with London Local Financial Bureau under the Payment Services Act. IME London provides easy, speedy, safe and reliable way to transfer money in many parts of the world.";
"app_version_text" = "App Version";
"follow_us_text" = "Follow us on";
"check_for_update_text" = "Check for Update";
@ -394,7 +394,7 @@
"select_business_type" = "Select Business Type";
"visa_status_text" = "Visa Status";
"select_visa_status" = "Select Visa Status";
"existing_user_description" = "If you are already registered to JME and using its services currently please apply for mobile login by filling following information";
"existing_user_description" = "If you are already registered to IME London and using its services currently please apply for mobile login by filling following information";
"select_source_of_fund_text" = "Select Source Of Fund";
"no_id_type_found_text" = "No Id Type found";
"search_id_text" = "Search Id Type";
@ -602,18 +602,18 @@
"placeholder_enter_id_number_text" = "Enter receiver's ID number";
// new registration
"userid_placeholder_text" = "Enter your ID for using JME";
"userid_placeholder_text" = "Enter your ID for using IME London";
"referralcode_placeholder_text" = "Referral Code(if any)";
"user_id_error_text" = "Invalid User ID";
"empty_field_error_text" = "Field cannot be empty";
"password_policy_text" = "Password must be at least 6 characters";
"kyc_form_exit_confirmation_text" = "KYC information is required to use Japan Money Express Services. Do you really want to exit?";
"kyc_form_exit_confirmation_text" = "KYC information is required to use IME London Services. Do you really want to exit?";
"retry_text" = "Retry";
// Login
"login_user_credential_title_text" = "User ID / Email / Mobile Number";
"login_user_credential_placholder_text" = "Enter either User ID / Email / Mobile Number";
"userid_title_text" = "Create a USERNAME to use JME";
"userid_title_text" = "Create a USERNAME to use IME London";
// inAppChat
"channelIO_error_message_text" = "Service not available.";
@ -716,13 +716,13 @@
"no_native_country_found_text" = "No native country found";
// Home's messageView
"autodebit_account_required_message" = "Please add your Auto Debit account to start using Japan Money Express services.";
"autodebit_account_required_message" = "Please add your Auto Debit account to start using IME London services.";
// Domestic Remittance
"local_transfer_text" = "Local Transfer";
"select_auto_debit_account_text" = "Select Your Auto-debit Account";
"domestic_available_balance_text" = "Available Balance";
"enter_send_amount_text" = "Enter Send Amount (JPY)";
"enter_send_amount_text" = "Enter Send Amount (GBP)";
"select_korea_bank" = "Select Bank";
"enter_account_text" = "Enter Account Number";
"recipient_name_text" = "Recipient Name";
@ -731,7 +731,7 @@
"account_balance_button_text" = "View Account Balance";
"doesnt_have_auto_debit_text" = "Please register an auto-debit account inorder to use this service.";
"amount_bigger_error_text" = "Amount bigger than Balance.";
"amount_minimum_error_text" = "Minimum sending amount should be at least 10,000 JPY";
"amount_minimum_error_text" = "Minimum sending amount should be at least 10,000 GBP";
"check_recipient_name_text" = "is recipient correct?";
"min_length_account_error_text" = "Bank Account No. should be at least 9 digits";
"invalid_account_error_text" = "Invalid bank account number";
@ -740,8 +740,8 @@
"local_text" = "Local";
"international_text" = "International";
"transfer_charge_text" = "Transfer Charge";
"will_deduct_info_text" = "It will deduct oooJPY (Amount + ServiceFee)";
"amount_max_error_text" = "Sending amount should not exceed 6,500,000 JPY";
"will_deduct_info_text" = "It will deduct oooGBP (Amount + ServiceFee)";
"amount_max_error_text" = "Sending amount should not exceed 6,500,000 GBP";
// Inbound
@ -752,7 +752,7 @@
"add_text" = "Add";
"inbound_text" = "Inbound";
"outbound_text" = "Outbound";
"pennytest_information_text" = "We have sent 1 JPY to your Bank Account, Please check the statement and enter the 4 digit number display after Japan Money Express.";
"pennytest_information_text" = "We have sent 1 GBP to your Bank Account, Please check the statement and enter the 4 digit number display after IME London.";
"deposit_reference_text" = "Deposit Reference";
"resend_text" = "Resend";
"added_inbound_account_message_text" = "Added your inbound account";
@ -763,7 +763,7 @@
"inbound_receipt_text" = "Inbound Receipt";
"transfer_processing_text" = "Transfer Processing";
"transfer_canceled_text" = "Transfer Canceled";
"you_have_to_register_text" = "You have to register account at Japan Money Express";
"you_have_to_register_text" = "You have to register account at IME London";
"transaction_will_be_processed_text" = "Transaction will be process soon";
"link_korean_bank_account" = "Link your Account to receive money from abroad.";
"control_no_text" = "Control No.";
@ -773,7 +773,7 @@
// Local Top up
"local_top_up_text" = "Local Top up";
"gme_wallet_text" = "Japan Money Express Wallet";
"gme_wallet_text" = "IME London Wallet";
"regular_type_text" = "Regular";
"regular_type_information_text_1" = "Confirm mobile phone number & Recharge amount.";
"regular_type_information_text_2" = "After completing recharge, refund is not available.";
@ -797,8 +797,8 @@
"waitinge_recent_request_text" = "You have a recent request for recharging.\nWait for the results of this request.";
"recharge_payment_text" = "Recharge Payment";
"expected_gme_wallet_balance_text" = "Expected Japan Money Express Wallet\nBalance";
"pay_using_gme_wallet_text" = "Pay Using Japan Money Express Wallet";
"expected_gme_wallet_balance_text" = "Expected IME London Wallet\nBalance";
"pay_using_gme_wallet_text" = "Pay Using IME London Wallet";
"select_type_text" = "Select Type";
"select_plan_text" = "Select Plan";
@ -812,7 +812,7 @@
// Manage Agreement
"terms_and_conditions_text" = "Terms and Conditions";
"terms_and_conditions_title_text" = "Please accept the terms and conditions.";
"terms_and_conditions_content_text" = "In order to use Japan Money Express's overseas remittances and domestic remittances smoothly, you need to agree to withdraw money from your account. Withdrawal transfer will be made through open banking from the account you agreed to withdraw when using services such as overseas remittance and domestic remittance.";
"terms_and_conditions_content_text" = "In order to use IME London's overseas remittances and domestic remittances smoothly, you need to agree to withdraw money from your account. Withdrawal transfer will be made through open banking from the account you agreed to withdraw when using services such as overseas remittance and domestic remittance.";
"personal_info_treatment_policy_text" = "Personal Information Treatment Policy";
"personal_info_usesage_text" = "Personal Information Collection and Usage Agreement";
"agreement_legal_text" = "Agreement of Legal Name Confirmation for Prohibiting Manipulation of the Law and Illegal Behavior";
@ -856,7 +856,7 @@
"select_city_text" = "Select City";
"step2_content_text" = "Do you have a phone number registered with Alien Registration Card under your name?";
"move_step2_to_step3_text" = "To verify your bank account, move to the last step, the penny test";
"registration_success_message_text" = "Thank you for registering for JME. We are verifying your information.";
"registration_success_message_text" = "Thank you for registering for IME London. We are verifying your information.";
//Profile
"change_personal_information_title_text" = "Personal Information";
@ -940,7 +940,7 @@
"request_summary_text" = "REQUEST SUMMARY";
"send_money_success_header_text" = "We have received your remittance \nrequest for";
"send_money_success_body_text" = "Please make payment of";
"send_money_success_footer_text" = "to JME within next working day to transmit this request.\nAfter payment please check notices to get JME Number\nfor this transfer.";
"send_money_success_footer_text" = "to IME within next working day to transmit this request.\nAfter payment please check notices to get IME Number\nfor this transfer.";
"renewId_text" = "Renew ID";
"saveButtonInfo_text" = "Name, Nationality, Address and Sex are stated in the personal identification document submitted here.";
@ -948,15 +948,15 @@
"invalidMonthlyIncome_text" = "Invalid Monthly Income";
//new addittion
"jme_membership_id_text" = "JME Membership ID";
"balance_with_jme_text" = "Balance with JME";
"jme_membership_id_text" = "IME London Membership ID";
"balance_with_jme_text" = "Balance with IME London";
"terms_and_condition_title_text1" = "Terms & Condition";
"goods_origin_text" = "Enter Goods Origin";
"goods_type_text" = "Enter Goods Type";
"port_of_shipment_text" = "Enter Port of Shipment";
"memberShipId_text" = "Membership ID";
"i_have_read_to_text_consent_text" = " I have read and agree to JME Terms & Conditions";
"i_have_read_to_text_consent_text" = " I have read and agree to IME London Terms & Conditions";
"enterCodeFromEmail_text" = "Enter the code received in email";
"fraud_guarantee_policy_text" = "Fraud Guarantee Policy";
"ok_text" = "Ok";

6
GME Remit/Shared/AddressCityViewController.storyboard

@ -20,7 +20,7 @@
<!--Address City View Controller-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController storyboardIdentifier="AddressCityViewController" id="Y6W-OH-hqX" customClass="AddressCityViewController" customModule="JME_Remit" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="AddressCityViewController" id="Y6W-OH-hqX" customClass="AddressCityViewController" customModule="IME_London" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -123,7 +123,7 @@
</constraints>
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Bnn-63-7cx" customClass="AddressTableCell" customModule="JME_Remit" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="AddressTableCell" id="Bnn-63-7cx" customClass="AddressTableCell" customModule="IME_London" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="325" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Bnn-63-7cx" id="RYd-is-g0T">
@ -132,7 +132,7 @@
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ml8-Uw-bmr">
<rect key="frame" x="16" y="4" width="293" height="36"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>

100
GME Remit/Shared/AddressCityViewController.swift

@ -2,6 +2,10 @@
import UIKit
protocol AddressPresenterDelegate: class {
func didSendData(city: String, Address: String)
}
class AddressCityViewController: UIViewController {
@IBOutlet private weak var titleLabel: UILabel!
@ -14,11 +18,18 @@ class AddressCityViewController: UIViewController {
@IBOutlet private weak var heightConstraint: NSLayoutConstraint!
@IBOutlet weak var tableView: UITableView!
var model: PostalData?
var address: [Address]?
var newAddress: [Address]?
var isSearching: Bool = false
weak var delegate: AddressPresenterDelegate?
var count = 0
override func viewDidLoad() {
super.viewDidLoad()
searchBar.delegate = self
self.tableView.delegate = self
self.tableView.dataSource = self
self.titleLabel.text = "Select Address"
self.setupTableView(data: model!)
// Do any additional setup after loading the view.
}
@ -31,14 +42,14 @@ class AddressCityViewController: UIViewController {
}
func setupTableView(data: PostalData){
//
// if data.address.count == 0 {
// notFoundLabel.isHidden = false
// notFoundLabel.alpha = 1.0
// } else {
// notFoundLabel.isHidden = true
// notFoundLabel.alpha = 0.0
// }
self.address = data.address
if self.address?.count == 0 {
notFoundLabel.isHidden = false
notFoundLabel.alpha = 1.0
} else {
notFoundLabel.isHidden = true
notFoundLabel.alpha = 0.0
}
tableView.reloadData()
@ -47,34 +58,63 @@ class AddressCityViewController: UIViewController {
}
extension AddressCityViewController: UITableViewDelegate, UITableViewDataSource{
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 40
return 40
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
//return model?.address.count
if isSearching{
return newAddress?.count ?? 0
}else{
return address?.count ?? 0
}
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// let cell: AddressTableCell = tableView.dequeueReusableCell(withIdentifier: "AddressTableCell") as! AddressTableCell
// let cell = UITableViewCell()
guard let cell = tableView.dequeueReusableCell(withIdentifier: "AddressTableCell") as? AddressTableCell else {
return UITableViewCell()
}
// cell.cellTitleLabel.text = self.model?.address[indexPath.row].address1
//
// cell.setModel(model?.address[indexPath.row])
let cell: AddressTableCell = tableView.dequeueReusableCell(withIdentifier: "AddressTableCell") as! AddressTableCell
if isSearching{
cell.cellTitleLabel.text = self.newAddress?[indexPath.row].address1
return cell
}else{
cell.cellTitleLabel.text = self.address?[indexPath.row].address1
}
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// mainView.originToBottom {[weak self] in guard let `self` = self else { return }
// self.delegate?.tablePresenterView(self, didSelectModel: self.model?[indexPath.row])
// self.dismiss(animated: true)
}
if isSearching{
self.delegate?.didSendData(city: self.newAddress?[indexPath.row].city ?? "", Address: self.newAddress?[indexPath.row].address1 ?? "")
}else{
self.delegate?.didSendData(city: self.address?[indexPath.row].city ?? "", Address: self.address?[indexPath.row].address1 ?? "")
}
self.dismiss(animated: true)
}
}
extension AddressCityViewController: UISearchBarDelegate {
func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
print("\(searchText)")
isSearching = true
guard let filteredSearchText = searchText.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else { return }
let filterdModel = address?
.filter({
$0.address1?
.lowercased()
.contains(filteredSearchText.lowercased()) ?? false
})
self.newAddress = filterdModel
if searchText.count == 0{
self.newAddress = self.address
}
self.tableView.reloadData()
}
}

26
GME Remit/Shared/Models/Address.swift

@ -35,32 +35,6 @@ extension Address: TablePresenterProtocol {
}
}
struct City: Mappable {
var city: String?
var id: String?
var address1: String?
var type: String?
init?(map: Map) {
}
mutating func mapping(map: Map) {
city <- map["City"]
id <- map["Id"]
address1 <- map["Address1"]
type <- map["Type"]
}
}
extension City: TablePresenterProtocol {
var cellTitle: String? {
return city
}
var cellImage: UIImage? {
return nil
}
}
struct NativeCountry: Mappable {
var id: String?
var text: String?

2
GME Remit/Shared/Models/PostalData.swift

@ -13,7 +13,6 @@ struct PostalData: Mappable {
var nativeCountry: String?
var gender: String?
var address: [Address]?
var city: [City]?
init?(map: Map) {
}
@ -22,7 +21,6 @@ struct PostalData: Mappable {
nativeCountry <- map["NativeCountry"]
gender <- map["Gender"]
address <- map["Addresses"]
city <- map["Addresses"]
}
}

Loading…
Cancel
Save