From e7ae54691c9fa9450011e5d0c37bac61621f180f Mon Sep 17 00:00:00 2001 From: InKwon James Kim Date: Tue, 10 Dec 2019 19:06:35 +0900 Subject: [PATCH 1/7] - add auto fill data at NewRegistration Step 1 - edit balance setting at DomesticRemit --- GME Remit.xcodeproj/project.pbxproj | 16 + .../NewRegisterStep1Interactor.swift | 16 +- .../NewRegisterStep1InteractorIO.swift | 5 +- .../Model/KYCInfromation.swift | 34 + .../Application Logic/Model/KeyValue.swift | 21 +- .../Model/PersonalInformation.swift | 59 ++ .../Model/PictureInformation.swift | 25 + .../Model/PrimaryInformation.swift | 59 ++ .../Service/NewRegisterStep1Service.swift | 674 +++++++++++++++++- .../Service/NewRegisterStep1ServiceType.swift | 5 +- .../Presenter/NewRegisterStep1Presenter.swift | 152 +++- .../View/NewRegisterStep1.storyboard | 79 +- .../View/NewRegisterStep1ViewController.swift | 180 ++++- .../Wireframe/SplashScreenWireframe.swift | 4 +- 14 files changed, 1219 insertions(+), 110 deletions(-) create mode 100644 GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KYCInfromation.swift create mode 100644 GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PersonalInformation.swift create mode 100644 GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PictureInformation.swift create mode 100644 GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PrimaryInformation.swift diff --git a/GME Remit.xcodeproj/project.pbxproj b/GME Remit.xcodeproj/project.pbxproj index 88fb842b..0c432597 100644 --- a/GME Remit.xcodeproj/project.pbxproj +++ b/GME Remit.xcodeproj/project.pbxproj @@ -374,6 +374,10 @@ 7389601422C2F208003FEA90 /* TablePresenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7389600922C2F208003FEA90 /* TablePresenterViewController.swift */; }; 7389601922C2FADD003FEA90 /* TableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7389601822C2FADD003FEA90 /* TableCell.swift */; }; 738B3E4C233B56C6000EA5E5 /* UISearchBar+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738B3E4B233B56C6000EA5E5 /* UISearchBar+Ext.swift */; }; + 738D727F239F3089006B4EA7 /* KYCInfromation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738D727E239F3089006B4EA7 /* KYCInfromation.swift */; }; + 738D7281239F31C4006B4EA7 /* PersonalInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738D7280239F31C4006B4EA7 /* PersonalInformation.swift */; }; + 738D7283239F3243006B4EA7 /* PrimaryInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738D7282239F3243006B4EA7 /* PrimaryInformation.swift */; }; + 738D7285239F32C7006B4EA7 /* PictureInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738D7284239F32C7006B4EA7 /* PictureInformation.swift */; }; 738DEC1B22D429AB00936C2C /* FunctionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738DEC1A22D429AB00936C2C /* FunctionTest.swift */; }; 738F04B12316238600BA5EE7 /* ShadowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738F04B02316238600BA5EE7 /* ShadowView.swift */; }; 738FD48023038FDE008B144D /* UIFont+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738FD47F23038FDE008B144D /* UIFont+Ext.swift */; }; @@ -2765,6 +2769,10 @@ 7389600922C2F208003FEA90 /* TablePresenterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TablePresenterViewController.swift; sourceTree = ""; }; 7389601822C2FADD003FEA90 /* TableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableCell.swift; sourceTree = ""; }; 738B3E4B233B56C6000EA5E5 /* UISearchBar+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UISearchBar+Ext.swift"; sourceTree = ""; }; + 738D727E239F3089006B4EA7 /* KYCInfromation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KYCInfromation.swift; sourceTree = ""; }; + 738D7280239F31C4006B4EA7 /* PersonalInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalInformation.swift; sourceTree = ""; }; + 738D7282239F3243006B4EA7 /* PrimaryInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrimaryInformation.swift; sourceTree = ""; }; + 738D7284239F32C7006B4EA7 /* PictureInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PictureInformation.swift; sourceTree = ""; }; 738DEC1A22D429AB00936C2C /* FunctionTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FunctionTest.swift; sourceTree = ""; }; 738F04B02316238600BA5EE7 /* ShadowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShadowView.swift; sourceTree = ""; }; 738FD47F23038FDE008B144D /* UIFont+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Ext.swift"; sourceTree = ""; }; @@ -6912,6 +6920,10 @@ isa = PBXGroup; children = ( 737FB6552395DF8300EA4AED /* KeyValue.swift */, + 738D727E239F3089006B4EA7 /* KYCInfromation.swift */, + 738D7280239F31C4006B4EA7 /* PersonalInformation.swift */, + 738D7282239F3243006B4EA7 /* PrimaryInformation.swift */, + 738D7284239F32C7006B4EA7 /* PictureInformation.swift */, ); path = Model; sourceTree = ""; @@ -15793,6 +15805,7 @@ 738B3E4C233B56C6000EA5E5 /* UISearchBar+Ext.swift in Sources */, D97785AA215DD04400754079 /* TransactionHistoryTableViewCell.swift in Sources */, 73A621622330AD20000FFB5B /* RecentHistoriesInteractor.swift in Sources */, + 738D7283239F3243006B4EA7 /* PrimaryInformation.swift in Sources */, 730D7894227A94E1007E517E /* RewardItemCollectionViewCell.swift in Sources */, 736A8C432277EB2A00337A50 /* BiometricNotificationInteractor.swift in Sources */, D95B5E3921311057000C0B33 /* GmeContactsModuleInterface.swift in Sources */, @@ -15997,6 +16010,7 @@ 73549BB2236FDD5600AD75D2 /* RechargeHistoryServiceType.swift in Sources */, 73AEFF762334A13100A967FB /* TransactionHistoryGroupWireframeInputOutput.swift in Sources */, 739045D7237921D500CD5D8A /* ManageAccountGroupInteractorIO.swift in Sources */, + 738D7281239F31C4006B4EA7 /* PersonalInformation.swift in Sources */, 73D1683C2398D49900E3E01E /* NewRegisterStep3ServiceType.swift in Sources */, 734BF6882353F7D8004E8D60 /* PhoneCardRechargeWireframeInputOutput.swift in Sources */, 73A621642330AD20000FFB5B /* RecentHistoriesPresenter.swift in Sources */, @@ -16144,6 +16158,7 @@ 734BF6832353F7D8004E8D60 /* PhoneCardRechargeService.swift in Sources */, 731703CC23221EA0005752DE /* SwipeNavigationController.swift in Sources */, 736A8C402277EB2A00337A50 /* BiometricNotificationModuleInterface.swift in Sources */, + 738D727F239F3089006B4EA7 /* KYCInfromation.swift in Sources */, 73149F6422E5AF8000D66B26 /* LauncherScreenServiceType.swift in Sources */, 73EC6C18236984B200060448 /* InternationalTopupWireframeInput.swift in Sources */, 73071ACD2296CF9B008840FD /* HotLineViewInterface.swift in Sources */, @@ -16182,6 +16197,7 @@ D96848CC212D3F2300EF12B1 /* ExchangeRateApiService.swift in Sources */, 7310688623701A1800B6F28A /* RechargeHistory.swift in Sources */, D9DC108421639E56008F3C51 /* SuccessMessage.swift in Sources */, + 738D7285239F32C7006B4EA7 /* PictureInformation.swift in Sources */, 7318534E230EACA400BA9AE3 /* SendMoneyTransFerReasonViewModel.swift in Sources */, 73195ABB22FD14D500151434 /* SetupRecipientViewModelInterface.swift in Sources */, 7389601922C2FADD003FEA90 /* TableCell.swift in Sources */, diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift index 4467e394..db22156e 100644 --- a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift @@ -15,11 +15,6 @@ class NewRegisterStep1Interactor { weak var output: NewRegisterStep1InteractorOutput? private let service: NewRegisterStep1ServiceType - private let genders = [ - KeyValue(id: "male", value: "male_text".localized()), - KeyValue(id: "female", value: "female_text".localized()), - KeyValue(id: "other", value: "other_text".localized()) - ] // MARK: Initialization init(service: NewRegisterStep1ServiceType) { @@ -31,7 +26,14 @@ class NewRegisterStep1Interactor { // MARK: NewRegisterStep1 interactor input interface extension NewRegisterStep1Interactor: NewRegisterStep1InteractorInput { - func fetchGenders() { - output?.setGenders(genders) + func fetchInformation() { + service.fetchInformation( + success: {[weak self] in + self?.output?.setModel(with: $0) + }, + failure: {[weak self] in + self?.output?.setError(with: $0) + } + ) } } diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1InteractorIO.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1InteractorIO.swift index d5240f0f..792deedc 100644 --- a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1InteractorIO.swift +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1InteractorIO.swift @@ -7,9 +7,10 @@ // protocol NewRegisterStep1InteractorInput: class { - func fetchGenders() + func fetchInformation() } protocol NewRegisterStep1InteractorOutput: class { - func setGenders(_ genders: [KeyValue]) + func setModel(with model: KYCInformation) + func setError(with error: Error) } diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KYCInfromation.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KYCInfromation.swift new file mode 100644 index 00000000..9f273760 --- /dev/null +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KYCInfromation.swift @@ -0,0 +1,34 @@ +// +// KYCInfromation.swift +// GME Remit +// +// Created by InKwon James Kim on 2019/12/10. +// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. +// + +import ObjectMapper + +struct KYCInformation: Mappable { + var cities: [KeyValue]? + var banks: [KeyValue]? + var idTypes: [KeyValue]? + var branches: [KeyValue]? + + var personalInformation: PersonalInformation? + var primaryInformation: PrimaryInformation? + var pictures: PictureInformation? + + init?(map: Map) { + + } + + mutating func mapping(map: Map) { + cities <- map["City"] + banks <- map["Bank"] + idTypes <- map["IdType"] + branches <- map["Branch"] + personalInformation <- map["PersonalInformation"] + primaryInformation <- map["PrimaryInformation"] + pictures <- map["Pictures"] + } +} diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KeyValue.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KeyValue.swift index 5eb0e356..3f15221f 100644 --- a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KeyValue.swift +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/KeyValue.swift @@ -6,9 +6,24 @@ // Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. // -struct KeyValue { - let id: String - let value: String +import ObjectMapper +struct KeyValue: Mappable { + var id: String? + var value: String? + var dependent: [String]? + + init(id: String, value: String) { + self.id = id + self.value = value + } + + init?(map: Map) {} + + mutating func mapping(map: Map) { + id <- map["id"] + value <- map["text"] + dependent <- map["dependent"] + } } extension KeyValue: TablePresenterProtocol { diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PersonalInformation.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PersonalInformation.swift new file mode 100644 index 00000000..67d42d69 --- /dev/null +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PersonalInformation.swift @@ -0,0 +1,59 @@ +// +// PersonalInformation.swift +// GME Remit +// +// Created by InKwon James Kim on 2019/12/10. +// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. +// + +import ObjectMapper + +struct PersonalInformation: Mappable { + var fullName: String? + var gender: String? + var dob: String? + var email: String? + var city: String? + var address: String? + + init( + fullName: String?, + gender: String?, + dob: String?, + email: String?, + city: String?, + address: String? + ) { + self.fullName = fullName + self.gender = gender + self.dob = dob + self.email = email + self.city = city + self.address = address + } + + init?(map: Map) { + + } + + mutating func mapping(map: Map) { + fullName <- map["fullName"] + gender <- map["gender"] + dob <- map["dob"] + email <- map["email"] + city <- map["city"] + address <- map["address"] + } +} + +extension PersonalInformation: Equatable { + static func == (lhs: Self, rhs: Self) -> Bool { + return lhs.fullName == rhs.fullName && + lhs.fullName == rhs.fullName && + lhs.gender == rhs.gender && + lhs.dob == rhs.dob && + lhs.email == rhs.email && + lhs.city == rhs.city && + lhs.address == rhs.address + } +} diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PictureInformation.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PictureInformation.swift new file mode 100644 index 00000000..7958939b --- /dev/null +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PictureInformation.swift @@ -0,0 +1,25 @@ +// +// PictureInformation.swift +// GME Remit +// +// Created by InKwon James Kim on 2019/12/10. +// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. +// + +import ObjectMapper + +struct PictureInformation: Mappable { + var passportPicture: String? + var anotherIDPicture: String? + + init?(map: Map) { + + } + + mutating func mapping(map: Map) { + passportPicture <- map["bankName"] + anotherIDPicture <- map["bankAccount"] + } +} + + diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PrimaryInformation.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PrimaryInformation.swift new file mode 100644 index 00000000..a01ed090 --- /dev/null +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Model/PrimaryInformation.swift @@ -0,0 +1,59 @@ +// +// PrimaryInformation.swift +// GME Remit +// +// Created by InKwon James Kim on 2019/12/10. +// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. +// + +import ObjectMapper + +struct PrimaryInformation: Mappable { + var bankName: String? + var bankAccount: String? + var passportNumber: String? + var passportIssueDate: String? + var passportExpiryDate: String? + var anotherIDType: String? + var anotherIDNumber: String? + var branch: String? + var refferalCode: String? + + init( + bankName: String?, + bankAccount: String?, + passportNumber: String?, + passportIssueDate: String?, + passportExpiryDate: String?, + anotherIDType: String?, + anotherIDNumber: String?, + branch: String?, + refferalCode: String? + ) { + self.bankName = bankName + self.bankAccount = bankAccount + self.passportNumber = passportNumber + self.passportIssueDate = passportIssueDate + self.passportExpiryDate = passportExpiryDate + self.anotherIDType = anotherIDType + self.anotherIDNumber = anotherIDNumber + self.branch = branch + self.refferalCode = refferalCode + } + + init?(map: Map) { } + + mutating func mapping(map: Map) { + bankName <- map["bankName"] + bankAccount <- map["bankAccount"] + passportNumber <- map["passportNumber"] + passportIssueDate <- map["passportIssueDate"] + passportExpiryDate <- map["passportExpiryDate"] + anotherIDType <- map["anotherIDType"] + anotherIDNumber <- map["anotherIDNumber"] + branch <- map["branch"] + refferalCode <- map["refferalCode"] + } +} + + diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1Service.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1Service.swift index a2b2e98c..cb9be407 100644 --- a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1Service.swift +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1Service.swift @@ -9,5 +9,677 @@ import Foundation class NewRegisterStep1Service: NewRegisterStep1ServiceType { - + func fetchInformation( + success: @escaping (KYCInformation) -> Void, + failure: @escaping (Error) -> Void + ) { + let text = +""" +{ + "Id" : "", + "Extra" : "", + "Extra2" : "", + "Data" : { + "City" : [ + { + "id" : "Andong", + "text" : "Andong" + }, + { + "id" : "Ansan", + "text" : "Ansan" + }, + { + "id" : "Anseong", + "text" : "Anseong" + }, + { + "id" : "Anyang", + "text" : "Anyang" + }, + { + "id" : "Asan", + "text" : "Asan" + }, + { + "id" : "Boryeong", + "text" : "Boryeong" + }, + { + "id" : "Bucheon", + "text" : "Bucheon" + }, + { + "id" : "Busan", + "text" : "Busan" + }, + { + "id" : "Changwon", + "text" : "Changwon" + }, + { + "id" : "Cheonan", + "text" : "Cheonan" + }, + { + "id" : "Cheongjin", + "text" : "Cheongjin" + }, + { + "id" : "Cheongju", + "text" : "Cheongju" + }, + { + "id" : "Chuncheon", + "text" : "Chuncheon" + }, + { + "id" : "Chungju", + "text" : "Chungju" + }, + { + "id" : "Chungmu", + "text" : "Chungmu" + }, + { + "id" : "Daecheon", + "text" : "Daecheon" + }, + { + "id" : "Daegu", + "text" : "Daegu" + }, + { + "id" : "Daejeon", + "text" : "Daejeon" + }, + { + "id" : "Dangjin", + "text" : "Dangjin" + }, + { + "id" : "Dongducheon", + "text" : "Dongducheon" + }, + { + "id" : "Donggwangyang", + "text" : "Donggwangyang" + }, + { + "id" : "Donghae", + "text" : "Donghae" + }, + { + "id" : "Gaeseong", + "text" : "Gaeseong" + }, + { + "id" : "Gangneung", + "text" : "Gangneung" + }, + { + "id" : "Geoje", + "text" : "Geoje" + }, + { + "id" : "Geumseong", + "text" : "Geumseong" + }, + { + "id" : "Gimcheon", + "text" : "Gimcheon" + }, + { + "id" : "Gimhae", + "text" : "Gimhae" + }, + { + "id" : "Gimje", + "text" : "Gimje" + }, + { + "id" : "Gimpo", + "text" : "Gimpo" + }, + { + "id" : "Gongju", + "text" : "Gongju" + }, + { + "id" : "Goyang", + "text" : "Goyang" + }, + { + "id" : "Gumi", + "text" : "Gumi" + }, + { + "id" : "Gunpo", + "text" : "Gunpo" + }, + { + "id" : "Gunsan", + "text" : "Gunsan" + }, + { + "id" : "Guri", + "text" : "Guri" + }, + { + "id" : "Gwacheon", + "text" : "Gwacheon" + }, + { + "id" : "Gwangju", + "text" : "Gwangju" + }, + { + "id" : "Gwangmyeong", + "text" : "Gwangmyeong" + }, + { + "id" : "Gwangyang", + "text" : "Gwangyang" + }, + { + "id" : "Gyeongju", + "text" : "Gyeongju" + }, + { + "id" : "Gyeongsan", + "text" : "Gyeongsan" + }, + { + "id" : "Gyeongseong", + "text" : "Gyeongseong" + }, + { + "id" : "Gyeryong", + "text" : "Gyeryong" + }, + { + "id" : "Haeju", + "text" : "Haeju" + }, + { + "id" : "Hamheung", + "text" : "Hamheung" + }, + { + "id" : "Hanam", + "text" : "Hanam" + }, + { + "id" : "Heungnam", + "text" : "Heungnam" + }, + { + "id" : "Hwaseong", + "text" : "Hwaseong" + }, + { + "id" : "Icheon", + "text" : "Icheon" + }, + { + "id" : "Iksan", + "text" : "Iksan" + }, + { + "id" : "Incheon", + "text" : "Incheon" + }, + { + "id" : "Iri", + "text" : "Iri" + }, + { + "id" : "Jangseungpo", + "text" : "Jangseungpo" + }, + { + "id" : "Jecheon", + "text" : "Jecheon" + }, + { + "id" : "Jeju", + "text" : "Jeju" + }, + { + "id" : "Jeomchon", + "text" : "Jeomchon" + }, + { + "id" : "Jeongeup", + "text" : "Jeongeup" + }, + { + "id" : "Jeongju", + "text" : "Jeongju" + }, + { + "id" : "Jeonju", + "text" : "Jeonju" + }, + { + "id" : "Jinhae", + "text" : "Jinhae" + }, + { + "id" : "Jinju", + "text" : "Jinju" + }, + { + "id" : "Jinnampo", + "text" : "Jinnampo" + }, + { + "id" : "Masan", + "text" : "Masan" + }, + { + "id" : "Migeum", + "text" : "Migeum" + }, + { + "id" : "Miryang", + "text" : "Miryang" + }, + { + "id" : "Mokpo", + "text" : "Mokpo" + }, + { + "id" : "Mungyeong", + "text" : "Mungyeong" + }, + { + "id" : "Najin", + "text" : "Najin" + }, + { + "id" : "Naju", + "text" : "Naju" + }, + { + "id" : "Namwon", + "text" : "Namwon" + }, + { + "id" : "Namyangju", + "text" : "Namyangju" + }, + { + "id" : "Nonsan", + "text" : "Nonsan" + }, + { + "id" : "Onyang", + "text" : "Onyang" + }, + { + "id" : "Osan", + "text" : "Osan" + }, + { + "id" : "Paju", + "text" : "Paju" + }, + { + "id" : "Pocheon", + "text" : "Pocheon" + }, + { + "id" : "Pohang", + "text" : "Pohang" + }, + { + "id" : "Pyeongtaek", + "text" : "Pyeongtaek" + }, + { + "id" : "Pyeongyang", + "text" : "Pyeongyang" + }, + { + "id" : "Sacheon", + "text" : "Sacheon" + }, + { + "id" : "Samcheok", + "text" : "Samcheok" + }, + { + "id" : "Samcheonpo", + "text" : "Samcheonpo" + }, + { + "id" : "Sangju", + "text" : "Sangju" + }, + { + "id" : "Sariwon", + "text" : "Sariwon" + }, + { + "id" : "Sejong", + "text" : "Sejong" + }, + { + "id" : "Seogwipo", + "text" : "Seogwipo" + }, + { + "id" : "Seongjin", + "text" : "Seongjin" + }, + { + "id" : "Seongnam", + "text" : "Seongnam" + }, + { + "id" : "Seosan", + "text" : "Seosan" + }, + { + "id" : "Seoul", + "text" : "Seoul" + }, + { + "id" : "Siheung", + "text" : "Siheung" + }, + { + "id" : "Sineuiju", + "text" : "Sineuiju" + }, + { + "id" : "Sokcho", + "text" : "Sokcho" + }, + { + "id" : "Songjeong", + "text" : "Songjeong" + }, + { + "id" : "Songnim", + "text" : "Songnim" + }, + { + "id" : "Songtan", + "text" : "Songtan" + }, + { + "id" : "Suncheon", + "text" : "Suncheon" + }, + { + "id" : "Suwon", + "text" : "Suwon" + }, + { + "id" : "Taebaek", + "text" : "Taebaek" + }, + { + "id" : "Tongyeong", + "text" : "Tongyeong" + }, + { + "id" : "Uijeongbu", + "text" : "Uijeongbu" + }, + { + "id" : "Uiwang", + "text" : "Uiwang" + }, + { + "id" : "Ulsan", + "text" : "Ulsan" + }, + { + "id" : "Wonju", + "text" : "Wonju" + }, + { + "id" : "Wonsan", + "text" : "Wonsan" + }, + { + "id" : "Yangju", + "text" : "Yangju" + }, + { + "id" : "Yangsan", + "text" : "Yangsan" + }, + { + "id" : "Yeocheon", + "text" : "Yeocheon" + }, + { + "id" : "Yeoju", + "text" : "Yeoju" + }, + { + "id" : "Yeongcheon", + "text" : "Yeongcheon" + }, + { + "id" : "Yeongju", + "text" : "Yeongju" + }, + { + "id" : "Yeosu", + "text" : "Yeosu" + }, + { + "id" : "Yongin", + "text" : "Yongin" + } + ], + "Bank" : [ + { + "id" : "20", + "text" : "Busan Bank(BNK)" + }, + { + "id" : "18", + "text" : "Citibank Korea" + }, + { + "id" : "11", + "text" : "Credit Union (Shinhyup)" + }, + { + "id" : "5", + "text" : "Daegu Bank(DGB)" + }, + { + "id" : "6", + "text" : "Deutsche Bank" + }, + { + "id" : "19", + "text" : "HSBC" + }, + { + "id" : "3", + "text" : "Industrial Bank of Korea(IBK)" + }, + { + "id" : "17", + "text" : "Jeju Bank" + }, + { + "id" : "15", + "text" : "Jeonbuk Bank(JB)" + }, + { + "id" : "13", + "text" : "KEB Hana Bank" + }, + { + "id" : "26", + "text" : "KEB Hana Bank - Old" + }, + { + "id" : "2", + "text" : "Kookmin-Bank(KB)" + }, + { + "id" : "24", + "text" : "Kookmin-Bank(KB) Old" + }, + { + "id" : "7", + "text" : "Korea Development Bank(KDB)" + }, + { + "id" : "8", + "text" : "Korea Federation of Community Credit Cooperatives(KFCC)" + }, + { + "id" : "14", + "text" : "Korea Post(Epost)" + }, + { + "id" : "1", + "text" : "Kwangju Bank(KJ)" + }, + { + "id" : "25", + "text" : "Kyongnam Bank" + }, + { + "id" : "4", + "text" : "Nonghyup Bank(NH)" + }, + { + "id" : "23", + "text" : "Nonghyup Bank(NH) Old" + }, + { + "id" : "10", + "text" : "Shinhan Bank" + }, + { + "id" : "16", + "text" : "Standard Chartered Korea(SC First)" + }, + { + "id" : "9", + "text" : "Suhyup Local Cooperatives" + }, + { + "id" : "21", + "text" : "Woori Bank" + } + ], + "IdType" : [ + { + "id" : "1302", + "text" : "Alien Registration Card", + "dependent" : [ + "docIssueDate", + "docExpiryDate" + ] + }, + { + "id" : "8008", + "text" : "National ID", + "dependent" : [ + "docIssueDate" + ] + }, + { + "id" : "11012", + "text" : "Driving License", + "dependent" : [ + "docIssueDate", + "docExpiryDate" + ] + } + ], + + "Branch" : [ + { + "id" : "2087", + "text" : "Ansan" + }, + { + "id" : "404520", + "text" : "DDM CIS" + }, + { + "id" : "1034", + "text" : "Dongdaemun" + }, + { + "id" : "2089", + "text" : "Gimhae" + }, + { + "id" : "601326", + "text" : "Gwangju" + }, + { + "id" : "1035", + "text" : "Hwaseong" + }, + { + "id" : "404519", + "text" : "Hyehwa" + }, + { + "id" : "585219", + "text" : "Mongol Town" + }, + { + "id" : "221269", + "text" : "Songu-ri" + } + ], + + "PersonalInformation": { + "fullName": "JAMES KIM", + "gender": "M", + "dob": "1988-03-01", + "email": "jamesk@gmeremit.com", + "city": "Seoul", + "address": "Jongro 32 Jonro gu" + }, + + "PrimaryInformation": { + "bankName": "Kookmin-Bank(KB)", + "bankAccount": "40790204056295", + "passportNumber": "M1325250", + "passportIssueDate": "2012-02-01", + "passportExpiryDate": "2022-01-31", + "anotherIDType": "National ID", + "anotherIDNumber": "880301-1284213", + "branch": "Ansan", + "refferalCode": "String" + }, + + "Pictures": { + "passportPicture": "iVBORw0KGgoAAAANSUhEUgAAANIAAAAzCAYAAADigVZlAAAQN0lEQVR4nO2dCXQTxxnHl0LT5jVteHlN+5q+JCKBJITLmHIfKzBHHCCYBAi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Kampt3Xiu83mQymcL5a/BrE1BMspBk7kNUdO8TVeGJoCiShOR+DaiuTvKfFQbpHqmoqMzW6/WJ8PgbOQ6XkQlKsBd5IUFaDAbJkQhitdpWgKUg226zLYS/y0KS+TGAvdjc3OKmqamFamtroywWq+gpHY/ZbBnU3GL4FHx+A8r5BeEhrYxM0BFwA2RkgoGAGyAjEwwE3AAZmWAg4AbIyAQDATdARiYYCLgBMjLBQMANkJEJBgJugIxMMPBfChd6NRZ5pkMAAAAASUVORK5CYII=" + } + }, + "ErrorCode" : "0", + "Msg" : "success" +} + +""" + + guard + let json = ResponseContainerObject(JSONString: text)?.data + else { + let error = NSError(domain: "TEST", code: 0, message: "JSON ERROR") + failure(error) + return + } + success(json) + } } diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1ServiceType.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1ServiceType.swift index 73d5e75e..acec4e51 100644 --- a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1ServiceType.swift +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Service/NewRegisterStep1ServiceType.swift @@ -7,5 +7,8 @@ // protocol NewRegisterStep1ServiceType: class { - + func fetchInformation( + success: @escaping (KYCInformation) -> Void, + failure: @escaping (Error) -> Void + ) } diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/Presenter/NewRegisterStep1Presenter.swift b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/Presenter/NewRegisterStep1Presenter.swift index a874e1e8..f7b216f1 100644 --- a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/Presenter/NewRegisterStep1Presenter.swift +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/Presenter/NewRegisterStep1Presenter.swift @@ -11,19 +11,60 @@ import RxCocoa import CoreLocation class NewRegisterStep1Presenter: ViewModelType { + enum Step { + case innerStep1 + case innerStep2 + case innerStep3 + } + var interactor: NewRegisterStep1InteractorInput? var wireframe: NewRegisterStep1WireframeInput? struct Input { let viewWillAppear: Driver let sendLocation: Driver + + let name: Driver + let gender: Driver + let dob: Driver + let email: Driver + let city: Driver + let address: Driver + let isValidPersonalInfo: Driver + let personalInfoSave: Driver + + let bankName: Driver + let bankAccount: Driver + let passportNumber: Driver + let passportIssueDate: Driver + let passportExpiryDate: Driver + let anotherIDType: Driver + let anotherIDNumber: Driver + let branch: Driver + let referralCode: Driver + let isValidPrimaryInfo: Driver + let primaryInfoSave: Driver + + let passportImage: Driver + let anotherIDImage: Driver + let isValidPictures: Driver + let submit: Driver } struct Output { let isError: Driver let isProgress: Driver let gpsAddress: Driver - let genders: Driver<[KeyValue]> + let model: Driver + + let cities: Driver<[KeyValue]?> + let banks: Driver<[KeyValue]?> + let idTypes: Driver<[KeyValue]?> + let branches: Driver<[KeyValue]?> + + let isSetPersonalInformation: Driver + let isSetPrimaryInformation: Driver + let isSetPictureInformation: Driver } private let disposeBag = DisposeBag() @@ -31,11 +72,15 @@ class NewRegisterStep1Presenter: ViewModelType { private let progressLinker = PublishSubject() private let errorLinker = PublishSubject() private let gpsAddress = PublishSubject() - private let genders = PublishSubject<[KeyValue]>() + private let model = PublishSubject() + + private var personalInformation = BehaviorSubject(value: nil) + private var primaryInformation = BehaviorSubject(value: nil) + private var pictureInformation = BehaviorSubject(value: nil) func transform(input: Input) -> Output { input.viewWillAppear.drive(onNext: { [weak self] in - self?.interactor?.fetchGenders() + self?.interactor?.fetchInformation() }).disposed(by: disposeBag) input.sendLocation.drive(onNext: { [weak self] in @@ -52,26 +97,117 @@ class NewRegisterStep1Presenter: ViewModelType { if let address: [CLPlacemark] = placemarks { let name = address.last?.name ?? "" let locality = address.last?.locality ?? "" - let administrativeArea = address.last?.administrativeArea ?? "" self?.progressLinker.onNext(false) - self?.gpsAddress.onNext("\(name), \(locality), \(administrativeArea)") + + let mergedAddress = "\(name) \(locality)".extract(regex: "[A-Z0-9a-z\\s]") + self?.gpsAddress.onNext(mergedAddress) } } }).disposed(by: disposeBag) + let personalInfo = Driver.combineLatest( + input.isValidPersonalInfo, + input.name, + input.gender, + input.dob, + input.email, + input.city, + input.address + ) + .map { (isValid, name, gender, dob, email, city, address) -> PersonalInformation? in + return isValid ? PersonalInformation( + fullName: name, + gender: gender, + dob: dob, + email: email, + city: city?.id, + address: address + ) : nil + } + + let primaryInfo = Driver.combineLatest( + Driver.combineLatest( + input.isValidPrimaryInfo, + input.bankName, + input.bankAccount, + input.passportNumber, + input.passportIssueDate, + input.passportExpiryDate, + input.anotherIDType, + input.anotherIDNumber + ).map { (isValid, bank, account, passportNumber, passportIssue, passportExpiry, idType, idNumber) -> + PrimaryInformation? in + return isValid ? PrimaryInformation( + bankName: bank?.id, + bankAccount: account, + passportNumber: passportNumber, + passportIssueDate: passportIssue, + passportExpiryDate: passportExpiry, + anotherIDType: idType?.id, + anotherIDNumber: idNumber, + branch: nil, + refferalCode: nil + ) : nil + }, + input.branch, + input.referralCode + ).map { (info, branch, referralCode) -> PrimaryInformation? in + var primaryInfo = info + primaryInfo?.branch = branch?.id + primaryInfo?.refferalCode = referralCode + return primaryInfo + } + + input.personalInfoSave.withLatestFrom(personalInfo) { $1 } + .drive(onNext: {[weak self] in + // TODO: try to save to server the personal information. + // if success save then set personalInformation. + self?.personalInformation.onNext($0) + }).disposed(by: disposeBag) + + input.primaryInfoSave.withLatestFrom(primaryInfo) { $1 } + .drive(onNext: {[weak self] in + // TODO: try to save to server the primary information. + // if success save then set personalInformation. + self?.primaryInformation.onNext($0) + }).disposed(by: disposeBag) + return Output( isError: errorLinker.asDriverOnErrorJustComplete(), isProgress: progressLinker.asDriverOnErrorJustComplete(), gpsAddress: gpsAddress.asDriverOnErrorJustComplete(), - genders: genders.asDriverOnErrorJustComplete() + model: model.asDriverOnErrorJustComplete(), + cities: model.map {$0.cities}.asDriverOnErrorJustComplete(), + banks: model.map {$0.banks}.asDriverOnErrorJustComplete(), + idTypes: model.map {$0.idTypes}.asDriverOnErrorJustComplete(), + branches: model.map {$0.branches}.asDriverOnErrorJustComplete(), + isSetPersonalInformation: personalInformation.map {$0 != nil}.asDriverOnErrorJustComplete(), + isSetPrimaryInformation: primaryInformation.map {$0 != nil}.asDriverOnErrorJustComplete(), + isSetPictureInformation: pictureInformation.map {$0 != nil}.asDriverOnErrorJustComplete() ) } } // MARK: NewRegisterStep1 interactor output interface extension NewRegisterStep1Presenter: NewRegisterStep1InteractorOutput { - func setGenders(_ genders: [KeyValue]) { - self.genders.onNext(genders) + func setModel(with model: KYCInformation) { + self.model.onNext(model) + + guard let personalInfo = model.personalInformation else { + return + } + + personalInformation.onNext(personalInfo) + + guard let primaryInfo = model.primaryInformation else { + return + } + + primaryInformation.onNext(primaryInfo) + } + + func setError(with error: Error) { + errorLinker.onNext(error) } } diff --git a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard index 50812f09..3a6cfafb 100644 --- a/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard +++ b/GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard @@ -123,10 +123,24 @@ - + + + + + + + + + + + + + + + - + @@ -166,20 +180,6 @@ - - - - - - - - - - - - - - -