|
|
@ -7,7 +7,7 @@ |
|
|
|
// |
|
|
|
|
|
|
|
import UIKit |
|
|
|
|
|
|
|
import Localize_Swift |
|
|
|
// func getParams(model: SendMoneyRequestModel, reciepient: Recipient) -> [String: String] { // last api call |
|
|
|
|
|
|
|
class ResendRequestModel { |
|
|
@ -101,7 +101,7 @@ class ResendViewController: UIViewController { |
|
|
|
super.viewDidLoad() |
|
|
|
self.setupNormalNavigation() |
|
|
|
self.setup() |
|
|
|
self.fetchList() |
|
|
|
self.presenter?.viewIsReady() |
|
|
|
} |
|
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) { |
|
|
@ -144,23 +144,8 @@ class ResendViewController: UIViewController { |
|
|
|
|
|
|
|
|
|
|
|
private func fetchList(fromDate: String? = nil, toDate: String? = nil) { |
|
|
|
let userName = Utility.getMyUserName() |
|
|
|
var param: [String: String] = [:] |
|
|
|
if let fromDate = fromDate { |
|
|
|
param["FromDate"] = fromDate |
|
|
|
} |
|
|
|
if let toDate = toDate { |
|
|
|
param["ToDate"] = toDate |
|
|
|
} |
|
|
|
|
|
|
|
self.showLoading() |
|
|
|
self.fetchResendService(user: userName, param: param, success: { (model) in |
|
|
|
self.hideLoading() |
|
|
|
self.model = model |
|
|
|
}) { (error) in |
|
|
|
self.hideLoading() |
|
|
|
self.alert(message: error.localizedDescription) |
|
|
|
} |
|
|
|
guard let fromDate = fromDate, let toDate = toDate else { return } |
|
|
|
self.presenter?.fetchList(fromDate: fromDate, toDate: toDate) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -222,6 +207,10 @@ class ResendViewController: UIViewController { |
|
|
|
|
|
|
|
// MARK: TransactionHistoryViewInterface |
|
|
|
extension ResendViewController: ResendViewInterface { |
|
|
|
func show(model: ResendListModel) { |
|
|
|
self.model = model |
|
|
|
} |
|
|
|
|
|
|
|
func showLoading() { |
|
|
|
self.showProgressHud() |
|
|
|
} |
|
|
|