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. 118
      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. 80
      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_ENTITLEMENTS = "GME Remit.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 1.0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 926Z34F5DW; DEVELOPMENT_TEAM = 926Z34F5DW;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module", "$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
@ -9069,7 +9068,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module", "$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
); );
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.8;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
"OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--generate-entitlement-der"; "OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--generate-entitlement-der";
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
@ -9095,11 +9094,12 @@
CODE_SIGN_ENTITLEMENTS = "GME Remit/GME RemitRelease.entitlements"; CODE_SIGN_ENTITLEMENTS = "GME Remit/GME RemitRelease.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 1.0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 926Z34F5DW; DEVELOPMENT_TEAM = 926Z34F5DW;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = arm64; EXCLUDED_ARCHS = arm64;
"EXCLUDED_ARCHS[sdk=*]" = "";
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module", "$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
@ -9117,7 +9117,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module", "$(PROJECT_DIR)/GME\\ Remit/ThirdParty/virtualKeyboard/mtk_module",
); );
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.3.8;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(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"?> <?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"/> <device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <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="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
@ -24,7 +24,7 @@
<!--Login View Controller--> <!--Login View Controller-->
<scene sceneID="3PZ-9f-Dk0"> <scene sceneID="3PZ-9f-Dk0">
<objects> <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"> <view key="view" contentMode="scaleToFill" id="DTh-9U-4Cr">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/> <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <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"> <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"/> <rect key="frame" x="0.0" y="0.0" width="320" height="132.5"/>
<subviews> <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"/> <rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="GUa-vy-zLw"/> <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"/> <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"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<string key="text">Welcome to <string key="text">Welcome to
JME</string>
IME London</string>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="26"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="26"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <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"> <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"/> <rect key="frame" x="20" y="210.5" width="280" height="120"/>
<subviews> <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"/> <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="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
@ -94,7 +94,7 @@ JME</string>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NgM-ZM-0uD"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NgM-ZM-0uD">
<rect key="frame" x="0.0" y="70" width="280" height="50"/> <rect key="frame" x="0.0" y="70" width="280" height="50"/>
<subviews> <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"/> <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="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" name="ThemeText"/> <color key="textColor" name="ThemeText"/>
@ -165,16 +165,16 @@ JME</string>
</connections> </connections>
</button> </button>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="qZ0-Mc-eUA"> <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> <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"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" name="ThemeText"/> <color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GFb-Or-Tqp"> <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"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<state key="normal" title="Register Here"> <state key="normal" title="Register Here">
<color key="titleColor" name="ThemeBlue"/> <color key="titleColor" name="ThemeBlue"/>
@ -271,7 +271,7 @@ JME</string>
</scenes> </scenes>
<designables> <designables>
<designable name="GkK-3R-8Nq"> <designable name="GkK-3R-8Nq">
<size key="intrinsicContentSize" width="187.5" height="34"/>
<size key="intrinsicContentSize" width="233" height="34"/>
</designable> </designable>
<designable name="pCq-Gh-cKW"> <designable name="pCq-Gh-cKW">
<size key="intrinsicContentSize" width="79" height="34"/> <size key="intrinsicContentSize" width="79" height="34"/>
@ -279,12 +279,12 @@ JME</string>
</designables> </designables>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources> <resources>
<image name="IME_london-coin-curve" width="1200" height="1200"/>
<image name="Show" width="20" height="14"/> <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="fingerprint" width="8" height="8"/>
<image name="jme_logo" width="93" height="60"/>
<image name="key" width="24" height="24"/> <image name="key" width="24" height="24"/>
<image name="profile" width="26" height="26"/>
<image name="profile" width="24" height="24"/>
<namedColor name="ThemeBlue"> <namedColor name="ThemeBlue">
<color red="0.047058823529411764" green="0.12941176470588237" blue="0.41176470588235292" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.047058823529411764" green="0.12941176470588237" blue="0.41176470588235292" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>

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

@ -208,7 +208,7 @@ class NewUserRegisterViewController: UIViewController {
} }
} }
// MARK: Other Functions // MARK: Other Functions
// var trustDockResponse: TrustDockResponse?
var trustDockResponse: TrustDockResponse?
private func setup() { private func setup() {
configureLanguage() configureLanguage()
@ -401,9 +401,9 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
} }
GMEDB.shared.user.set(id, .userId) GMEDB.shared.user.set(id, .userId)
KeyChain.shared.save(data: id, key: .temporaryID) 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)
}
} }
} }
@ -431,23 +431,19 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
func obtainedPostal(data: PostalInformation) { func obtainedPostal(data: PostalInformation) {
let address = data.data 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
let configure = TablePresenterConfiguration(presenterTitle: "Select City")
cityTextField.useAsDropDown(with: configure, items: address?.city)
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
}
let configure1 = TablePresenterConfiguration(presenterTitle: "Select Address1")
address1TextField.useAsDropDown(with: configure1, items: address?.address)
viewController.model = data.data!
viewController.delegate = self
self.present(viewController, animated: true, completion: nil)
}
} }
@ -462,42 +458,50 @@ extension NewUserRegisterViewController: NewUserRegisterViewInterface {
} }
// 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 } guard let transferFee = removeFraction?.stringWithoutZeroFraction else { return }
let currency = model.senderCurrency ?? "" 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 ?? "" 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 calculatedInfoView.isHidden = false
@ -161,7 +161,7 @@ class SplashScreenViewController: UIViewController {
let roundedForUnit = round((calculatedForUnit) * 10) / 10 let roundedForUnit = round((calculatedForUnit) * 10) / 10
let translated = "current_exchange_rate_text".localized() 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.cornerRadius = 5
exchangeRateForUnitLabel.layer.borderWidth = 0 exchangeRateForUnitLabel.layer.borderWidth = 0
exchangeRateForUnitLabel.backgroundColor = UIColor .clear exchangeRateForUnitLabel.backgroundColor = UIColor .clear
@ -245,7 +245,7 @@ class SplashScreenViewController: UIViewController {
hideNavBar() hideNavBar()
setUpButtons() setUpButtons()
appVersionLabel.text = "\(Utility.getAppVersion() ?? "") (jme)"
appVersionLabel.text = "\(Utility.getAppVersion() ?? "")"
// appVersionLabel.text = "0.0.1(jme)" // appVersionLabel.text = "0.0.1(jme)"
setExchangeRateUI() setExchangeRateUI()
setSegmentedControl() setSegmentedControl()

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

@ -6,24 +6,24 @@
"connect_local_community_text" = "Connect to local community"; "connect_local_community_text" = "Connect to local community";
"earn_reward_point_text" = "Earn reward points and get surprise gifts"; "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_subtitle_text" = "Login with your email address";
"login_user_id_text" = "Registered User ID"; "login_user_id_text" = "Registered User ID";
"user_Id_placeholder_text" = "Registered Email"; "user_Id_placeholder_text" = "Registered Email";
"password_text" = "********"; "password_text" = "********";
"forgot_password_text" = "Forgot password"; "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"; "login_register_here_text" = "Register Here";
"user_id_empty_error" = "User id cannot be empty"; "user_id_empty_error" = "User id cannot be empty";
"default_currency_text" = "JPY";
"default_currency_text" = "GBP";
//Existing User Registration //Existing User Registration
"id_number_text" = "ID Number"; "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"; "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_title" = "New PIN";
"new_pin_error_text" = "PIN should be 6 digit number"; "new_pin_error_text" = "PIN should be 6 digit number";
@ -76,7 +76,7 @@
"jme_account_statement_text" = "Account Statement"; "jme_account_statement_text" = "Account Statement";
"deposit_slip_text" = "Slip Upload"; "deposit_slip_text" = "Slip Upload";
"upload_deposit_slip_text" = "Upload Deposit Slip"; "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"; "please_provide_slip_photo_text" = "Please provide slip photo";
"home_text" = "Home"; "home_text" = "Home";
"notice_text" = "Notice"; "notice_text" = "Notice";
@ -87,9 +87,9 @@
"reward_point_text" = "Reward Point"; "reward_point_text" = "Reward Point";
"available_balance_text" = "Your Available Balance"; "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"; "auto_debit_account_text" = "Auto Debit Account";
"about_gme_text" = "About JME";
"about_gme_text" = "About IME London";
"settings_text" = "Settings"; "settings_text" = "Settings";
"logout_text" = "LOG OUT"; "logout_text" = "LOG OUT";
"logout_confirmation_title_text" = "Logout"; "logout_confirmation_title_text" = "Logout";
@ -97,8 +97,8 @@
"exit_confirmation_text" = "Are you sure want to exit?"; "exit_confirmation_text" = "Are you sure want to exit?";
"yes_text" = "Yes"; "yes_text" = "Yes";
"no_text" = "No"; "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"; "how_to_deposit_text" = "How To Deposit";
"recipient_listing_title_text" = "Select Beneficiary"; "recipient_listing_title_text" = "Select Beneficiary";
@ -177,7 +177,7 @@
"service_charge_text" = "Service Charge"; "service_charge_text" = "Service Charge";
"payout_agent_text" = "Payout Agent/Bank"; "payout_agent_text" = "Payout Agent/Bank";
"i_have_read_to_text" = "I have read and agreed to "; "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"; "send_money_text" = "Send Money";
"enter_login_password_text" = "********"; "enter_login_password_text" = "********";
"confirm_text" = "Confirm"; "confirm_text" = "Confirm";
@ -195,8 +195,8 @@
"transfer_success_text" = "Transfer Successful"; "transfer_success_text" = "Transfer Successful";
"transfer_success_info_text" = "You have successfully transferred your money to "; "transfer_success_info_text" = "You have successfully transferred your money to ";
"total_payout_amount_text" = "Total Payout Amount"; "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"; "share_party_text" = "Share with concerned party only";
"transaction_date_text" = "Transaction"; "transaction_date_text" = "Transaction";
"receiver_text" = "Receiver"; "receiver_text" = "Receiver";
@ -230,7 +230,7 @@
"setting_text" = "Setting"; "setting_text" = "Setting";
"change_password_text" = "Change Password"; "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"; "app_version_text" = "App Version";
"follow_us_text" = "Follow us on"; "follow_us_text" = "Follow us on";
"check_for_update_text" = "Check for Update"; "check_for_update_text" = "Check for Update";
@ -394,7 +394,7 @@
"select_business_type" = "Select Business Type"; "select_business_type" = "Select Business Type";
"visa_status_text" = "Visa Status"; "visa_status_text" = "Visa Status";
"select_visa_status" = "Select 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"; "select_source_of_fund_text" = "Select Source Of Fund";
"no_id_type_found_text" = "No Id Type found"; "no_id_type_found_text" = "No Id Type found";
"search_id_text" = "Search Id Type"; "search_id_text" = "Search Id Type";
@ -602,18 +602,18 @@
"placeholder_enter_id_number_text" = "Enter receiver's ID number"; "placeholder_enter_id_number_text" = "Enter receiver's ID number";
// new registration // 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)"; "referralcode_placeholder_text" = "Referral Code(if any)";
"user_id_error_text" = "Invalid User ID"; "user_id_error_text" = "Invalid User ID";
"empty_field_error_text" = "Field cannot be empty"; "empty_field_error_text" = "Field cannot be empty";
"password_policy_text" = "Password must be at least 6 characters"; "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"; "retry_text" = "Retry";
// Login // Login
"login_user_credential_title_text" = "User ID / Email / Mobile Number"; "login_user_credential_title_text" = "User ID / Email / Mobile Number";
"login_user_credential_placholder_text" = "Enter either 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 // inAppChat
"channelIO_error_message_text" = "Service not available."; "channelIO_error_message_text" = "Service not available.";
@ -716,13 +716,13 @@
"no_native_country_found_text" = "No native country found"; "no_native_country_found_text" = "No native country found";
// Home's messageView // 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 // Domestic Remittance
"local_transfer_text" = "Local Transfer"; "local_transfer_text" = "Local Transfer";
"select_auto_debit_account_text" = "Select Your Auto-debit Account"; "select_auto_debit_account_text" = "Select Your Auto-debit Account";
"domestic_available_balance_text" = "Available Balance"; "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"; "select_korea_bank" = "Select Bank";
"enter_account_text" = "Enter Account Number"; "enter_account_text" = "Enter Account Number";
"recipient_name_text" = "Recipient Name"; "recipient_name_text" = "Recipient Name";
@ -731,7 +731,7 @@
"account_balance_button_text" = "View Account Balance"; "account_balance_button_text" = "View Account Balance";
"doesnt_have_auto_debit_text" = "Please register an auto-debit account inorder to use this service."; "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_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?"; "check_recipient_name_text" = "is recipient correct?";
"min_length_account_error_text" = "Bank Account No. should be at least 9 digits"; "min_length_account_error_text" = "Bank Account No. should be at least 9 digits";
"invalid_account_error_text" = "Invalid bank account number"; "invalid_account_error_text" = "Invalid bank account number";
@ -740,8 +740,8 @@
"local_text" = "Local"; "local_text" = "Local";
"international_text" = "International"; "international_text" = "International";
"transfer_charge_text" = "Transfer Charge"; "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 // Inbound
@ -752,7 +752,7 @@
"add_text" = "Add"; "add_text" = "Add";
"inbound_text" = "Inbound"; "inbound_text" = "Inbound";
"outbound_text" = "Outbound"; "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"; "deposit_reference_text" = "Deposit Reference";
"resend_text" = "Resend"; "resend_text" = "Resend";
"added_inbound_account_message_text" = "Added your inbound account"; "added_inbound_account_message_text" = "Added your inbound account";
@ -763,7 +763,7 @@
"inbound_receipt_text" = "Inbound Receipt"; "inbound_receipt_text" = "Inbound Receipt";
"transfer_processing_text" = "Transfer Processing"; "transfer_processing_text" = "Transfer Processing";
"transfer_canceled_text" = "Transfer Canceled"; "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"; "transaction_will_be_processed_text" = "Transaction will be process soon";
"link_korean_bank_account" = "Link your Account to receive money from abroad."; "link_korean_bank_account" = "Link your Account to receive money from abroad.";
"control_no_text" = "Control No."; "control_no_text" = "Control No.";
@ -773,7 +773,7 @@
// Local Top up // Local Top up
"local_top_up_text" = "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_text" = "Regular";
"regular_type_information_text_1" = "Confirm mobile phone number & Recharge amount."; "regular_type_information_text_1" = "Confirm mobile phone number & Recharge amount.";
"regular_type_information_text_2" = "After completing recharge, refund is not available."; "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."; "waitinge_recent_request_text" = "You have a recent request for recharging.\nWait for the results of this request.";
"recharge_payment_text" = "Recharge Payment"; "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_type_text" = "Select Type";
"select_plan_text" = "Select Plan"; "select_plan_text" = "Select Plan";
@ -812,7 +812,7 @@
// Manage Agreement // Manage Agreement
"terms_and_conditions_text" = "Terms and Conditions"; "terms_and_conditions_text" = "Terms and Conditions";
"terms_and_conditions_title_text" = "Please accept the 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_treatment_policy_text" = "Personal Information Treatment Policy";
"personal_info_usesage_text" = "Personal Information Collection and Usage Agreement"; "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"; "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"; "select_city_text" = "Select City";
"step2_content_text" = "Do you have a phone number registered with Alien Registration Card under your name?"; "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"; "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 //Profile
"change_personal_information_title_text" = "Personal Information"; "change_personal_information_title_text" = "Personal Information";
@ -940,7 +940,7 @@
"request_summary_text" = "REQUEST SUMMARY"; "request_summary_text" = "REQUEST SUMMARY";
"send_money_success_header_text" = "We have received your remittance \nrequest for"; "send_money_success_header_text" = "We have received your remittance \nrequest for";
"send_money_success_body_text" = "Please make payment of"; "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"; "renewId_text" = "Renew ID";
"saveButtonInfo_text" = "Name, Nationality, Address and Sex are stated in the personal identification document submitted here."; "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"; "invalidMonthlyIncome_text" = "Invalid Monthly Income";
//new addittion //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"; "terms_and_condition_title_text1" = "Terms & Condition";
"goods_origin_text" = "Enter Goods Origin"; "goods_origin_text" = "Enter Goods Origin";
"goods_type_text" = "Enter Goods Type"; "goods_type_text" = "Enter Goods Type";
"port_of_shipment_text" = "Enter Port of Shipment"; "port_of_shipment_text" = "Enter Port of Shipment";
"memberShipId_text" = "Membership ID"; "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"; "enterCodeFromEmail_text" = "Enter the code received in email";
"fraud_guarantee_policy_text" = "Fraud Guarantee Policy"; "fraud_guarantee_policy_text" = "Fraud Guarantee Policy";
"ok_text" = "Ok"; "ok_text" = "Ok";

6
GME Remit/Shared/AddressCityViewController.storyboard

@ -20,7 +20,7 @@
<!--Address City View Controller--> <!--Address City View Controller-->
<scene sceneID="s0d-6b-0kx"> <scene sceneID="s0d-6b-0kx">
<objects> <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"> <view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -123,7 +123,7 @@
</constraints> </constraints>
</view> </view>
<prototypes> <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"/> <rect key="frame" x="0.0" y="50" width="325" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Bnn-63-7cx" id="RYd-is-g0T"> <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> <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"> <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"/> <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"/> <color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>

80
GME Remit/Shared/AddressCityViewController.swift

@ -2,6 +2,10 @@
import UIKit import UIKit
protocol AddressPresenterDelegate: class {
func didSendData(city: String, Address: String)
}
class AddressCityViewController: UIViewController { class AddressCityViewController: UIViewController {
@IBOutlet private weak var titleLabel: UILabel! @IBOutlet private weak var titleLabel: UILabel!
@ -14,11 +18,18 @@ class AddressCityViewController: UIViewController {
@IBOutlet private weak var heightConstraint: NSLayoutConstraint! @IBOutlet private weak var heightConstraint: NSLayoutConstraint!
@IBOutlet weak var tableView: UITableView! @IBOutlet weak var tableView: UITableView!
var model: PostalData? var model: PostalData?
var address: [Address]?
var newAddress: [Address]?
var isSearching: Bool = false
weak var delegate: AddressPresenterDelegate?
var count = 0
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
searchBar.delegate = self
self.tableView.delegate = self self.tableView.delegate = self
self.tableView.dataSource = self self.tableView.dataSource = self
self.titleLabel.text = "Select Address"
self.setupTableView(data: model!) self.setupTableView(data: model!)
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
@ -31,14 +42,14 @@ class AddressCityViewController: UIViewController {
} }
func setupTableView(data: PostalData){ 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() tableView.reloadData()
@ -53,28 +64,57 @@ extension AddressCityViewController: UITableViewDelegate, UITableViewDataSource{
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 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 { 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()
let cell: AddressTableCell = tableView.dequeueReusableCell(withIdentifier: "AddressTableCell") as! AddressTableCell
if isSearching{
cell.cellTitleLabel.text = self.newAddress?[indexPath.row].address1
}else{
cell.cellTitleLabel.text = self.address?[indexPath.row].address1
} }
// cell.cellTitleLabel.text = self.model?.address[indexPath.row].address1
//
// cell.setModel(model?.address[indexPath.row])
return cell return cell
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 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 { struct NativeCountry: Mappable {
var id: String? var id: String?
var text: String? var text: String?

2
GME Remit/Shared/Models/PostalData.swift

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

Loading…
Cancel
Save