From 7453c26d0586128134018c3f33ad9526a1660fc7 Mon Sep 17 00:00:00 2001 From: gme_2 Date: Tue, 28 Aug 2018 18:15:11 +0900 Subject: [PATCH] payout model brought ot view controller --- .../SendMoneyPaymentModeInteractorIO.swift | 2 +- .../SendMoneyPaymentModePresenter.swift | 32 +++---------------- .../SendMoneyPaymentModeViewController.swift | 5 +-- .../SendMoneyPaymentModeViewInterface.swift | 2 +- 4 files changed, 10 insertions(+), 31 deletions(-) diff --git a/GMERemittance/Module/SendMoneyPaymentMode/Application Logic/Interactor/SendMoneyPaymentModeInteractorIO.swift b/GMERemittance/Module/SendMoneyPaymentMode/Application Logic/Interactor/SendMoneyPaymentModeInteractorIO.swift index 472114f7..18c6093f 100644 --- a/GMERemittance/Module/SendMoneyPaymentMode/Application Logic/Interactor/SendMoneyPaymentModeInteractorIO.swift +++ b/GMERemittance/Module/SendMoneyPaymentMode/Application Logic/Interactor/SendMoneyPaymentModeInteractorIO.swift @@ -11,6 +11,6 @@ protocol SendMoneyPaymentModeInteractorInput: class { } protocol SendMoneyPaymentModeInteractorOutput: class { - func show(model: Recipient) + func show(model: PayoutMode) func show(error: Error) } diff --git a/GMERemittance/Module/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift b/GMERemittance/Module/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift index 06862bbf..e6682586 100644 --- a/GMERemittance/Module/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift +++ b/GMERemittance/Module/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift @@ -18,47 +18,25 @@ class SendMoneyPaymentModePresenter { // MARK: Converting entities - -// func convert(model: Recipient) { -// let reciepient = SendMoneyRecipientViewModel() -// reciepient.id = model.recipientId -// reciepient.firstName = model.firstName -// reciepient.middleName = model.middleName -// reciepient.lastName = model.lastName -// reciepient.country = model.country -// reciepient.countryId = model.countryId -// reciepient.state = model.state -// reciepient.stateId = model.stateId -// reciepient.address = model.address -// reciepient.relation = model.relation -// reciepient.relationId = model.relationId -// reciepient.reason = model.reason -// reciepient.reasonId = model.reasonId -// reciepient.mobileNumber = model.mobileNumber -// reciepient.email = model.email -// self.view?.show(model: reciepient) -// } } // MARK: SendMoneyPaymentMode module interface extension SendMoneyPaymentModePresenter: SendMoneyPaymentModeModuleInterface { func viewIsReady(for reciepient: Recipient) { + self.view?.showLoading() self.interactor?.viewIsReady(for: reciepient) } -// func viewIsReady() { -// self.interactor?.viewIsReady() -// } } // MARK: SendMoneyPaymentMode interactor output interface extension SendMoneyPaymentModePresenter: SendMoneyPaymentModeInteractorOutput { - func show(model: Recipient) { - self.view?.show(model: model) + func show(error: Error) { + self.view?.hideLoading() } - func show(error: Error) { - + func show(model: PayoutMode) { + self.show(model: model) } } diff --git a/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift b/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift index 7d90b987..8827be14 100644 --- a/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift +++ b/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift @@ -20,6 +20,7 @@ class SendMoneyPaymentModeViewController: UIViewController { var presenter: SendMoneyPaymentModeModuleInterface? var recipient: Recipient? var hudDelegate: HUDStatusDelegate? + var payoutMode: PayoutMode? // MARK: VC's Life cycle @@ -49,8 +50,8 @@ class SendMoneyPaymentModeViewController: UIViewController { // MARK: SendMoneyPaymentModeViewInterface extension SendMoneyPaymentModeViewController: SendMoneyPaymentModeViewInterface { - func show(model: Recipient) { -// self.recipient = model + func show(model: PayoutMode) { + self.payoutMode = modeli } func show(error: String) { diff --git a/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewInterface.swift b/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewInterface.swift index be66bc25..e5755ddf 100644 --- a/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewInterface.swift +++ b/GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewInterface.swift @@ -7,7 +7,7 @@ // protocol SendMoneyPaymentModeViewInterface: class { - func show(model: Recipient) + func show(model: PayoutMode) func show(error: String) func showLoading() func hideLoading()