From 6608e0e3dc7c232a8a027e3d88f99ba2aa2c81ec Mon Sep 17 00:00:00 2001 From: gme_2 Date: Tue, 11 Sep 2018 14:54:04 +0900 Subject: [PATCH] added routing between login and forgot password two way --- .../Module Interface/ForgotPasswordModuleInterface.swift | 3 ++- .../Presenter/ForgotPasswordPresenter.swift | 8 +++++++- .../User Interface/View/ForgotPassword.storyboard | 2 +- .../View/ForgotPasswordViewController.swift | 6 ++++-- .../Wireframe/ForgotPasswordWireframe.swift | 4 ++++ .../Wireframe/ForgotPasswordWireframeInput.swift | 2 +- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/GMERemittance/Module/ForgotPassword/Module Interface/ForgotPasswordModuleInterface.swift b/GMERemittance/Module/ForgotPassword/Module Interface/ForgotPasswordModuleInterface.swift index 314a630d..b8bf8de6 100644 --- a/GMERemittance/Module/ForgotPassword/Module Interface/ForgotPasswordModuleInterface.swift +++ b/GMERemittance/Module/ForgotPassword/Module Interface/ForgotPasswordModuleInterface.swift @@ -7,5 +7,6 @@ // protocol ForgotPasswordModuleInterface: class { - + func reset(username: String, dob: String) + func cancel() } diff --git a/GMERemittance/Module/ForgotPassword/User Interface/Presenter/ForgotPasswordPresenter.swift b/GMERemittance/Module/ForgotPassword/User Interface/Presenter/ForgotPasswordPresenter.swift index 5d0ec07f..53807b1c 100644 --- a/GMERemittance/Module/ForgotPassword/User Interface/Presenter/ForgotPasswordPresenter.swift +++ b/GMERemittance/Module/ForgotPassword/User Interface/Presenter/ForgotPasswordPresenter.swift @@ -22,7 +22,13 @@ class ForgotPasswordPresenter { // MARK: ForgotPassword module interface extension ForgotPasswordPresenter: ForgotPasswordModuleInterface { - + func reset(username: String, dob: String) { + + } + + func cancel() { + self.wireframe?.login() + } } // MARK: ForgotPassword interactor output interface diff --git a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard index eefb3ac6..48849a03 100644 --- a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard +++ b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard @@ -148,7 +148,7 @@ - + diff --git a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift index f51fca0a..1bd3694a 100644 --- a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift +++ b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift @@ -30,11 +30,13 @@ class ForgotPasswordViewController: UIViewController { // MARK: IBActions @IBAction func _continue(_ sender: UIButton) { - + let username = self.userNameTextField.text! + let dob = self.dobTextField.text! + self.presenter?.reset(username: username, dob: dob) } @IBAction func cancel(_ sender: UIButton) { - + self.presenter?.cancel() } // MARK: Other Functions diff --git a/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframe.swift b/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframe.swift index 9115fa28..94135b3a 100644 --- a/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframe.swift +++ b/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframe.swift @@ -31,4 +31,8 @@ extension ForgotPasswordWireframe: ForgotPasswordWireframeInput { self.view = viewController return viewController } + + func login() { + self.view.navigationController?.popViewController(animated: true) + } } diff --git a/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframeInput.swift b/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframeInput.swift index ba045298..45139e4e 100644 --- a/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframeInput.swift +++ b/GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframeInput.swift @@ -9,5 +9,5 @@ import Foundation protocol ForgotPasswordWireframeInput: WireframeInput { - + func login() }