Browse Source

Type 1

pull/1/head
InKwon James Kim 5 years ago
parent
commit
bfa5f0d2ba
  1. 10
      GME Remit/Models/Response/AccountEx.swift
  2. 2
      GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift
  3. 2
      GME Remit/Modules/Home/User Interface/View/HomeViewController.swift
  4. 25
      GME Remit/Modules/ManageAccountsModules/AutoDebitModules/AddAccount/User Interface/View/AddAccount.storyboard
  5. 105
      GME Remit/Modules/ManageAccountsModules/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift
  6. 8
      GME Remit/Modules/ManageAccountsModules/InboundAccounts/User Interface/View/InboundAccounts.storyboard
  7. 62
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Interactor/TotalManageAccountsInteractor.swift
  8. 4
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Interactor/TotalManageAccountsInteractorIO.swift
  9. 129
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Service/TotalManageAccountsService.swift
  10. 6
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Service/TotalManageAccountsServiceType.swift
  11. 34
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/Presenter/TotalManageAccountsPresenter.swift
  12. 46
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/View/AccountCell.swift
  13. 348
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/View/TotalManageAccounts.storyboard
  14. 179
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/View/TotalManageAccountsViewController.swift
  15. 29
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/Wireframe/TotalManageAccountsWireframe.swift
  16. 5
      GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/Wireframe/TotalManageAccountsWireframeInput.swift
  17. 86
      GME Remit/Modules/PowerCallModules/RechargeHistory/Application Logic/Service/RechargeHistoryService.swift
  18. 1
      GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/Wireframe/TransactionHistoryWireframe.swift
  19. 21
      GME Remit/Supported Files/Assets.xcassets/ic_delete2.imageset/Contents.json
  20. BIN
      GME Remit/Supported Files/Assets.xcassets/ic_delete2.imageset/ic_delete2.png
  21. 21
      GME Remit/Supported Files/Assets.xcassets/ic_delete3.imageset/Contents.json
  22. BIN
      GME Remit/Supported Files/Assets.xcassets/ic_delete3.imageset/ic_delete3.png
  23. 21
      GME Remit/Supported Files/Assets.xcassets/ic_edit.imageset/Contents.json
  24. BIN
      GME Remit/Supported Files/Assets.xcassets/ic_edit.imageset/ic_edit.png
  25. 21
      GME Remit/Supported Files/Assets.xcassets/ic_minus.imageset/Contents.json
  26. BIN
      GME Remit/Supported Files/Assets.xcassets/ic_minus.imageset/ic_minus.png
  27. 21
      GME Remit/Supported Files/Assets.xcassets/ic_minus2.imageset/Contents.json
  28. BIN
      GME Remit/Supported Files/Assets.xcassets/ic_minus2.imageset/ic_minus2.png
  29. 2
      GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenter.storyboard

10
GME Remit/Models/Response/AccountEx.swift

@ -113,6 +113,16 @@ class KftcLanguage: Mappable {
}
}
extension KftcLanguage: TablePresenterProtocol {
var cellTitle: String? {
return value
}
var cellImage: UIImage? {
return nil
}
}
class KftcHeader: Mappable {
var key: String?
var value: String?

2
GME Remit/Modules/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift

@ -391,8 +391,6 @@ extension ExchangeRatesViewController: UICollectionViewDataSource {
case .cardPayment:
return configureCardPaymentCell(collectionView: collectionView, indexPath: indexPath)
default:
return configureCashDeliveryCell(collectionView: collectionView, indexPath: indexPath)
}
}

2
GME Remit/Modules/Home/User Interface/View/HomeViewController.swift

@ -495,7 +495,7 @@ extension HomeViewController {
}
private func showManageAccounts() {
let wireframe = ManageAccountGroupWireframe()
// let wireframe = ManageAccountGroupWireframe()
if let navigation = self.navigationController {
// wireframe.pushMainView(in: navigation)
TotalManageAccountsWireframe().pushMainView(in: navigation)

25
GME Remit/Modules/ManageAccountsModules/AutoDebitModules/AddAccount/User Interface/View/AddAccount.storyboard

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="QxQ-Vf-4rA">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="QxQ-Vf-4rA">
<device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -36,14 +36,14 @@
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="25" translatesAutoresizingMaskIntoConstraints="NO" id="3ai-n4-gBZ" userLabel="ContentsView">
<rect key="frame" x="26" y="114" width="323" height="230"/>
<rect key="frame" x="26" y="114" width="323" height="185"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="RZW-X0-sHf" customClass="ValidationTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="323" height="60"/>
<rect key="frame" x="0.0" y="0.0" width="323" height="45"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="2rM-Fi-bv9"/>
<constraint firstAttribute="height" constant="45" id="2rM-Fi-bv9"/>
</constraints>
<color key="textColor" name="ThemeText"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
@ -52,10 +52,11 @@
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="Select your bank"/>
<userDefinedRuntimeAttribute type="string" keyPath="titleText" value="Bank Name"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="isShowTitle" value="NO"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="isUseTitle" value="NO"/>
</userDefinedRuntimeAttributes>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="8ga-Pj-fFb" customClass="ValidationTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="85" width="323" height="60"/>
<rect key="frame" x="0.0" y="70" width="323" height="45"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" name="ThemeText"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
@ -65,10 +66,11 @@
<userDefinedRuntimeAttribute type="string" keyPath="errorMessage" value="Invalid Bank Account"/>
<userDefinedRuntimeAttribute type="string" keyPath="titleText" value="Bank Account"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="isShowTitle" value="NO"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="isUseTitle" value="NO"/>
</userDefinedRuntimeAttributes>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1Ca-e4-yFh" customClass="ValidationTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="170" width="323" height="60"/>
<rect key="frame" x="0.0" y="140" width="323" height="45"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" name="ThemeText"/>
@ -78,6 +80,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="Select Language"/>
<userDefinedRuntimeAttribute type="string" keyPath="titleText" value="Language"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="isShowTitle" value="NO"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="isUseTitle" value="NO"/>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
@ -91,7 +94,7 @@
</constraints>
</stackView>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bm7-r1-NLR">
<rect key="frame" x="26" y="369" width="323" height="50"/>
<rect key="frame" x="26" y="324" width="323" height="50"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="WQG-ti-fgK"/>
@ -162,13 +165,13 @@
<resources>
<image name="ic_cancel" width="12" height="12"/>
<namedColor name="ThemeBlack">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</namedColor>
<namedColor name="ThemeMainBackground">
<color red="0.098039215686274508" green="0.098039215686274508" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="ThemeText">
<color white="0.80299997329711914" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

105
GME Remit/Modules/ManageAccountsModules/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift

@ -7,6 +7,8 @@
//
import UIKit
import RxSwift
import RxCocoa
class AddAccountViewController: UIViewController {
@ -14,6 +16,11 @@ class AddAccountViewController: UIViewController {
var presenter: AddAccountModuleInterface?
private var selectedLanguage: KftcLanguage?
private var selectedBank: BankInformation?
private let disposeBag = DisposeBag()
private lazy var languagePickerView = UIPickerView()
private lazy var bankPickerView = UIPickerView()
@ -35,35 +42,11 @@ class AddAccountViewController: UIViewController {
private var model: (bankList: [BankInformation]?, kftcModel: KFTCModel?) {
didSet {
languagePickerView.delegate = self
languagePickerView.dataSource = self
languageTextField.inputView = languagePickerView
languagePickerView.backgroundColor = .themeMainBackground
bankPickerView.delegate = self
bankPickerView.dataSource = self
bankNameTextField.inputView = bankPickerView
bankPickerView.backgroundColor = .themeMainBackground
let bankConfigure = TablePresenterConfiguration(presenterTitle: "Select Bank")
bankNameTextField.useAsDropDown(with: bankConfigure, items: model.bankList)
let originalBanks = model.bankList?.map { $0.bankName ?? "" }
let originalLanguages = model.kftcModel?.languages?.map { $0.value ?? ""}
banks?.append(contentsOf: originalBanks ?? [])
languages?.append(contentsOf: originalLanguages ?? [])
}
}
private var selectedLanguage: KftcLanguage? {
didSet {
languageTextField.text = selectedLanguage?.value
languageTextField.sendActions(for: .editingChanged)
}
}
private var selectedBank: BankInformation? {
didSet {
bankNameTextField.text = selectedBank?.bankName
bankNameTextField.sendActions(for: .editingChanged)
let languageConfigure = TablePresenterConfiguration(presenterTitle: "Select Bank")
languageTextField.useAsDropDown(with: languageConfigure, items: model.kftcModel?.languages)
}
}
@ -81,17 +64,27 @@ class AddAccountViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setup()
bankNameTextField.selectedItem.map {$0 as? BankInformation}.asDriverOnErrorJustComplete()
.drive(onNext: {[weak self] in
self?.selectedBank = $0
self?.bankNameTextField.setBank(with: $0?.bankCode)
}).disposed(by: disposeBag)
languageTextField.selectedItem.map {$0 as? KftcLanguage}.asDriverOnErrorJustComplete()
.drive(onNext: {[weak self] in
self?.selectedLanguage = $0
}).disposed(by: disposeBag)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
title = "Add Auto Debit Account"
title = "add_auto_debit_account_text".localized()
setupNormalNavigation()
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
bankNameTextField.becomeFirstResponder()
}
override func viewWillDisappear(_ animated: Bool) {
@ -133,6 +126,8 @@ class AddAccountViewController: UIViewController {
accountTextField.addTarget(self, action: #selector(self.textFieldDidChange(_:)), for: .editingChanged)
accountTextField.validCondition = {$0.count > 9}
languageTextField.validCondition = {$0.count > 1}
bankNameTextField.validCondition = {$0.count > 1}
}
@objc
@ -219,53 +214,3 @@ extension AddAccountViewController: AddAccountViewInterface {
hideProgressHud()
}
}
// MARK: UIPickerViewDataSource
extension AddAccountViewController: UIPickerViewDataSource {
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
switch pickerView {
case languagePickerView:
return languages?.count ?? 0
case bankPickerView:
return banks?.count ?? 0
default:
return 0
}
}
}
// MARK: UIPickerViewDelegate
extension AddAccountViewController: UIPickerViewDelegate {
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
switch pickerView {
case languagePickerView:
return languages?[row]
case bankPickerView:
return banks?[row]
default:
return nil
}
}
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
if row > 0 {
switch pickerView {
case languagePickerView:
selectedLanguage = model.kftcModel?.languages?[row - 1]
case bankPickerView:
selectedBank = model.bankList?[row - 1]
default:
break
}
}
}
}

8
GME Remit/Modules/ManageAccountsModules/InboundAccounts/User Interface/View/InboundAccounts.storyboard

@ -3,7 +3,7 @@
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -167,13 +167,13 @@
<rect key="frame" x="10" y="10" width="355" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aWf-wz-9Cf">
<rect key="frame" x="0.0" y="0.0" width="228" height="30"/>
<rect key="frame" x="0.0" y="0.0" width="230" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="LmG-ZD-fLc">
<rect key="frame" x="238" y="0.0" width="117" height="30"/>
<rect key="frame" x="240" y="0.0" width="115" height="30"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_warning" translatesAutoresizingMaskIntoConstraints="NO" id="HkK-bt-2he">
<rect key="frame" x="0.0" y="0.0" width="30" height="30"/>
@ -184,7 +184,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="253" text="Waiting verified" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="UAc-fD-iht">
<rect key="frame" x="35" y="0.0" width="82" height="30"/>
<rect key="frame" x="35" y="0.0" width="80" height="30"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>

62
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Interactor/TotalManageAccountsInteractor.swift

@ -15,6 +15,7 @@ class TotalManageAccountsInteractor {
weak var output: TotalManageAccountsInteractorOutput?
private let service: TotalManageAccountsServiceType
private var accounts: [TotalAccount]?
private var kftcModel: KFTCModel?
// MARK: Initialization
init(service: TotalManageAccountsServiceType) {
@ -35,22 +36,26 @@ extension TotalManageAccountsInteractor: TotalManageAccountsInteractorInput {
switch type {
case .all:
output?.setAccounts(accounts)
output?.setAccounts(accounts, kftcModel: kftcModel)
case .primary:
output?.setAccounts(
accounts.filter {$0.accountType.filter {element in element == "primary"}.count != 0}
accounts.filter {$0.accountType.filter {element in element == "primary"}.count != 0},
kftcModel: kftcModel
)
case .autodebit:
output?.setAccounts(
accounts.filter {$0.accountType.filter {element in element == "autodebit"}.count != 0}
accounts.filter {$0.accountType.filter {element in element == "autodebit"}.count != 0},
kftcModel: kftcModel
)
case .inbound:
output?.setAccounts(
accounts.filter {$0.accountType.filter {element in element == "inbound"}.count != 0}
accounts.filter {$0.accountType.filter {element in element == "inbound"}.count != 0},
kftcModel: kftcModel
)
case .none:
output?.setAccounts(
accounts.filter {$0.accountType.count == 0}
accounts.filter {$0.accountType.count == 0},
kftcModel: kftcModel
)
}
}
@ -106,8 +111,8 @@ extension TotalManageAccountsInteractor: TotalManageAccountsInteractorInput {
}
self?.accounts = accounts
self?.output?.setAccounts(self?.accounts ?? [])
self?.kftcModel = kftcModel
self?.output?.setAccounts(self?.accounts ?? [], kftcModel: kftcModel)
},
failure: {[weak self] in
self?.output?.setError(with: $0)
@ -119,15 +124,54 @@ extension TotalManageAccountsInteractor: TotalManageAccountsInteractorInput {
}
)
}
func refreshToken(language: KftcLanguage?) {
guard
let email = GMEDB.shared.user.string(.email),
let language = language else { return }
let service2 = AddAccountService()
service.refreshTokenStep1(
username: email,
success: { response in
let url = response?.url?.replacingOccurrences(
of: "&lang=", with: "&lang=\(language.key ?? "eng")"
) ?? ""
var header = [String: String]()
response?.header?.forEach({
header[$0.key ?? ""] = $0.value ?? ""
})
service2.fetchKftcUrlService(
url: url,
header: header,
success: {
self.output?.refreshTokenSuccess(header: response?.header, url: $0)
},
failure: {
if $0.localizedDescription.contains("JSON") {
self.output?.refreshTokenSuccess(header: response?.header, url: url)
} else {
self.output?.setError(with: $0)
}
}
)
},
failure: {
self.output?.setError(with: $0)
}
)
}
}
fileprivate extension Array {
func toDictionary<Key: Hashable>(with selectKey: (Element) -> Key) -> [Key:Element] {
var dict = [Key:Element]()
var dict = [Key: Element]()
for element in self {
dict[selectKey(element)] = element
}
return dict
}
}

4
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Interactor/TotalManageAccountsInteractorIO.swift

@ -8,9 +8,11 @@
protocol TotalManageAccountsInteractorInput: class {
func fetchAccounts(_ type: AccountType)
func refreshToken(language: KftcLanguage?)
}
protocol TotalManageAccountsInteractorOutput: class {
func setAccounts(_ accounts: [TotalAccount])
func setAccounts(_ accounts: [TotalAccount], kftcModel: KFTCModel?)
func refreshTokenSuccess(header: [KftcHeader]?, url: String?)
func setError(with error: Error)
}

129
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Service/TotalManageAccountsService.swift

@ -14,26 +14,6 @@ class TotalManageAccountsService: TotalManageAccountsServiceType {
success: @escaping (KFTCModel?) -> Void,
failure: @escaping (Error) -> Void
) {
// APIRouter.getKFTCParamers(username: username)
// .request(
// success: { (response: KftcAccountContainer) in
// if (response.errorCode ?? "") == "1" {
// let error = NSError(
// domain: "Network",
// code: 0,
// userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]
// )
// failure(error)
// } else {
// let model = response.data
// success(model)
// }
// },
// failure: failure
// )
//FIXME: TEST
let test =
"""
{
@ -41,6 +21,91 @@ class TotalManageAccountsService: TotalManageAccountsServiceType {
"Extra" : "",
"Extra2" : "",
"Data" : {
"URL" : "https://testapi.open-platform.or.kr/oauth/2.0/authorize2?response_type=code&client_id=l7xx9a67eaeb6a684f15b441769931d582b3&redirect_uri=http://gmeuat.gmeremit.com:5013/Dashboard/AutoDebit&scope=login+inquiry+transfer&client_info=mobile_40154&auth_type=1&bg_color=%23F4F8FB&txt_color=%23000000&btn1_color=%23EF343B&btn2_color=%2322246B&edit_option=off&invoke_type=ajax",
"Header" : [
{
"Key" : "Kftc-Bfop-UserSeqNo",
"Value" : "1100033843"
},
{
"Key" : "Kftc-Bfop-UserCI",
"Value" : "mAjbMK7hXiDfv2mUMEfocsYaYUyOKVzzAIwPo8pcVI/3Iqy+LVkkTM8PGJkcpsaVzqh03TBn0HkryMdGXkb6xg=="
},
{
"Key" : "Kftc-Bfop-UserName",
"Value" : "김한성"
},
{
"Key" : "Kftc-Bfop-UserInfo",
"Value" : ""
},
{
"Key" : "Kftc-Bfop-UserCellNo",
"Value" : ""
},
{
"Key" : "Kftc-Bfop-PhoneCarrier",
"Value" : ""
},
{
"Key" : "Kftc-Bfop-UserEmail",
"Value" : ""
}
],
"Language" : [
{
"Key" : "eng",
"Value" : "English"
},
{
"Key" : "kor",
"Value" : "Korean"
},
{
"Key" : "vnm",
"Value" : "Vietnamese"
},
{
"Key" : "idn",
"Value" : "Indonesia"
},
{
"Key" : "khm",
"Value" : "Khmer"
},
{
"Key" : "phl",
"Value" : "Philippines"
},
{
"Key" : "npl",
"Value" : "Nepalese"
},
{
"Key" : "bgd",
"Value" : "Bangladesh"
},
{
"Key" : "pak",
"Value" : "Pakistan"
},
{
"Key" : "rus",
"Value" : "Russian"
},
{
"Key" : "uzb",
"Value" : "Uzbekistan"
},
{
"Key" : "mng",
"Value" : "Mongolia"
},
{
"Key" : "lka",
"Value" : "Sri Lanka"
}
],
"AccountList" : [
{
"BankCode" : "034",
@ -191,4 +256,28 @@ class TotalManageAccountsService: TotalManageAccountsServiceType {
success(data)
}
func refreshTokenStep1(
username: String,
success: @escaping (KFTCModel?) -> Void,
failure: @escaping (Error) -> Void
) {
APIRouter.renewalToken(username: username)
.request(
success: { (response: KftcAccountContainer) in
if (response.errorCode ?? "") == "1" {
let error = NSError(
domain: "Network",
code: 0,
userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]
)
failure(error)
} else {
let model = response.data
success(model)
}
},
failure: failure
)
}
}

6
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/Application Logic/Service/TotalManageAccountsServiceType.swift

@ -17,4 +17,10 @@ protocol TotalManageAccountsServiceType: class {
success: @escaping ([InboundAccount]) -> Void,
failure: @escaping (Error) -> Void
)
func refreshTokenStep1(
username: String,
success: @escaping (KFTCModel?) -> Void,
failure: @escaping (Error) -> Void
)
}

34
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/Presenter/TotalManageAccountsPresenter.swift

@ -16,12 +16,18 @@ class TotalManageAccountsPresenter: ViewModelType {
struct Input {
let viewWillAppear: Driver<Void>
let selectedType: Driver<AccountType>
let addAutodebitAccount: Driver<KFTCModel?>
let addInboundAccount: Driver<PenneyTestRequest?>
let verifyAccount: Driver<PenneyTestRequest>
let deleteAutodebitAccount: Driver<String>
let tokenRenew: Driver<KftcLanguage?>
}
struct Output {
let isError: Driver<Error>
let isProgress: Driver<Bool>
let accounts: Driver<[TotalAccount]>
let kftcModel: Driver<KFTCModel?>
}
private let disposeBag = DisposeBag()
@ -30,6 +36,7 @@ class TotalManageAccountsPresenter: ViewModelType {
private let errorLinker = PublishSubject<Error>()
private let accounts = PublishSubject<[TotalAccount]>()
private let kftcModel = PublishSubject<KFTCModel?>()
func transform(input: Input) -> Output {
input.viewWillAppear.drive(onNext: {[weak self] in
@ -42,19 +49,40 @@ class TotalManageAccountsPresenter: ViewModelType {
self?.interactor?.fetchAccounts($0)
}).disposed(by: disposeBag)
input.addInboundAccount.drive(onNext: {[weak self] in
self?.wireframe?.openAddInbound(with: $0)
}).disposed(by: disposeBag)
input.verifyAccount.drive(onNext: {[weak self] in
self?.wireframe?.openVerify(with: $0)
}).disposed(by: disposeBag)
input.addAutodebitAccount.drive(onNext: {[weak self] in
self?.wireframe?.openAddAutodebit(with: $0)
}).disposed(by: disposeBag)
input.tokenRenew.drive(onNext: {[weak self] in
self?.interactor?.refreshToken(language: $0)
}).disposed(by: disposeBag)
return Output(
isError: errorLinker.asDriverOnErrorJustComplete(),
isProgress: progressLinker.asDriverOnErrorJustComplete(),
accounts: accounts.asDriverOnErrorJustComplete()
accounts: accounts.asDriverOnErrorJustComplete(),
kftcModel: kftcModel.asDriverOnErrorJustComplete()
)
}
}
// MARK: TotalManageAccounts interactor output interface
extension TotalManageAccountsPresenter: TotalManageAccountsInteractorOutput {
func setAccounts(_ accounts: [TotalAccount]) {
func refreshTokenSuccess(header: [KftcHeader]?, url: String?) {
wireframe?.openRefreshToken(header: header, url: url)
}
func setAccounts(_ accounts: [TotalAccount], kftcModel: KFTCModel?) {
progressLinker.onNext(false)
self.accounts.onNext(accounts)
self.kftcModel.onNext(kftcModel)
}
func setError(with error: Error) {

46
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/View/AccountCell.swift

@ -8,7 +8,14 @@
import UIKit
protocol AccountCellDelegate: class {
func delete(_ model: TotalAccount)
func migrate(_ model: TotalAccount)
func verify(_ model: TotalAccount)
}
class AccountCell: UITableViewCell {
private var model: TotalAccount?
@IBOutlet weak var bankImageView: UIImageView!
@IBOutlet weak var bankNameLabel: UILabel!
@ -21,8 +28,11 @@ class AccountCell: UITableViewCell {
@IBOutlet weak var verifyRequireButton: UIButton!
@IBOutlet weak var penneyTestRequestButton: UIButton!
@IBOutlet weak var deleteButton: UIButton!
@IBOutlet weak var deleteContainerView: UIView!
func setModel(with model: TotalAccount) {
weak var delegate: AccountCellDelegate?
func setModel(with model: TotalAccount, isEdit: Bool) {
bankImageView.image = BankEnum(rawValue: model.bankCode ?? "")?.ciImage
bankNameLabel.text = model.bankName
bankAccountLabel.text = model.accountNo
@ -33,7 +43,7 @@ class AccountCell: UITableViewCell {
verifyRequireButton.isHidden = false
penneyTestRequestButton.isHidden = false
deleteButton.isHidden = false
deleteContainerView.isHidden = true
primaryBadgeLabel.layer.cornerRadius = 2
autodebitBadgeLabel.layer.cornerRadius = 2
@ -47,12 +57,13 @@ class AccountCell: UITableViewCell {
self?.autodebitBadgeLabel.isHidden = false
case "inbound":
self?.inboundBadgeLabel.isHidden = false
default: ()
}
}
if model.isPrimary ?? false {
deleteButton.isHidden = true
if !(model.isPrimary ?? false) {
deleteContainerView.animateHidden(isHidden: !isEdit)
}
if model.isPennyTestSuccess ?? false {
@ -71,6 +82,31 @@ class AccountCell: UITableViewCell {
}
}
layoutIfNeeded()
self.model = model
}
@IBAction func touchVerify(_ sender: UIButton) {
guard let model = self.model else {
return
}
delegate?.verify(model)
}
@IBAction func touchMigrate(_ sender: UIButton) {
guard let model = self.model else {
return
}
delegate?.migrate(model)
}
@IBAction func touchDelete(_ sender: UIButton) {
guard let model = self.model else {
return
}
delegate?.delete(model)
}
}

348
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/View/TotalManageAccounts.storyboard

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="138-uC-dke">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
@ -22,45 +22,88 @@
<objects>
<viewController storyboardIdentifier="TotalManageAccountsViewController" title="TotalManageAccounts" id="HSb-ou-7T5" customClass="TotalManageAccountsViewController" customModule="GME_Remit" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="is3-5U-HcP">
<rect key="frame" x="5" y="54" width="365" height="41"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="XgW-pd-AwQ"/>
</constraints>
<segments>
<segment title="ALL"/>
<segment title="PRIMARY"/>
<segment>
<string key="title">AUTO
DEBIT</string>
</segment>
<segment title="INBOUND"/>
<segment title="NONE"/>
</segments>
<color key="tintColor" name="ThemeText"/>
</segmentedControl>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" allowsSelection="NO" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Qeo-ve-6U8">
<rect key="frame" x="0.0" y="70" width="320" height="368"/>
<rect key="frame" x="10" y="159.5" width="355" height="467.5"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="separatorColor" name="ThemeSeparate"/>
<inset key="separatorInset" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<color key="sectionIndexBackgroundColor" name="ThemeMainBackground"/>
<view key="tableFooterView" contentMode="scaleToFill" id="dGR-KH-qA9">
<rect key="frame" x="0.0" y="166" width="320" height="44"/>
<rect key="frame" x="0.0" y="136" width="355" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="AccountCell" rowHeight="110" id="qo4-Lx-AJK" customClass="AccountCell" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="320" height="110"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="AccountCell" rowHeight="80" id="qo4-Lx-AJK" customClass="AccountCell" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="355" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qo4-Lx-AJK" id="5bL-XN-P2u">
<rect key="frame" x="0.0" y="0.0" width="320" height="110"/>
<rect key="frame" x="0.0" y="0.0" width="355" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xCC-LO-Boy">
<rect key="frame" x="5" y="5" width="310" height="105"/>
<rect key="frame" x="5" y="5" width="345" height="75"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="IgB-O4-GPi">
<rect key="frame" x="10" y="0.0" width="290" height="105"/>
<rect key="frame" x="10" y="0.0" width="325" height="75"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sJC-Xj-rUh">
<rect key="frame" x="0.0" y="0.0" width="30" height="75"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vnm-i9-6ld">
<rect key="frame" x="0.0" y="22.5" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="pLZ-IN-BSP"/>
<constraint firstAttribute="width" constant="30" id="tix-cX-1G1"/>
</constraints>
<color key="tintColor" name="ThemeRed"/>
<inset key="imageEdgeInsets" minX="5" minY="5" maxX="5" maxY="5"/>
<state key="normal" image="ic_minus2"/>
<connections>
<action selector="touchDelete:" destination="qo4-Lx-AJK" eventType="touchUpInside" id="opu-sD-qHl"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="vnm-i9-6ld" firstAttribute="leading" secondItem="sJC-Xj-rUh" secondAttribute="leading" id="2xF-0I-n1R"/>
<constraint firstItem="vnm-i9-6ld" firstAttribute="centerX" secondItem="sJC-Xj-rUh" secondAttribute="centerX" id="Wyt-ZG-V91"/>
<constraint firstItem="vnm-i9-6ld" firstAttribute="centerY" secondItem="sJC-Xj-rUh" secondAttribute="centerY" id="kYg-tS-zbX"/>
<constraint firstAttribute="trailing" secondItem="vnm-i9-6ld" secondAttribute="trailing" id="xeR-JD-eYt"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="roH-ZA-EWP">
<rect key="frame" x="0.0" y="0.0" width="30" height="105"/>
<rect key="frame" x="40" y="0.0" width="30" height="75"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sc" translatesAutoresizingMaskIntoConstraints="NO" id="cuG-1T-GMG">
<rect key="frame" x="0.0" y="37.5" width="30" height="30"/>
<rect key="frame" x="0.0" y="22.5" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="NVr-Fq-XYx"/>
<constraint firstAttribute="height" constant="30" id="uim-RF-5tW"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="cuG-1T-GMG" firstAttribute="centerY" secondItem="roH-ZA-EWP" secondAttribute="centerY" id="5vo-79-5UE"/>
<constraint firstAttribute="trailing" secondItem="cuG-1T-GMG" secondAttribute="trailing" id="QJ3-kM-t2z"/>
@ -68,44 +111,44 @@
<constraint firstItem="cuG-1T-GMG" firstAttribute="leading" secondItem="roH-ZA-EWP" secondAttribute="leading" id="mW8-Y6-Mfy"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" axis="vertical" distribution="fillEqually" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="1Ry-Vs-x3Z">
<rect key="frame" x="40" y="0.0" width="150" height="105"/>
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="1Ry-Vs-x3Z">
<rect key="frame" x="80" y="0.0" width="175" height="75"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ehT-mx-pWF">
<rect key="frame" x="0.0" y="0.0" width="150" height="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="200" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ehT-mx-pWF">
<rect key="frame" x="0.0" y="0.0" width="175" height="5.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="6PG-fI-u8S">
<rect key="frame" x="0.0" y="22" width="150" height="17"/>
<rect key="frame" x="0.0" y="10.5" width="175" height="14.5"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PRIMARY" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="J3d-Db-1e9">
<rect key="frame" x="0.0" y="0.0" width="45" height="17"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="P" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="J3d-Db-1e9">
<rect key="frame" x="0.0" y="0.0" width="20" height="14.5"/>
<color key="backgroundColor" name="ThemeRed"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AUTODEBIT" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="c4T-YD-9vb">
<rect key="frame" x="50" y="0.0" width="45" height="17"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="A" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="c4T-YD-9vb">
<rect key="frame" x="25" y="0.0" width="20" height="14.5"/>
<color key="backgroundColor" name="ThemeBlue"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="65" id="Cyd-LT-QTw"/>
<constraint firstAttribute="width" constant="20" id="Cyd-LT-QTw"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="INBOUND" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="gvu-Px-Fvd">
<rect key="frame" x="100" y="0.0" width="45" height="17"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="I" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="gvu-Px-Fvd">
<rect key="frame" x="50" y="0.0" width="20" height="14.5"/>
<color key="backgroundColor" name="ThemeGreen"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="249" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bbH-mO-d3s">
<rect key="frame" x="150" y="0.0" width="0.0" height="17"/>
<rect key="frame" x="75" y="0.0" width="100" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -116,20 +159,31 @@
<constraint firstItem="gvu-Px-Fvd" firstAttribute="width" secondItem="J3d-Db-1e9" secondAttribute="width" id="toh-gY-uFQ"/>
</constraints>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="253" verticalHuggingPriority="252" text="Standard Chartered Korea(SC First)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="C1T-1Q-AXa">
<rect key="frame" x="0.0" y="44" width="150" height="17"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="17"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="19191929381334" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qYb-Kl-xIQ">
<rect key="frame" x="0.0" y="66" width="150" height="17"/>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h0d-Ah-jzb">
<rect key="frame" x="0.0" y="30" width="175" height="15"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="253" verticalHuggingPriority="252" text="Standard Chartered Korea(SC First)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.40000000000000002" translatesAutoresizingMaskIntoConstraints="NO" id="C1T-1Q-AXa">
<rect key="frame" x="0.0" y="0.0" width="175" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="7iv-rY-iAq"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="17"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="19191929381334" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="qYb-Kl-xIQ">
<rect key="frame" x="0.0" y="50" width="175" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="DF7-9M-a4Y"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="95Z-7E-0EY">
<rect key="frame" x="0.0" y="88" width="150" height="17"/>
<rect key="frame" x="0.0" y="70" width="175" height="5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -140,10 +194,10 @@
</constraints>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7ud-JF-Vry">
<rect key="frame" x="200" y="0.0" width="90" height="105"/>
<rect key="frame" x="265" y="0.0" width="60" height="75"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vf9-OU-qls">
<rect key="frame" x="0.0" y="37.5" width="90" height="30"/>
<rect key="frame" x="0.0" y="22.5" width="60" height="30"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="K3U-gh-yf3">
<rect key="frame" x="0.0" y="0.0" width="30" height="30"/>
@ -151,8 +205,11 @@
<constraint firstAttribute="height" constant="30" id="88j-0k-bk5"/>
<constraint firstAttribute="width" constant="30" id="eJ8-p3-VC0"/>
</constraints>
<color key="tintColor" name="ThemeRed"/>
<color key="tintColor" name="ThemeText"/>
<state key="normal" image="ic_warning"/>
<connections>
<action selector="touchVerify:" destination="qo4-Lx-AJK" eventType="touchUpInside" id="o8S-iB-zNu"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BwO-Rd-riy">
<rect key="frame" x="30" y="0.0" width="30" height="30"/>
@ -160,22 +217,16 @@
<constraint firstAttribute="width" constant="30" id="GUx-Nc-qvz"/>
<constraint firstAttribute="height" constant="30" id="QQn-QA-UWZ"/>
</constraints>
<color key="tintColor" name="ThemeRed"/>
<color key="tintColor" name="ThemeText"/>
<state key="normal" image="ic_migrate"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vnm-i9-6ld">
<rect key="frame" x="60" y="0.0" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="pLZ-IN-BSP"/>
<constraint firstAttribute="width" constant="30" id="tix-cX-1G1"/>
</constraints>
<color key="tintColor" name="ThemeRed"/>
<state key="normal" image="ic_delete"/>
<connections>
<action selector="touchMigrate:" destination="qo4-Lx-AJK" eventType="touchUpInside" id="YQq-O1-RWq"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Vf9-OU-qls" secondAttribute="trailing" id="53K-iY-WI9"/>
<constraint firstItem="Vf9-OU-qls" firstAttribute="leading" secondItem="7ud-JF-Vry" secondAttribute="leading" id="ThG-1A-4Eu"/>
@ -186,7 +237,7 @@
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" name="ThemeMainBackground"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="IgB-O4-GPi" secondAttribute="trailing" constant="10" id="39c-In-5xe"/>
<constraint firstItem="IgB-O4-GPi" firstAttribute="top" secondItem="xCC-LO-Boy" secondAttribute="top" id="U7u-iT-e8K"/>
@ -195,6 +246,7 @@
</constraints>
</view>
</subviews>
<color key="backgroundColor" name="ThemeMainBackground"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="xCC-LO-Boy" secondAttribute="trailing" constant="5" id="ND1-BG-kjM"/>
<constraint firstItem="xCC-LO-Boy" firstAttribute="leading" secondItem="5bL-XN-P2u" secondAttribute="leading" constant="5" id="qeb-KQ-dTu"/>
@ -208,6 +260,7 @@
<outlet property="bankImageView" destination="cuG-1T-GMG" id="dfd-JP-jrw"/>
<outlet property="bankNameLabel" destination="C1T-1Q-AXa" id="xrb-IS-u5V"/>
<outlet property="deleteButton" destination="vnm-i9-6ld" id="c1T-4Y-pmH"/>
<outlet property="deleteContainerView" destination="sJC-Xj-rUh" id="VKa-Ae-w1Y"/>
<outlet property="inboundBadgeLabel" destination="gvu-Px-Fvd" id="ANQ-t1-ozI"/>
<outlet property="penneyTestRequestButton" destination="BwO-Rd-riy" id="KAy-xH-5dn"/>
<outlet property="primaryBadgeLabel" destination="J3d-Db-1e9" id="hYi-22-ZZN"/>
@ -216,78 +269,174 @@
</tableViewCell>
</prototypes>
</tableView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="u9o-ig-Iiy">
<rect key="frame" x="10" y="448" width="300" height="50"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Kz-Le-fSy">
<rect key="frame" x="0.0" y="637" width="375" height="30"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jbv-Fa-rHT">
<rect key="frame" x="0.0" y="0.0" width="146" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="d7R-ME-p66"/>
</constraints>
<state key="normal" title="Add AutoDebit Account"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SB0-ks-hOm">
<rect key="frame" x="154" y="0.0" width="146" height="50"/>
<state key="normal" title="Renew AutoDebit Account"/>
</button>
<stackView opaque="NO" contentMode="scaleToFill" spacing="11" translatesAutoresizingMaskIntoConstraints="NO" id="EWq-r3-U7w">
<rect key="frame" x="10" y="5" width="355" height="20"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="icc-UV-hN7">
<rect key="frame" x="0.0" y="0.0" width="110" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PRIMARY" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dT4-TG-Pes">
<rect key="frame" x="121" y="0.0" width="65" height="20"/>
<color key="backgroundColor" name="ThemeRed"/>
<constraints>
<constraint firstAttribute="width" constant="65" id="4QD-C0-4Op"/>
<constraint firstAttribute="height" constant="20" id="opr-gR-p1w"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AUTODEBIT" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="boW-lb-Jjj">
<rect key="frame" x="197" y="0.0" width="80" height="20"/>
<color key="backgroundColor" name="ThemeBlue"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="XV6-6X-IoN"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="INBOUND" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dC7-1n-iEs">
<rect key="frame" x="288" y="0.0" width="67" height="20"/>
<color key="backgroundColor" name="ThemeGreen"/>
<constraints>
<constraint firstAttribute="width" constant="67" id="9gR-Q8-dsN"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="is3-5U-HcP">
<rect key="frame" x="10" y="10" width="300" height="51"/>
<color key="backgroundColor" name="ThemeSubBackground"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="XgW-pd-AwQ"/>
<constraint firstAttribute="bottom" secondItem="EWq-r3-U7w" secondAttribute="bottom" constant="5" id="Eml-zN-QEg"/>
<constraint firstAttribute="trailing" secondItem="EWq-r3-U7w" secondAttribute="trailing" constant="10" id="HkP-Mf-b5A"/>
<constraint firstItem="EWq-r3-U7w" firstAttribute="leading" secondItem="7Kz-Le-fSy" secondAttribute="leading" constant="10" id="Lft-Mi-xek"/>
<constraint firstItem="EWq-r3-U7w" firstAttribute="top" secondItem="7Kz-Le-fSy" secondAttribute="top" constant="5" id="Ohh-g5-ilL"/>
</constraints>
<segments>
<segment title="ALL"/>
<segment title="PRIMARY"/>
<segment>
<string key="title">AUTO
DEBIT</string>
</segment>
<segment title="INBOUND"/>
<segment title="NONE"/>
</segments>
</segmentedControl>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bHn-gV-F3A">
<rect key="frame" x="86" y="508" width="148" height="50"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SIW-qa-kIS">
<rect key="frame" x="0.0" y="154" width="375" height="0.5"/>
<color key="backgroundColor" name="ThemeSeparate"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="USn-YN-QJp"/>
<constraint firstAttribute="height" constant="0.5" id="Nnd-HF-mPT"/>
</constraints>
<state key="normal" title="Add Inbound Account"/>
</button>
</view>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="2gT-Ex-ZI0">
<rect key="frame" x="10" y="114" width="355" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="ALL" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hID-g6-7Bt">
<rect key="frame" x="0.0" y="0.0" width="283" height="30"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="20"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="253" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V6u-qv-jIh">
<rect key="frame" x="288" y="0.0" width="67" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="TEZ-hE-KJt"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="tintColor" name="ThemeRed"/>
<state key="normal" title="Delete" image="ic_delete3"/>
<connections>
<action selector="touchEdit:" destination="HSb-ou-7T5" eventType="touchUpInside" id="ezf-ST-VIN"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" name="ThemeMainBackground"/>
<constraints>
<constraint firstItem="is3-5U-HcP" firstAttribute="top" secondItem="O1T-1R-Sun" secondAttribute="top" constant="10" id="BA7-vv-cJ8"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="is3-5U-HcP" secondAttribute="trailing" constant="10" id="Cm8-dp-Tkj"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="bottom" secondItem="bHn-gV-F3A" secondAttribute="bottom" constant="10" id="ECX-ZA-bAS"/>
<constraint firstItem="u9o-ig-Iiy" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="10" id="KpY-ZY-EEX"/>
<constraint firstItem="Qeo-ve-6U8" firstAttribute="trailing" secondItem="O1T-1R-Sun" secondAttribute="trailing" id="NE0-Vl-YAV"/>
<constraint firstItem="bHn-gV-F3A" firstAttribute="top" secondItem="u9o-ig-Iiy" secondAttribute="bottom" constant="10" id="PG8-Op-Wjr"/>
<constraint firstItem="Qeo-ve-6U8" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" id="T7J-sc-HXx"/>
<constraint firstItem="is3-5U-HcP" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="10" id="bLg-yd-o9u"/>
<constraint firstItem="Qeo-ve-6U8" firstAttribute="top" secondItem="is3-5U-HcP" secondAttribute="bottom" constant="10" id="eOd-g8-WJf"/>
<constraint firstItem="u9o-ig-Iiy" firstAttribute="top" secondItem="Qeo-ve-6U8" secondAttribute="bottom" constant="10" id="gXt-Wc-X5a"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="u9o-ig-Iiy" secondAttribute="trailing" constant="10" id="vt4-h9-drm"/>
<constraint firstItem="bHn-gV-F3A" firstAttribute="centerX" secondItem="u9o-ig-Iiy" secondAttribute="centerX" id="xRD-fz-MlZ"/>
<constraint firstItem="2gT-Ex-ZI0" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="10" id="4Cp-ee-gzI"/>
<constraint firstAttribute="trailing" secondItem="Qeo-ve-6U8" secondAttribute="trailing" constant="10" id="4of-uz-h6W"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="is3-5U-HcP" secondAttribute="trailing" constant="5" id="6XF-Bd-wlQ"/>
<constraint firstItem="7Kz-Le-fSy" firstAttribute="top" secondItem="Qeo-ve-6U8" secondAttribute="bottom" constant="10" id="7qb-lb-Hbp"/>
<constraint firstAttribute="bottom" secondItem="7Kz-Le-fSy" secondAttribute="bottom" id="BFZ-Gw-2kY"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="is3-5U-HcP" secondAttribute="trailing" constant="5" id="Cm8-dp-Tkj"/>
<constraint firstItem="SIW-qa-kIS" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" id="LTC-jz-PwM"/>
<constraint firstItem="SIW-qa-kIS" firstAttribute="leading" secondItem="9Uc-9s-KgO" secondAttribute="leading" id="Un6-TO-C2g"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="SIW-qa-kIS" secondAttribute="trailing" id="W9c-Rx-uDV"/>
<constraint firstItem="is3-5U-HcP" firstAttribute="top" secondItem="O1T-1R-Sun" secondAttribute="top" constant="10" id="XGm-tO-bRN"/>
<constraint firstItem="Qeo-ve-6U8" firstAttribute="top" secondItem="SIW-qa-kIS" secondAttribute="bottom" constant="5" id="ad2-N2-jaD"/>
<constraint firstItem="2gT-Ex-ZI0" firstAttribute="top" secondItem="is3-5U-HcP" secondAttribute="bottom" constant="20" id="asF-t4-yqs"/>
<constraint firstItem="7Kz-Le-fSy" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" id="b6q-8W-SR3"/>
<constraint firstItem="is3-5U-HcP" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="5" id="bLg-yd-o9u"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="is3-5U-HcP" secondAttribute="trailing" constant="5" id="dDm-KI-Dr3"/>
<constraint firstItem="SIW-qa-kIS" firstAttribute="top" secondItem="2gT-Ex-ZI0" secondAttribute="bottom" constant="10" id="eZw-CW-8BR"/>
<constraint firstItem="SIW-qa-kIS" firstAttribute="leading" secondItem="9Uc-9s-KgO" secondAttribute="leading" id="hRW-Q6-dlR"/>
<constraint firstItem="is3-5U-HcP" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="5" id="mOM-cJ-GGe"/>
<constraint firstAttribute="trailing" secondItem="SIW-qa-kIS" secondAttribute="trailing" id="nWs-lz-UlQ"/>
<constraint firstItem="7Kz-Le-fSy" firstAttribute="trailing" secondItem="O1T-1R-Sun" secondAttribute="trailing" id="nvr-VJ-Z9n"/>
<constraint firstItem="is3-5U-HcP" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="5" id="oqq-X3-yMh"/>
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="2gT-Ex-ZI0" secondAttribute="trailing" constant="10" id="tTB-Kb-wqs"/>
<constraint firstItem="Qeo-ve-6U8" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="10" id="uCH-aP-PMs"/>
<constraint firstAttribute="trailing" secondItem="SIW-qa-kIS" secondAttribute="trailing" id="zwz-1x-Ub4"/>
</constraints>
<viewLayoutGuide key="safeArea" id="O1T-1R-Sun"/>
</view>
<navigationItem key="navigationItem" id="qvN-Ew-cAy">
<rightBarButtonItems>
<barButtonItem systemItem="add" id="KdU-Sl-UFZ">
<color key="tintColor" name="ThemeBlack"/>
</barButtonItem>
<barButtonItem systemItem="refresh" id="LgQ-uT-53w">
<color key="tintColor" name="ThemeBlack"/>
</barButtonItem>
</rightBarButtonItems>
</navigationItem>
<connections>
<outlet property="accountTypeSegment" destination="is3-5U-HcP" id="rVT-Wt-P3t"/>
<outlet property="addButton" destination="KdU-Sl-UFZ" id="Fhv-1i-tPC"/>
<outlet property="autodebitTagLabel" destination="boW-lb-Jjj" id="oqq-sJ-2ja"/>
<outlet property="deleteButton" destination="V6u-qv-jIh" id="LlY-rT-M8Y"/>
<outlet property="filterNameLabel" destination="hID-g6-7Bt" id="wui-7a-D4e"/>
<outlet property="inboundTagLabel" destination="dC7-1n-iEs" id="7NC-WE-zGS"/>
<outlet property="primaryTagLabel" destination="dT4-TG-Pes" id="L9f-KB-fa1"/>
<outlet property="renewButton" destination="LgQ-uT-53w" id="aKr-Tj-D4Z"/>
<outlet property="tableView" destination="Qeo-ve-6U8" id="b0s-64-dmK"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-92" y="232.53373313343329"/>
<point key="canvasLocation" x="903.20000000000005" y="231.63418290854574"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="RnV-uV-us2">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="138-uC-dke" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="lib-JN-b8b">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="HSb-ou-7T5" kind="relationship" relationship="rootViewController" id="wbz-nt-INz"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="KUD-6h-TXN" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-93.75" y="232.3943661971831"/>
</scene>
</scenes>
<resources>
<image name="ic_delete" width="48" height="48"/>
<image name="ic_delete3" width="24" height="24"/>
<image name="ic_migrate" width="48" height="48"/>
<image name="ic_minus2" width="32" height="32"/>
<image name="ic_warning" width="48" height="48"/>
<image name="sc" width="100" height="72"/>
<namedColor name="ThemeBlack">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</namedColor>
<namedColor name="ThemeBlue">
<color red="0.18799999356269836" green="0.24300000071525574" blue="0.62400001287460327" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
@ -303,6 +452,9 @@ DEBIT</string>
<namedColor name="ThemeSeparate">
<color red="0.82400000095367432" green="0.82400000095367432" blue="0.82400000095367432" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="ThemeSubBackground">
<color red="0.93300002813339233" green="0.93300002813339233" blue="0.93300002813339233" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</namedColor>
<namedColor name="ThemeText">
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

179
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/View/TotalManageAccountsViewController.swift

@ -16,6 +16,21 @@ enum AccountType: Int {
case autodebit
case inbound
case none
var name: String {
switch self {
case .all:
return "ALL"
case .primary:
return "PRIMARY"
case .autodebit:
return "AUTO DEBIT"
case .inbound:
return "Inbound"
case .none:
return "NONE"
}
}
}
class TotalManageAccountsViewController: UIViewController {
@ -24,6 +39,10 @@ class TotalManageAccountsViewController: UIViewController {
var presenter: TotalManageAccountsPresenter!
private let disposeBag = DisposeBag()
private let addAutodebit = PublishSubject<KFTCModel?>()
private let addInbound = PublishSubject<PenneyTestRequest?>()
private let verifyAccount = PublishSubject<PenneyTestRequest>()
private let deleteAutodebitAccount = PublishSubject<String>()
// MARK: Computed Properties
private var accounts: [TotalAccount] = [] {
@ -31,10 +50,35 @@ class TotalManageAccountsViewController: UIViewController {
tableView.reloadData()
}
}
private var kftcModel: KFTCModel? {
didSet {
let configure = TablePresenterConfiguration(presenterTitle: "Select Language")
languageTextField.useAsDropDown(with: configure, items: kftcModel?.languages)
languageTextField.placeholder = "token_renewal_placeholder_text".localized()
languageTextField.rightViewMode = .never
}
}
private var isEdit = false {
didSet {
tableView.reloadData()
}
}
lazy var languageTextField = ValidationTextField(frame: .zero)
// MARK: IBOutlets
@IBOutlet private weak var tableView: UITableView!
@IBOutlet private weak var accountTypeSegment: UISegmentedControl!
@IBOutlet private weak var deleteButton: UIButton!
@IBOutlet private weak var renewButton: UIBarButtonItem!
@IBOutlet private weak var addButton: UIBarButtonItem!
@IBOutlet private weak var primaryTagLabel: UILabel!
@IBOutlet private weak var autodebitTagLabel: UILabel!
@IBOutlet private weak var inboundTagLabel: UILabel!
@IBOutlet private weak var filterNameLabel: UILabel!
// MARK: VC's Life cycle
override func viewDidLoad() {
@ -54,7 +98,10 @@ class TotalManageAccountsViewController: UIViewController {
}
// MARK: IBActions
@IBAction func touchEdit(_ sender: UIButton) {
isEdit = !isEdit
}
}
// MARK: Other Functions
@ -76,13 +123,85 @@ extension TotalManageAccountsViewController {
labels.numberOfLines = 2
labels.minimumScaleFactor = 0.6
labels.adjustsFontSizeToFitWidth = true
labels.font = .sanfrancisco(.medium, size: 12)
}
}
}
deleteButton.titleLabel?.minimumScaleFactor = 0.5
deleteButton.titleLabel?.adjustsFontSizeToFitWidth = true
view.addSubview(languageTextField)
primaryTagLabel.layer.cornerRadius = 5
autodebitTagLabel.layer.cornerRadius = 5
inboundTagLabel.layer.cornerRadius = 5
}
private func setUIBinding() {
accountTypeSegment.rx.selectedSegmentIndex
.map {AccountType(rawValue: $0)?.name}
.bind(to: filterNameLabel.rx.text).disposed(by: disposeBag)
renewButton.rx.tap.asDriver().drive(onNext: {[weak self] in
self?.alertWithOkCancel(
type: .normal,
message: "token_renewal_confirm_text".localized(),
title: "token_renewal_text".localized(),
okTitle: "yes_text".localized(),
cancelTitle: "no_text".localized(),
okAction: {[weak self] in
self?.languageTextField.becomeFirstResponder()
},
cancelAction: nil
)
}).disposed(by: disposeBag)
addButton.rx.tap.asDriver().drive(onNext: {[weak self] in
guard let `self` = self else { return }
let alert = UIAlertController(
title: nil,
message: "Add Account",
preferredStyle: .actionSheet
)
let autodebit = UIAlertAction(
title: "Autodebit Account",
style: .default
) { _ in
self.addAutodebit.onNext(self.kftcModel)
}
let inbound = UIAlertAction(
title: "Inbound Account",
style: .default
) { _ in
self.addInbound.onNext(nil)
}
let cancel = UIAlertAction(title: "Cancel", style: .cancel)
alert.addAction(autodebit)
alert.addAction(inbound)
alert.addAction(cancel)
alert.view.tintColor = .themeText
if UIDevice.current.userInterfaceIdiom == .pad {
if let popoverController = alert.popoverPresentationController {
popoverController.sourceView = self.view
popoverController.sourceRect = CGRect(
x: self.view.bounds.midX,
y: self.view.bounds.midY,
width: 0,
height: 0
)
popoverController.permittedArrowDirections = []
self.present(alert, animated: true, completion: nil)
}
} else {
self.present(alert, animated: true, completion: nil)
}
}).disposed(by: disposeBag)
}
private func setBinding() {
@ -95,7 +214,12 @@ extension TotalManageAccountsViewController {
let input = TotalManageAccountsPresenter.Input(
viewWillAppear: viewWillAppear,
selectedType: selectedType
selectedType: selectedType,
addAutodebitAccount: addAutodebit.asDriverOnErrorJustComplete(),
addInboundAccount: addInbound.asDriverOnErrorJustComplete(),
verifyAccount: verifyAccount.asDriverOnErrorJustComplete(),
deleteAutodebitAccount: deleteAutodebitAccount.asDriverOnErrorJustComplete(),
tokenRenew: languageTextField.selectedItem.map {$0 as? KftcLanguage}.asDriverOnErrorJustComplete()
)
let output = presenter.transform(input: input)
@ -113,9 +237,14 @@ extension TotalManageAccountsViewController {
output.accounts.drive(onNext: {[weak self] in
self?.accounts = $0
}).disposed(by: disposeBag)
output.kftcModel.drive(onNext: {[weak self] in
self?.kftcModel = $0
}).disposed(by: disposeBag)
}
}
// MARK: UITableViewDataSource
extension TotalManageAccountsViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return accounts.count
@ -126,13 +255,55 @@ extension TotalManageAccountsViewController: UITableViewDataSource {
return UITableViewCell()
}
cell.setModel(with: self.accounts[indexPath.row])
cell.setModel(with: self.accounts[indexPath.row], isEdit: isEdit)
cell.delegate = self
return cell
}
}
// MARK: UITableViewDelegate
extension TotalManageAccountsViewController: UITableViewDelegate {
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 110
return 95
}
}
// MARK: AccountCellDelegate
extension TotalManageAccountsViewController: AccountCellDelegate {
func delete(_ model: TotalAccount) {
alertWithOkCancel(
message: "auto_debit_delete_confirm_description".localized(),
title: "are_you_sure_text".localized(),
okTitle: "delete_text".localized(),
okAction: { [weak self] in
self?.deleteAutodebitAccount.onNext(model.autodebitID ?? "")
}
)
}
func migrate(_ model: TotalAccount) {
let bank = BankInformation(bankCode: model.bankCode, bankName: model.bankName)
let model = PenneyTestRequest(
accountID: model.autodebitID,
accountType: "autodebit",
bank: bank,
account: model.accountNo ?? ""
)
addInbound.onNext(model)
}
func verify(_ model: TotalAccount) {
let bankInformation = BankInformation(
bankCode: model.bankCode ?? "",
bankName: model.bankName ?? ""
)
let pennyTestRequest = PenneyTestRequest(
bank: bankInformation,
account: model.accountNo ?? ""
)
verifyAccount.onNext(pennyTestRequest)
}
}

29
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/Wireframe/TotalManageAccountsWireframe.swift

@ -13,7 +13,6 @@ class TotalManageAccountsWireframe {
}
extension TotalManageAccountsWireframe: TotalManageAccountsWireframeInput {
var storyboardName: String {return "TotalManageAccounts"}
func getMainView() -> UIViewController {
@ -30,4 +29,32 @@ extension TotalManageAccountsWireframe: TotalManageAccountsWireframeInput {
view = viewController
return viewController
}
func openAddAutodebit(with model: KFTCModel?) {
AddAccountWireframe().openPushMainView(with: model, source: view)
}
func openAddInbound(with model: PenneyTestRequest?) {
AddInboundAccountWireframe().open(with: model, source: view)
}
func openVerify(with model: PenneyTestRequest) {
InboundPennyTestSubmitWireframe().open(with: model, on: view)
}
func openRefreshToken(header: [KftcHeader]?, url: String?) {
guard let viewcontroller = UIStoryboard(
name: "WKWebView",
bundle: nil
).instantiateViewController(withIdentifier: "WkWebViewController") as? WkWebViewController else {
return
}
viewcontroller.url = url?.components(separatedBy: .whitespaces).joined()
viewcontroller.headers = header
let navigationController = UINavigationController(rootViewController: viewcontroller)
view.present(navigationController, animated: true, completion: nil)
}
}

5
GME Remit/Modules/ManageAccountsModules/TotalManageAccounts/User Interface/Wireframe/TotalManageAccountsWireframeInput.swift

@ -9,5 +9,8 @@
import Foundation
protocol TotalManageAccountsWireframeInput: WireframeInput {
func openAddAutodebit(with model: KFTCModel?)
func openAddInbound(with model: PenneyTestRequest?)
func openVerify(with model: PenneyTestRequest)
func openRefreshToken(header: [KftcHeader]?, url: String?)
}

86
GME Remit/Modules/PowerCallModules/RechargeHistory/Application Logic/Service/RechargeHistoryService.swift

@ -15,92 +15,6 @@ class RechargeHistoryService: RechargeHistoryServiceType {
success: @escaping ([RechargeHistory]) -> Void,
failure: @escaping (Error) -> Void
) {
//FIXME: Test
let text =
"""
{
"ErrorCode": "0",
"Msg": "SUCCESS",
"Id": "",
"Extra": "",
"Extra2": "",
"Data": [
{
"Status": "W",
"PhoneNo": "01073412296",
"CardName": "SnowMan",
"ChargeType": "DATA CHARGE",
"ProductPrice": "16500",
"RequestTime": "2019-11-05 오전 9:48:04",
"ControllNo": "19110509480452040154"
},
{
"Status": "S",
"PhoneNo": "01073412296",
"CardName": "SnowMan",
"ChargeType": "DATA CHARGE",
"ProductPrice": "16500",
"RequestTime": "2019-11-05 오전 9:23:24",
"ControllNo": "19110509232455040154"
},
{
"Status": "F",
"PhoneNo": "01073412296",
"CardName": "SnowMan",
"ChargeType": "DATA CHARGE",
"ProductPrice": "16500",
"RequestTime": "2019-11-04 오후 6:09:21",
"ControllNo": "19110418091953340154"
},
{
"Status": "Wait",
"PhoneNo": "01073412296",
"CardName": "????",
"ChargeType": "DATA CHARGE",
"ProductPrice": "16500",
"RequestTime": "2019-11-04 오후 6:03:40",
"ControllNo": "19110418032491740154"
},
{
"Status": "W",
"PhoneNo": "01092161470",
"CardName": null,
"ChargeType": "MONTH CHARGE",
"ProductPrice": "39600",
"RequestTime": "2019-11-04 오후 5:19:11",
"ControllNo": "19110417191138040154"
},
{
"Status": "S",
"PhoneNo": "01073412296",
"CardName": null,
"ChargeType": "DATA CHARGE",
"ProductPrice": "16500",
"RequestTime": "2019-11-04 오후 4:19:58",
"ControllNo": "19110416195287040154"
},
{
"Status": "F",
"PhoneNo": "01073412296",
"CardName": null,
"ChargeType": "DATA CHARGE",
"ProductPrice": "16500",
"RequestTime": "2019-11-04 오후 4:02:10",
"ControllNo": "19110416020822340154"
}
]
}
"""
// guard
// let json = ResponseContainerArray<RechargeHistory>(JSONString: text),
// let data = json.data else {
// let error = NSError(domain: "TEST data error", code: 0, message: "Wrong Test Data")
// failure(error)
// return
// }
//
// success(data)
APIRouter.fetchRechargeHistory(from: from, to: to)
.json(success: success, failure: failure)
}

1
GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/Wireframe/TransactionHistoryWireframe.swift

@ -73,7 +73,6 @@ extension TransactionHistoryWireframe: TransactionHistoryWireframeInput {
}
func openInboundReceipt(with model: TransactionModel?) {
// TODO Link InboundReceipt
InboundReceiptWireframe().push(with: model, on: view)
}
}

21
GME Remit/Supported Files/Assets.xcassets/ic_delete2.imageset/Contents.json

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_delete2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
GME Remit/Supported Files/Assets.xcassets/ic_delete2.imageset/ic_delete2.png

After

Width: 16  |  Height: 16  |  Size: 243 B

21
GME Remit/Supported Files/Assets.xcassets/ic_delete3.imageset/Contents.json

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_delete3.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
GME Remit/Supported Files/Assets.xcassets/ic_delete3.imageset/ic_delete3.png

After

Width: 24  |  Height: 24  |  Size: 244 B

21
GME Remit/Supported Files/Assets.xcassets/ic_edit.imageset/Contents.json

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_edit.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
GME Remit/Supported Files/Assets.xcassets/ic_edit.imageset/ic_edit.png

After

Width: 16  |  Height: 16  |  Size: 347 B

21
GME Remit/Supported Files/Assets.xcassets/ic_minus.imageset/Contents.json

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_minus.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
GME Remit/Supported Files/Assets.xcassets/ic_minus.imageset/ic_minus.png

After

Width: 48  |  Height: 48  |  Size: 700 B

21
GME Remit/Supported Files/Assets.xcassets/ic_minus2.imageset/Contents.json

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_minus2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
GME Remit/Supported Files/Assets.xcassets/ic_minus2.imageset/ic_minus2.png

After

Width: 32  |  Height: 32  |  Size: 592 B

2
GME Remit/Utilities/TablePresenter/User Interface/View/TablePresenter.storyboard

@ -3,7 +3,7 @@
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>

Loading…
Cancel
Save