Manos Chorianopoulos

sharing history fixes

......@@ -10,7 +10,7 @@ import UIKit
class HistoryViewController: AnalysisChildViewController {
var loading: Bool = false
var items: Array<swiftApi.CouponItemModel> = swiftApi().getCouponList()
var items: Array<swiftApi.CouponItemModel> = swiftApi().getOldCouponList()
// TODO: remove this when configuring model
let hasMessage = true
......@@ -100,13 +100,13 @@ class HistoryViewController: AnalysisChildViewController {
// header
if (indexPath.section == 0) {
if (hasMessage) {
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderMessageViewCell", for: indexPath) as! AnalysisHeaderMessageViewCell
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderMessageViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderMessageViewCell
}
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! AnalysisHeaderViewCell
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderViewCell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! AnalysisItemViewCell
let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell
cell.configureCell(item: items[indexPath.row])
return cell
......
......@@ -60,16 +60,16 @@ import UIKit
////////////////////////////////////////////////////////////////////////////////
private func viewControllerAt(_ index:Int) -> AnalysisChildViewController?
{
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
if (index == 1) {
let analysisVC = storyboard.instantiateViewController(withIdentifier:"SharingHistoryViewController") as! SharingHistoryViewController
let analysisVC = storyboard.instantiateViewController(withIdentifier:"SharingHistoryViewController") as! SwiftWarplyFramework.SharingHistoryViewController
analysisVC.index = index;
return analysisVC;
}
let analysisVC = storyboard.instantiateViewController(withIdentifier:"HistoryViewController") as! HistoryViewController
let analysisVC = storyboard.instantiateViewController(withIdentifier:"HistoryViewController") as! SwiftWarplyFramework.HistoryViewController
analysisVC.index = index;
return analysisVC;
......
......@@ -166,7 +166,7 @@ extension NumberPopupViewController: UITableViewDelegate, UITableViewDataSource{
// print("Coupon Description clicked: " + (couponSetData?.short_description ?? ""))
// print("Coupon Expiration clicked: " + (coupons[indexPath.row].expiration ?? ""))
//
// let storyboard = UIStoryboard(name: "Main", bundle: nil)
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
// let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! CouponBarcodeViewController
// vc.coupon = coupons[indexPath.row]
// self.navigationController?.pushViewController(vc, animated: true)
......
......@@ -98,13 +98,13 @@ class SharingHistoryViewController: AnalysisChildViewController {
// header
if (indexPath.section == 0) {
if (hasMessage) {
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderMessageViewCell", for: indexPath) as! AnalysisHeaderMessageViewCell
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderMessageViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderMessageViewCell
}
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! AnalysisHeaderViewCell
return tableView.dequeueReusableCell(withIdentifier: "AnalysisHeaderViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisHeaderViewCell
}
let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! AnalysisItemViewCell
let cell = tableView.dequeueReusableCell(withIdentifier: "AnalysisItemViewCell", for: indexPath) as! SwiftWarplyFramework.AnalysisItemViewCell
cell.configureCell(item: items[indexPath.row])
return cell
......