Browse Source

kyc changed

pull/1/head
Amrit 4 years ago
parent
commit
12edda72d4
  1. BIN
      .DS_Store
  2. 82
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/Presenter/NewRegisterPresenter.swift
  3. 6
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/View/NewRegister.storyboard
  4. 7
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/View/NewRegisterViewController.swift
  5. 23
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/Wireframe/NewRegisterWireframe.swift
  6. 2
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift
  7. 2
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard
  8. 1665
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1ViewController.swift
  9. 6
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep2/User Interface/View/NewRegisterStep2.storyboard
  10. 6
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep3/User Interface/View/NewRegisterStep3.storyboard

BIN
.DS_Store

82
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/Presenter/NewRegisterPresenter.swift

@ -10,56 +10,58 @@ import RxSwift
import RxCocoa import RxCocoa
class NewRegisterPresenter: ViewModelType { class NewRegisterPresenter: ViewModelType {
var interactor: NewRegisterInteractorInput?
var wireframe: NewRegisterWireframeInput?
var interactor: NewRegisterInteractorInput?
var wireframe: NewRegisterWireframeInput?
struct Input {
let moveStep: Driver<NewRegisterViewController.Step>
}
struct Input {
let moveStep: Driver<NewRegisterViewController.Step>
}
struct Output {
let isError: Driver<Error>
let isProgress: Driver<Bool>
}
struct Output {
let isError: Driver<Error>
let isProgress: Driver<Bool>
}
private let disposeBag = DisposeBag()
private let disposeBag = DisposeBag()
private let progressLinker = PublishSubject<Bool>()
private let errorLinker = PublishSubject<Error>()
private let progressLinker = PublishSubject<Bool>()
private let errorLinker = PublishSubject<Error>()
func transform(input: Input) -> Output {
input.moveStep.drive(onNext: {[weak self] in
switch $0 {
case .third:
let status = GMEDB.shared.user.string(.pennyTestStatusCode) ?? "0"
if status == "1" {
self?.wireframe?.moveStep(to: $0)
} else {
self?.progressLinker.onNext(true)
self?.interactor?.requestPennyTest()
}
func transform(input: Input) -> Output {
input.moveStep.drive(onNext: {[weak self] in
switch $0 {
case .third:
let status = GMEDB.shared.user.string(.pennyTestStatusCode) ?? "0"
if status == "1" {
self?.wireframe?.moveStep(to: $0)
} else {
self?.progressLinker.onNext(true)
self?.interactor?.requestPennyTest()
}
default:
self?.wireframe?.moveStep(to: $0)
}
}).disposed(by: disposeBag)
case .upload:
break
default:
self?.wireframe?.moveStep(to: $0)
}
}).disposed(by: disposeBag)
return Output(
isError: errorLinker.asDriverOnErrorJustComplete(),
isProgress: progressLinker.asDriverOnErrorJustComplete()
)
}
return Output(
isError: errorLinker.asDriverOnErrorJustComplete(),
isProgress: progressLinker.asDriverOnErrorJustComplete()
)
}
} }
// MARK: NewRegister interactor output interface // MARK: NewRegister interactor output interface
extension NewRegisterPresenter: NewRegisterInteractorOutput { extension NewRegisterPresenter: NewRegisterInteractorOutput {
func resultRequestPennyTest(with message: SuccessMessage) {
progressLinker.onNext(false)
wireframe?.moveStep(to: .third)
}
func resultRequestPennyTest(with message: SuccessMessage) {
progressLinker.onNext(false)
wireframe?.moveStep(to: .third)
}
func setError(with error: Error) {
progressLinker.onNext(false)
errorLinker.onNext(error)
}
func setError(with error: Error) {
progressLinker.onNext(false)
errorLinker.onNext(error)
}
} }

6
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/View/NewRegister.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="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Icx-Ri-Xne">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Icx-Ri-Xne">
<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="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -215,6 +215,7 @@ Penny Test</string>
<point key="canvasLocation" x="-92" y="232.53373313343329"/> <point key="canvasLocation" x="-92" y="232.53373313343329"/>
</scene> </scene>
</scenes> </scenes>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources> <resources>
<namedColor name="ThemeBlue"> <namedColor name="ThemeBlue">
<color red="0.18823529411764706" green="0.24313725490196078" blue="0.62352941176470589" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.18823529411764706" green="0.24313725490196078" blue="0.62352941176470589" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -235,5 +236,4 @@ Penny Test</string>
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
</resources> </resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</document> </document>

7
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/View/NewRegisterViewController.swift

@ -15,6 +15,9 @@ protocol NewRegisterDelegate: class {
_ viewController: UIViewController, _ viewController: UIViewController,
currentStep: NewRegisterViewController.Step, currentStep: NewRegisterViewController.Step,
nextStep: NewRegisterViewController.Step) nextStep: NewRegisterViewController.Step)
//In Case when only two process are implemented (Personal Information and Document Upload)
func changeTopProgress()
} }
class NewRegisterViewController: UIViewController { class NewRegisterViewController: UIViewController {
@ -23,6 +26,8 @@ class NewRegisterViewController: UIViewController {
case second case second
case third case third
case finish case finish
//In case of only 2 process implemented
case upload
} }
// MARK: Properties // MARK: Properties
@ -160,7 +165,7 @@ extension NewRegisterViewController {
func setMultilanguages() { func setMultilanguages() {
step1TitleLabel.text = "step1_sub_title_text".localized() step1TitleLabel.text = "step1_sub_title_text".localized()
step2TitleLabel.text = "step2_sub_title_text".localized()
step2TitleLabel.text = "Documents"//"step2_sub_title_text".localized()
step3TitleLabel.text = "step3_sub_title_text".localized() step3TitleLabel.text = "step3_sub_title_text".localized()
} }
} }

23
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegister/User Interface/Wireframe/NewRegisterWireframe.swift

@ -70,7 +70,8 @@ extension NewRegisterWireframe: NewRegisterWireframeInput {
guard let `self` = self else { return } guard let `self` = self else { return }
self.move(self.step3VC) self.move(self.step3VC)
} }
case .upload:
break
case .finish: case .finish:
view.alertWithOk( view.alertWithOk(
type: .success, type: .success,
@ -206,12 +207,18 @@ extension NewRegisterWireframe: NewRegisterWireframeInput {
} }
extension NewRegisterWireframe: NewRegisterDelegate { extension NewRegisterWireframe: NewRegisterDelegate {
func newRegister(
_ viewController: UIViewController,
currentStep: NewRegisterViewController.Step,
nextStep: NewRegisterViewController.Step
) {
stepper?.onNext(nextStep)
}
func newRegister(
_ viewController: UIViewController,
currentStep: NewRegisterViewController.Step,
nextStep: NewRegisterViewController.Step
) {
// stepper?.onNext(nextStep)
stepper?.onNext(.finish)
}
func changeTopProgress(){
print("Change Status")
stepper?.onNext(.upload)
}
} }

2
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift

@ -48,13 +48,13 @@ extension NewRegisterStep1Interactor: NewRegisterStep1InteractorInput {
storedModel?.primaryInformation?.bankAccount != saveModel?.primaryInformation?.bankAccount { storedModel?.primaryInformation?.bankAccount != saveModel?.primaryInformation?.bankAccount {
GMEDB.shared.user.set("0", .pennyTestStatusCode) GMEDB.shared.user.set("0", .pennyTestStatusCode)
} }
service.saveInformation( service.saveInformation(
with: model, with: model,
success: {[weak self] in success: {[weak self] in
self?.output?.setSaveResult(with: self?.saveModel, message: $0) self?.output?.setSaveResult(with: self?.saveModel, message: $0)
}, },
failure: {[weak self] in failure: {[weak self] in
// self?.output?.setSaveResult(with: self?.saveModel, message: $0.localizedDescription)
self?.output?.setError(with: $0) self?.output?.setError(with: $0)
} }
) )

2
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard

@ -882,9 +882,11 @@
<outlet property="passportSampleButton" destination="5bW-bG-7tS" id="G1W-Ev-Wnj"/> <outlet property="passportSampleButton" destination="5bW-bG-7tS" id="G1W-Ev-Wnj"/>
<outlet property="personalInformationGroupImageView" destination="XYt-Np-U5M" id="Pvu-kN-1XP"/> <outlet property="personalInformationGroupImageView" destination="XYt-Np-U5M" id="Pvu-kN-1XP"/>
<outlet property="personalInformationLabel" destination="gYv-nJ-MpW" id="rlM-ds-ggX"/> <outlet property="personalInformationLabel" destination="gYv-nJ-MpW" id="rlM-ds-ggX"/>
<outlet property="personalInformationStack" destination="WvQ-u9-oWm" id="tzw-6X-X3K"/>
<outlet property="personalSaveButton" destination="Qut-dC-Nuf" id="8oa-Vw-76Q"/> <outlet property="personalSaveButton" destination="Qut-dC-Nuf" id="8oa-Vw-76Q"/>
<outlet property="picturesInformationGroupImageView" destination="LBl-eB-PBw" id="0Lh-F2-Y0p"/> <outlet property="picturesInformationGroupImageView" destination="LBl-eB-PBw" id="0Lh-F2-Y0p"/>
<outlet property="picturesSaveButton" destination="7Mi-XW-eEl" id="Yqy-m3-I5p"/> <outlet property="picturesSaveButton" destination="7Mi-XW-eEl" id="Yqy-m3-I5p"/>
<outlet property="primaryInformationCHildStack" destination="j3E-yb-vrP" id="OZi-P8-97k"/>
<outlet property="primaryInformationContainerView" destination="zZG-kb-0IG" id="1hp-85-jlx"/> <outlet property="primaryInformationContainerView" destination="zZG-kb-0IG" id="1hp-85-jlx"/>
<outlet property="referralTextField" destination="fSE-TQ-HgI" id="v8E-Vs-fIk"/> <outlet property="referralTextField" destination="fSE-TQ-HgI" id="v8E-Vs-fIk"/>
<outlet property="scrollView" destination="oNZ-lD-63n" id="6Cz-DE-s2D"/> <outlet property="scrollView" destination="oNZ-lD-63n" id="6Cz-DE-s2D"/>

1665
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1ViewController.swift
File diff suppressed because it is too large
View File

6
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep2/User Interface/View/NewRegisterStep2.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="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5">
<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="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -123,6 +123,7 @@
<point key="canvasLocation" x="-92.753623188405811" y="232.36607142857142"/> <point key="canvasLocation" x="-92.753623188405811" y="232.36607142857142"/>
</scene> </scene>
</scenes> </scenes>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources> <resources>
<image name="ic_mobile_with_arc" width="512" height="512"/> <image name="ic_mobile_with_arc" width="512" height="512"/>
<namedColor name="ThemeMainBackground"> <namedColor name="ThemeMainBackground">
@ -135,5 +136,4 @@
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
</resources> </resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</document> </document>

6
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep3/User Interface/View/NewRegisterStep3.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="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5">
<device id="retina6_5" orientation="portrait" appearance="light"/> <device id="retina6_5" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -206,6 +206,7 @@ enter the 4 digit number display after GME.</string>
<point key="canvasLocation" x="-91" y="233"/> <point key="canvasLocation" x="-91" y="233"/>
</scene> </scene>
</scenes> </scenes>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources> <resources>
<image name="ic_koreaBank" width="100" height="66"/> <image name="ic_koreaBank" width="100" height="66"/>
<namedColor name="ThemeMainBackground"> <namedColor name="ThemeMainBackground">
@ -218,5 +219,4 @@ enter the 4 digit number display after GME.</string>
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
</resources> </resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</document> </document>
Loading…
Cancel
Save