Browse Source

added function to go to home after kyc is submitted

pull/1/head
gme_2 6 years ago
parent
commit
cdb04dd9ee
  1. 1
      GMERemittance/Module/New Group/Kyc/Application Logic/Interactor/KycInteractor.swift
  2. 1
      GMERemittance/Module/New Group/Kyc/Application Logic/Interactor/KycInteractorIO.swift
  3. 5
      GMERemittance/Module/New Group/Kyc/User Interface/Presenter/KycPresenter.swift
  4. 6
      GMERemittance/Module/New Group/Kyc/User Interface/Wireframe/KycWireframe.swift
  5. 2
      GMERemittance/Module/New Group/Kyc/User Interface/Wireframe/KycWireframeInput.swift

1
GMERemittance/Module/New Group/Kyc/Application Logic/Interactor/KycInteractor.swift

@ -226,6 +226,7 @@ extension KycInteractor: KycInteractorInput {
self.service.submit(param: params, images: images, success: { (response) in
// print(response?.firstName)
// Todo: After success what?
self.output?.submitSuccess()
}) { (error) in
self.output?.show(error: error)

1
GMERemittance/Module/New Group/Kyc/Application Logic/Interactor/KycInteractorIO.swift

@ -15,4 +15,5 @@ protocol KycInteractorOutput: class {
func show(result2: (isValid: Bool, errorsDick: [String: String]))
func show(result3: (isValid: Bool, errorsDick: [String: String]))
func show(error: Error)
func submitSuccess()
}

5
GMERemittance/Module/New Group/Kyc/User Interface/Presenter/KycPresenter.swift

@ -32,6 +32,11 @@ extension KycPresenter: KycModuleInterface {
// MARK: Kyc interactor output interface
extension KycPresenter: KycInteractorOutput {
func submitSuccess() {
self.wireframe?.gotToHome()
}
func show(result1: (isValid: Bool, errorsDick: [String : String])) {
self.view?.hideLoading()
self.view?.show(resultl: result1)

6
GMERemittance/Module/New Group/Kyc/User Interface/Wireframe/KycWireframe.swift

@ -31,4 +31,10 @@ extension KycWireframe: KycWireframeInput {
self.view = viewController
return viewController
}
func gotToHome() {
if let navigation = self.view.navigationController {
navigation.popViewController(animated: true)
}
}
}

2
GMERemittance/Module/New Group/Kyc/User Interface/Wireframe/KycWireframeInput.swift

@ -9,5 +9,5 @@
import Foundation
protocol KycWireframeInput: WireframeInput {
func gotToHome()
}
Loading…
Cancel
Save