Browse Source

payout model brought ot view controller

pull/1/head
gme_2 6 years ago
parent
commit
7453c26d05
  1. 2
      GMERemittance/Module/SendMoneyPaymentMode/Application Logic/Interactor/SendMoneyPaymentModeInteractorIO.swift
  2. 32
      GMERemittance/Module/SendMoneyPaymentMode/User Interface/Presenter/SendMoneyPaymentModePresenter.swift
  3. 5
      GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift
  4. 2
      GMERemittance/Module/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewInterface.swift

2
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)
}

32
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(model: PayoutMode) {
self.show(model: model)
}
}

5
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) {

2
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()

Loading…
Cancel
Save