InKwon James Kim
5 years ago
155 changed files with 577 additions and 6145 deletions
-
BIN.DS_Store
-
1.gitignore
-
5.swiftlint.yml
-
574GME Remit.xcodeproj/project.pbxproj
-
1GME Remit/Extensions/UIColor+Ext.swift
-
2GME Remit/Extensions/UIImageView+Ext.swift
-
31GME Remit/Models/Request/PaymentModeRecipientViewModel.swift
-
2GME Remit/Models/Response/NativeCountry.swift
-
1GME Remit/Models/Response/ResendDetail.swift
-
1GME Remit/Models/Response/ResendListModel.swift
-
1GME Remit/Models/Response/SendMoneyProvinceViewModel.swift
-
1GME Remit/Models/Response/SendMoneyRelationViewModel.swift
-
1GME Remit/Models/Response/SendMoneyTransFerReasonViewModel.swift
-
4GME Remit/Modules/AutoDebitModules/AddAccount/User Interface/Wireframe/AddAccountWireframe.swift
-
3GME Remit/Modules/AutoDebitModules/AutoDebit/Application Logic/Interactor/AutoDebitInteractorIO.swift
-
2GME Remit/Modules/AutoDebitModules/AutoDebit/Application Logic/Service/AutoDebitServiceType.swift
-
1GME Remit/Modules/AutoDebitModules/AutoDebit/Module Interface/AutoDebitModuleInterface.swift
-
4GME Remit/Modules/AutoDebitModules/AutoDebit/User Interface/Presenter/AutoDebitPresenter.swift
-
1GME Remit/Modules/AutoDebitModules/AutoDebit/User Interface/Wireframe/AutoDebitWireframeInput.swift
-
2GME Remit/Modules/BiometricAuthModules/BiometricAuthentication/User Interface/Wireframe/BiometricAuthenticationWireframe.swift
-
2GME Remit/Modules/ExchangeRates/User Interface/Wireframe/ExchangeRatesWireframe.swift
-
1GME Remit/Modules/ForgotPassword/Application Logic/Service/ForgotPasswordServiceType.swift
-
30GME Remit/Modules/Home/User Interface/View/HomeViewController.swift
-
1GME Remit/Modules/Main/Application Logic/Interactor/MainInteractor.swift
-
1GME Remit/Modules/Main/Application Logic/Service/MainService.swift
-
4GME Remit/Modules/Main/Module Interface/MainModuleInterface.swift
-
2GME Remit/Modules/Main/User Interface/View/MainViewController.swift
-
5GME Remit/Modules/Main/User Interface/View/MainViewInterface.swift
-
1GME Remit/Modules/Main/User Interface/Wireframe/MainWireframeInput.swift
-
2GME Remit/Modules/RecipientModules/Recipients/Application Logic/Model/Recipient/Recipient.swift
-
20GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Recipients.storyboard
-
1GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/Wireframe/SetupRecipientWireframe.swift
-
31GME Remit/Modules/RegisterModules/KYC/kycForm1/User Interface/View/kycForm1ViewController.swift
-
14GME Remit/Modules/RegisterModules/KYC/kycForm1/User Interface/Wireframe/kycForm1Wireframe.swift
-
9GME Remit/Modules/RegisterModules/KYC/kycForm2/User Interface/Wireframe/kycForm2Wireframe.swift
-
6GME Remit/Modules/RegisterModules/KYC/kycForm3/User Interface/View/kycForm3ViewController.swift
-
48GME Remit/Modules/RegisterModules/KYC/kycForm3/User Interface/Wireframe/kycForm3Wireframe.swift
-
8GME Remit/Modules/RegisterModules/PennyTest/User Interface/View/PennyTestViewController.swift
-
13GME Remit/Modules/RegisterModules/PennyTestSubmit/Application Logic/Service/PennyTestSubmitServiceType.swift
-
54GME Remit/Modules/RegisterModules/Register/Application Logic/Service/RegisterServiceType.swift
-
2GME Remit/Modules/RegisterModules/Register/User Interface/Wireframe/RegisterWireframe.swift
-
1GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Model/DomesticRemitResponseModel.swift
-
2GME Remit/Modules/RemittanceModules/DomesticModules/RecentHistories/Module Interface/RecentHistoriesModuleInterface.swift
-
8GME Remit/Modules/RemittanceModules/DomesticModules/RecentHistories/User Interface/Wireframe/RecentHistoriesWireframe.swift
-
2GME Remit/Modules/RemittanceModules/DomesticModules/RecentHistories/User Interface/Wireframe/RecentHistoriesWireframeInputOutput.swift
-
31GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/Application Logic/Interactor/PaymentSelectionInteractor.swift
-
15GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/Application Logic/Interactor/PaymentSelectionInteractorIO.swift
-
19GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/Application Logic/Service/PaymentSelectionService.swift
-
13GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/Application Logic/Service/PaymentSelectionServiceType.swift
-
11GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/Module Interface/PaymentSelectionModuleInterface.swift
-
32GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/User Interface/Presenter/PaymentSelectionPresenter.swift
-
27GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/User Interface/View/Cells/PaymentSelectionTableViewCell.swift
-
194GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/User Interface/View/PaymentSelection.storyboard
-
95GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/User Interface/View/PaymentSelectionViewController.swift
-
10GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/User Interface/View/PaymentSelectionViewInterface.swift
-
43GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/User Interface/Wireframe/PaymentSelectionWireframe.swift
-
13GME Remit/Modules/RemittanceModules/OverseasModules/PaymentSelection/User Interface/Wireframe/PaymentSelectionWireframeInput.swift
-
46GME Remit/Modules/RemittanceModules/OverseasModules/Resend/Application Logic/Interactor/ResendInteractor.swift
-
16GME Remit/Modules/RemittanceModules/OverseasModules/Resend/Application Logic/Interactor/ResendInteractorIO.swift
-
18GME Remit/Modules/RemittanceModules/OverseasModules/Resend/Application Logic/Service/ResendService.swift
-
38GME Remit/Modules/RemittanceModules/OverseasModules/Resend/Application Logic/Service/ResendServiceType.swift
-
13GME Remit/Modules/RemittanceModules/OverseasModules/Resend/Module Interface/ResendModuleInterface.swift
-
71GME Remit/Modules/RemittanceModules/OverseasModules/Resend/User Interface/Presenter/ResendPresenter.swift
-
50GME Remit/Modules/RemittanceModules/OverseasModules/Resend/User Interface/View/Cell/ResendTableViewCell.swift
-
291GME Remit/Modules/RemittanceModules/OverseasModules/Resend/User Interface/View/Resend.storyboard
-
255GME Remit/Modules/RemittanceModules/OverseasModules/Resend/User Interface/View/ResendViewController.swift
-
15GME Remit/Modules/RemittanceModules/OverseasModules/Resend/User Interface/View/ResendViewInterface.swift
-
34GME Remit/Modules/RemittanceModules/OverseasModules/Resend/User Interface/Wireframe/ResendWireframe.swift
-
13GME Remit/Modules/RemittanceModules/OverseasModules/Resend/User Interface/Wireframe/ResendWireframeInput.swift
-
90GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/Application Logic/Interactor/ResendExchangeInteractor.swift
-
19GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/Application Logic/Interactor/ResendExchangeInteractorIO.swift
-
22GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/Application Logic/Service/ResendExchangeService.swift
-
37GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/Application Logic/Service/ResendExchangeServiceType.swift
-
15GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/Module Interface/ResendExchangeModuleInterface.swift
-
57GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/User Interface/Presenter/ResendExchangePresenter.swift
-
546GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/User Interface/View/ResendExchange.storyboard
-
453GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/User Interface/View/ResendExchangeViewController.swift
-
16GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/User Interface/View/ResendExchangeViewInterface.swift
-
41GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/User Interface/Wireframe/ResendExchangeWireframe.swift
-
13GME Remit/Modules/RemittanceModules/OverseasModules/ResendExchange/User Interface/Wireframe/ResendExchangeWireframeInput.swift
-
2GME Remit/Modules/RemittanceModules/OverseasModules/SelectCoupon/User Interface/Presenter/SelectCouponPresenter.swift
-
5GME Remit/Modules/RemittanceModules/OverseasModules/SelectCoupon/User Interface/View/Cell/CouponCell.swift
-
3GME Remit/Modules/RemittanceModules/OverseasModules/SelectCoupon/User Interface/View/SelectCouponViewController.swift
-
9GME Remit/Modules/RemittanceModules/OverseasModules/SelectCoupon/User Interface/Wireframe/SelectCouponWireframe.swift
-
60GME Remit/Modules/RemittanceModules/OverseasModules/SelectPayment/User Interface/Wireframe/SelectPaymentWireframe.swift
-
60GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyCode/Application Logic/Interactor/SendMoneyCodeInteractor.swift
-
1GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift
-
58GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyCode/Application Logic/Service/SendMoneyCodeServiceType.swift
-
7GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyCode/User Interface/Presenter/SendMoneyCodePresenter.swift
-
4GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyCode/User Interface/View/SendMoneyCode.storyboard
-
2GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyExchangeRate/Application Logic/Model/Coupon.swift
-
2GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyExchangeRate/Application Logic/Service/SendMoneyExchangeRateServiceType.swift
-
16GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyExchangeRate/Module Interface/SendMoneyExchangeRateModuleInterface.swift
-
2GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/Presenter/SendMoneyParentPresenter.swift
-
5GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/View/SendMoneyParentViewController.swift
-
1GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/View/ViewModels/SenMoneyPaymentModeRecipientViewModel.swift
-
53GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/Wireframe/SendMoneyParentWireframe.swift
-
59GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyPaymentMode/Application Logic/Interactor/SendMoneyPaymentModeInteractor.swift
-
20GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyPaymentMode/Application Logic/Interactor/SendMoneyPaymentModeInteractorIO.swift
-
18GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyPaymentMode/Application Logic/Service/SendMoneyPaymentModeService.swift
@ -0,0 +1,31 @@ |
|||
// |
|||
// SendMoneyRecipientViewModel.swift |
|||
// GMERemittance |
|||
// |
|||
// Created by gme_2 on 28/08/2018. |
|||
// Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class SendMoneyRecipientViewModel { |
|||
var id: String? |
|||
var firstName: String? |
|||
var middleName: String? |
|||
var lastName: String? |
|||
var country: String? |
|||
var state: String? |
|||
var stateId: String? |
|||
var city: String? |
|||
var address: String? |
|||
var district: String? |
|||
var districtId: String? |
|||
var relation: String? |
|||
var relationId: String? |
|||
var mobileNumber: String? |
|||
var email: String? |
|||
var recipientId: String? |
|||
var reason: String? |
|||
var reasonId: String? |
|||
var countryId: String? |
|||
} |
@ -1,31 +0,0 @@ |
|||
// |
|||
// PaymentSelectionInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class PaymentSelectionInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: PaymentSelectionInteractorOutput? |
|||
private let service: PaymentSelectionServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: PaymentSelectionServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: PaymentSelection interactor input interface |
|||
|
|||
extension PaymentSelectionInteractor: PaymentSelectionInteractorInput { |
|||
|
|||
} |
@ -1,15 +0,0 @@ |
|||
// |
|||
// PaymentSelectionInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol PaymentSelectionInteractorInput: class { |
|||
|
|||
} |
|||
|
|||
protocol PaymentSelectionInteractorOutput: class { |
|||
|
|||
} |
@ -1,19 +0,0 @@ |
|||
// |
|||
// PaymentSelectionService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class PaymentSelectionService: PaymentSelectionServiceType { |
|||
|
|||
// MARK: Properties |
|||
|
|||
// MARK: Initialization |
|||
|
|||
// MARK: Data management |
|||
} |
|||
|
@ -1,13 +0,0 @@ |
|||
// |
|||
// PaymentSelectionServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol PaymentSelectionServiceType: class { |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
// |
|||
// PaymentSelectionModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol PaymentSelectionModuleInterface: class { |
|||
|
|||
} |
@ -1,32 +0,0 @@ |
|||
// |
|||
// PaymentSelectionPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class PaymentSelectionPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: PaymentSelectionViewInterface? |
|||
var interactor: PaymentSelectionInteractorInput? |
|||
var wireframe: PaymentSelectionWireframeInput? |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: PaymentSelection module interface |
|||
|
|||
extension PaymentSelectionPresenter: PaymentSelectionModuleInterface { |
|||
|
|||
} |
|||
|
|||
// MARK: PaymentSelection interactor output interface |
|||
|
|||
extension PaymentSelectionPresenter: PaymentSelectionInteractorOutput { |
|||
|
|||
} |
@ -1,27 +0,0 @@ |
|||
// |
|||
// PaymentSelectionTableViewCell.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class PaymentSelectionTableViewCell: UITableViewCell { |
|||
|
|||
@IBOutlet weak var titlelabel: UILabel! |
|||
@IBOutlet weak var accountLabel: UILabel! |
|||
|
|||
var acunt: Account? |
|||
|
|||
override func awakeFromNib() { |
|||
super.awakeFromNib() |
|||
// Initialization code |
|||
} |
|||
|
|||
func setup() { |
|||
titlelabel.text = acunt?.bankName |
|||
accountLabel.text = acunt?.accountNumMasked |
|||
} |
|||
} |
@ -1,194 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
<device id="retina4_7" orientation="portrait"> |
|||
<adaptation id="fullscreen"/> |
|||
</device> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Semibold.otf"> |
|||
<string>SanFranciscoDisplay-Semibold</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--PaymentSelection--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="PaymentSelectionViewController" title="PaymentSelection" modalTransitionStyle="crossDissolve" modalPresentationStyle="overFullScreen" id="HSb-ou-7T5" customClass="PaymentSelectionViewController" customModule="GME_Remit" customModuleProvider="target" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EZ8-nK-JSF" userLabel="TransparentView"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<subviews> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FRs-VK-sJB" userLabel="mainView"> |
|||
<rect key="frame" x="20" y="180" width="335" height="467"/> |
|||
<subviews> |
|||
<tableView opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="atI-We-kZt"> |
|||
<rect key="frame" x="0.0" y="0.0" width="335" height="403"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<view key="tableFooterView" contentMode="scaleToFill" id="Ne9-9p-cHS"> |
|||
<rect key="frame" x="0.0" y="108" width="335" height="44"/> |
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</view> |
|||
<prototypes> |
|||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="PaymentSelectionTableViewCell" rowHeight="80" id="34o-kc-rwZ" customClass="PaymentSelectionTableViewCell" customModule="GME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="0.0" y="28" width="335" height="80"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="34o-kc-rwZ" id="JvE-dP-tuR"> |
|||
<rect key="frame" x="0.0" y="0.0" width="335" height="80"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gLK-dh-JSU"> |
|||
<rect key="frame" x="0.0" y="0.0" width="335" height="80"/> |
|||
<subviews> |
|||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tQy-x7-NXV"> |
|||
<rect key="frame" x="20" y="20" width="40" height="40"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="40" id="D8X-WM-woC"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="17"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="n1C-Wg-wgf"> |
|||
<rect key="frame" x="80" y="20" width="245" height="41"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bla Bla Account" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Q4-aQ-m9Z"> |
|||
<rect key="frame" x="0.0" y="0.0" width="245" height="18.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="17"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bla Bla Account" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FMg-Nt-IHZ"> |
|||
<rect key="frame" x="0.0" y="23.5" width="245" height="17.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="17"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="8Q4-aQ-m9Z" firstAttribute="width" secondItem="FMg-Nt-IHZ" secondAttribute="width" id="F3l-E3-y1I"/> |
|||
</constraints> |
|||
</stackView> |
|||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_add" translatesAutoresizingMaskIntoConstraints="NO" id="idZ-Fs-idm"> |
|||
<rect key="frame" x="20" y="20" width="40" height="40"/> |
|||
</imageView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="n1C-Wg-wgf" secondAttribute="bottom" constant="19" id="00T-wz-3hc"/> |
|||
<constraint firstItem="n1C-Wg-wgf" firstAttribute="top" secondItem="gLK-dh-JSU" secondAttribute="top" constant="20" id="50J-Bi-7FX"/> |
|||
<constraint firstItem="tQy-x7-NXV" firstAttribute="centerY" secondItem="gLK-dh-JSU" secondAttribute="centerY" id="8Rw-u8-Ztd"/> |
|||
<constraint firstItem="idZ-Fs-idm" firstAttribute="centerX" secondItem="tQy-x7-NXV" secondAttribute="centerX" id="8t0-mx-QQA"/> |
|||
<constraint firstAttribute="trailing" secondItem="n1C-Wg-wgf" secondAttribute="trailing" constant="10" id="Dh1-CK-yTo"/> |
|||
<constraint firstAttribute="height" constant="80" id="Kn0-XH-Rg1"/> |
|||
<constraint firstItem="n1C-Wg-wgf" firstAttribute="leading" secondItem="tQy-x7-NXV" secondAttribute="trailing" constant="20" id="RQE-gg-6RX"/> |
|||
<constraint firstItem="idZ-Fs-idm" firstAttribute="centerY" secondItem="tQy-x7-NXV" secondAttribute="centerY" id="VAq-u6-69Z"/> |
|||
<constraint firstItem="idZ-Fs-idm" firstAttribute="width" secondItem="tQy-x7-NXV" secondAttribute="width" id="Zxj-w7-e0h"/> |
|||
<constraint firstItem="tQy-x7-NXV" firstAttribute="top" secondItem="gLK-dh-JSU" secondAttribute="top" constant="20" id="cv4-gT-itG"/> |
|||
<constraint firstItem="tQy-x7-NXV" firstAttribute="leading" secondItem="gLK-dh-JSU" secondAttribute="leading" constant="20" id="dy8-uf-JCG"/> |
|||
<constraint firstItem="idZ-Fs-idm" firstAttribute="height" secondItem="tQy-x7-NXV" secondAttribute="height" id="mmP-Ml-6Yp"/> |
|||
<constraint firstAttribute="bottom" secondItem="tQy-x7-NXV" secondAttribute="bottom" constant="20" id="qu1-N4-RYz"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="gLK-dh-JSU" firstAttribute="leading" secondItem="JvE-dP-tuR" secondAttribute="leading" id="4Ad-t1-OnT"/> |
|||
<constraint firstAttribute="bottom" secondItem="gLK-dh-JSU" secondAttribute="bottom" id="NI4-mD-7cg"/> |
|||
<constraint firstItem="gLK-dh-JSU" firstAttribute="top" secondItem="JvE-dP-tuR" secondAttribute="top" id="NsI-rl-1qT"/> |
|||
<constraint firstAttribute="trailing" secondItem="gLK-dh-JSU" secondAttribute="trailing" id="dNE-MH-xpV"/> |
|||
</constraints> |
|||
</tableViewCellContentView> |
|||
<connections> |
|||
<outlet property="accountLabel" destination="FMg-Nt-IHZ" id="1Xk-Xg-cvx"/> |
|||
<outlet property="titlelabel" destination="8Q4-aQ-m9Z" id="L9E-Lx-2BR"/> |
|||
</connections> |
|||
</tableViewCell> |
|||
</prototypes> |
|||
</tableView> |
|||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oHg-90-q29"> |
|||
<rect key="frame" x="10" y="413" width="315" height="44"/> |
|||
<color key="backgroundColor" red="0.92941176469999998" green="0.1058823529" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="44" id="LbW-pW-Xzt"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="16"/> |
|||
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<state key="normal" title="Close"> |
|||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</state> |
|||
<connections> |
|||
<action selector="close:" destination="HSb-ou-7T5" eventType="touchUpInside" id="hS6-FK-3s0"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="atI-We-kZt" firstAttribute="top" secondItem="FRs-VK-sJB" secondAttribute="top" id="GBI-6W-QHq"/> |
|||
<constraint firstAttribute="trailing" secondItem="atI-We-kZt" secondAttribute="trailing" id="ZHz-Tx-zK3"/> |
|||
<constraint firstAttribute="bottom" secondItem="oHg-90-q29" secondAttribute="bottom" constant="10" id="aBc-P5-2vy"/> |
|||
<constraint firstItem="atI-We-kZt" firstAttribute="leading" secondItem="FRs-VK-sJB" secondAttribute="leading" id="blE-ru-A2d"/> |
|||
<constraint firstAttribute="trailing" secondItem="oHg-90-q29" secondAttribute="trailing" constant="10" id="g5i-hQ-AJ2"/> |
|||
<constraint firstItem="oHg-90-q29" firstAttribute="leading" secondItem="FRs-VK-sJB" secondAttribute="leading" constant="10" id="mrL-nA-SFz"/> |
|||
<constraint firstItem="oHg-90-q29" firstAttribute="top" secondItem="atI-We-kZt" secondAttribute="bottom" constant="10" id="peO-e7-wjT"/> |
|||
</constraints> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|||
<integer key="value" value="10"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.39984384048356159" colorSpace="custom" customColorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstItem="FRs-VK-sJB" firstAttribute="height" secondItem="EZ8-nK-JSF" secondAttribute="height" multiplier="0.7:1" id="91P-L7-2Kp"/> |
|||
<constraint firstAttribute="bottom" secondItem="FRs-VK-sJB" secondAttribute="bottom" constant="20" id="Ihw-O4-qdW"/> |
|||
<constraint firstItem="FRs-VK-sJB" firstAttribute="top" secondItem="EZ8-nK-JSF" secondAttribute="top" constant="60" id="XeD-Y9-CaM"/> |
|||
<constraint firstItem="FRs-VK-sJB" firstAttribute="leading" secondItem="EZ8-nK-JSF" secondAttribute="leading" constant="20" id="bbZ-co-k4c"/> |
|||
<constraint firstAttribute="trailing" secondItem="FRs-VK-sJB" secondAttribute="trailing" constant="20" id="viJ-Pe-vR8"/> |
|||
<constraint firstAttribute="bottom" secondItem="FRs-VK-sJB" secondAttribute="bottom" constant="40" id="zSe-LA-nBA"/> |
|||
</constraints> |
|||
<variation key="default"> |
|||
<mask key="constraints"> |
|||
<exclude reference="XeD-Y9-CaM"/> |
|||
<exclude reference="zSe-LA-nBA"/> |
|||
</mask> |
|||
</variation> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="EZ8-nK-JSF" secondAttribute="bottom" id="8ed-sq-lEa"/> |
|||
<constraint firstItem="efA-aX-q5R" firstAttribute="trailing" secondItem="EZ8-nK-JSF" secondAttribute="trailing" id="D6O-ru-gXz"/> |
|||
<constraint firstItem="EZ8-nK-JSF" firstAttribute="top" secondItem="9Uc-9s-KgO" secondAttribute="top" id="hBz-do-YP8"/> |
|||
<constraint firstItem="EZ8-nK-JSF" firstAttribute="leading" secondItem="efA-aX-q5R" secondAttribute="leading" id="v7m-l0-m31"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="efA-aX-q5R"/> |
|||
</view> |
|||
<connections> |
|||
<outlet property="closeButton" destination="oHg-90-q29" id="9sk-Cp-zlL"/> |
|||
<outlet property="mainView" destination="FRs-VK-sJB" id="E53-FG-gps"/> |
|||
<outlet property="tableView" destination="atI-We-kZt" id="ndU-BN-ohp"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="-279.19999999999999" y="123.68815592203899"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="ic_add" width="63" height="63"/> |
|||
</resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
@ -1,95 +0,0 @@ |
|||
// |
|||
// PaymentSelectionViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class PaymentSelectionViewController: UIViewController { |
|||
|
|||
struct StringConstants { |
|||
// Todo ccr |
|||
let closeText = "penny_test_close_text".localized() |
|||
} |
|||
|
|||
// MARK: IBOutlets |
|||
@IBOutlet weak var mainView: UIView! |
|||
@IBOutlet weak var closeButton: UIButton! |
|||
|
|||
// MARK: Properties |
|||
var accounts: [Account]? |
|||
var onSelection: ((Account) -> Void)? |
|||
|
|||
@IBOutlet weak var tableView: UITableView! |
|||
var presenter: PaymentSelectionModuleInterface? |
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
self.setup() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
mainView.bottomToOrigin() |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
@IBAction func close(_ sender: Any) { |
|||
mainView.originToBottom() { |
|||
self.dismiss(animated: true, completion: nil) |
|||
} |
|||
} |
|||
// MARK: Other Functions |
|||
|
|||
private func setup() { |
|||
// all setup should be done here |
|||
self.mainView.layer.cornerRadius = 5 |
|||
self.mainView.clipsToBounds = true |
|||
self.tableView.dataSource = self |
|||
self.tableView.delegate = self |
|||
self.tableView.reloadData() |
|||
configureText() |
|||
mainView.layer.cornerRadius = 5 |
|||
closeButton.layer.cornerRadius = 5 |
|||
} |
|||
|
|||
private func configureText() { |
|||
self.closeButton.setTitle(StringConstants().closeText, for: UIControl.State.normal) |
|||
} |
|||
} |
|||
|
|||
// MARK: PaymentSelectionViewInterface |
|||
extension PaymentSelectionViewController: PaymentSelectionViewInterface { |
|||
|
|||
} |
|||
|
|||
extension PaymentSelectionViewController: UITableViewDelegate { |
|||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
|||
if self.accounts?.elementAt(index: indexPath.row) != nil { |
|||
mainView.originToBottom() { |
|||
self.dismiss(animated: true, completion: nil) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
extension PaymentSelectionViewController: UITableViewDataSource { |
|||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
|||
return self.accounts?.count ?? 0 |
|||
} |
|||
|
|||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
|||
guard let model = tableView.dequeueReusableCell(withIdentifier: "PaymentSelectionTableViewCell") as? PaymentSelectionTableViewCell else { |
|||
return UITableViewCell() |
|||
} |
|||
|
|||
model.acunt = accounts?.elementAt(index: indexPath.row) |
|||
model.setup() |
|||
return model |
|||
} |
|||
} |
@ -1,10 +0,0 @@ |
|||
// |
|||
// PaymentSelectionViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol PaymentSelectionViewInterface: class { |
|||
} |
@ -1,43 +0,0 @@ |
|||
// |
|||
// PaymentSelectionWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class PaymentSelectionWireframe { |
|||
weak var view: UIViewController! |
|||
var accounts: [Account]? |
|||
var onSeelction: ((Account) -> ())? |
|||
} |
|||
|
|||
extension PaymentSelectionWireframe: PaymentSelectionWireframeInput { |
|||
|
|||
var storyboardName: String {return "PaymentSelection"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = PaymentSelectionService() |
|||
let interactor = PaymentSelectionInteractor(service: service) |
|||
let presenter = PaymentSelectionPresenter() |
|||
let viewController = viewControllerFromStoryboard(of: PaymentSelectionViewController.self) |
|||
viewController.accounts = self.accounts |
|||
viewController.onSelection = self.onSeelction |
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
self.view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func openPaymentSelection(accounts: [Account], onSelection: @escaping (Account) -> (), source: UIViewController) { |
|||
self.accounts = accounts |
|||
self.onSeelction = onSelection |
|||
self.openMainView(source: source) |
|||
} |
|||
} |
@ -1,13 +0,0 @@ |
|||
// |
|||
// PaymentSelectionWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 07/01/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol PaymentSelectionWireframeInput: WireframeInput { |
|||
|
|||
} |
@ -1,46 +0,0 @@ |
|||
// |
|||
// ResendInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class ResendInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: ResendInteractorOutput? |
|||
private let service: ResendServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: ResendServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: Resend interactor input interface |
|||
|
|||
extension ResendInteractor: ResendInteractorInput { |
|||
func fetchList(fromDate: String?, toDate: String?) { |
|||
let userName = Utility.getMyUserName() |
|||
var param: [String: String] = [:] |
|||
if let fromDate = fromDate { |
|||
param["FromDate"] = fromDate |
|||
} |
|||
if let toDate = toDate { |
|||
param["ToDate"] = toDate |
|||
} |
|||
self.service.fetchResendService(user: userName, param: param, success: { (model) in |
|||
guard let model = model else {return} |
|||
self.output?.show(model: model) |
|||
}) { (error) in |
|||
self.output?.show(error: error) |
|||
} |
|||
} |
|||
} |
@ -1,16 +0,0 @@ |
|||
// |
|||
// ResendInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol ResendInteractorInput: class { |
|||
func fetchList(fromDate: String?, toDate: String?) |
|||
} |
|||
|
|||
protocol ResendInteractorOutput: class { |
|||
func show(model: ResendListModel) |
|||
func show(error: Error) |
|||
} |
@ -1,18 +0,0 @@ |
|||
// |
|||
// ResendService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class ResendService: ResendServiceType { |
|||
|
|||
// MARK: Properties |
|||
|
|||
// MARK: Initialization |
|||
|
|||
// MARK: Data management |
|||
} |
@ -1,38 +0,0 @@ |
|||
// |
|||
// ResendServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import Alamofire |
|||
|
|||
protocol ResendServiceType: class , FetchResendService { |
|||
|
|||
} |
|||
|
|||
|
|||
protocol FetchResendService: ApiServiceType { |
|||
func fetchResendService(user: String, param: [String: String]?, success: @escaping ((ResendListModel?) -> ()), failure: @escaping ((Error) -> ())) |
|||
} |
|||
|
|||
extension FetchResendService { |
|||
func fetchResendService(user: String, param: [String: String]?, success: @escaping ((ResendListModel?) -> ()), failure: @escaping ((Error) -> ())) { |
|||
let url = baseUrl + "/resend/list" |
|||
self.auth.request(method: .post, url: url, params: param, success: { (response: ResendListModelContainer) in |
|||
if (response.errorCode ?? "") == "1" { |
|||
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) |
|||
failure(error) |
|||
}else { |
|||
let model = response.data |
|||
success(model) |
|||
} |
|||
|
|||
}) { (error) in |
|||
failure(error) |
|||
} |
|||
} |
|||
} |
|||
|
@ -1,13 +0,0 @@ |
|||
// |
|||
// ResendModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol ResendModuleInterface: class { |
|||
func viewIsReady() |
|||
func fetchList(fromDate: String, toDate: String) |
|||
func filter(searchText: String) |
|||
} |
@ -1,71 +0,0 @@ |
|||
// |
|||
// ResendPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class ResendPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
var transactions: [ResendTransactionModel] = [] |
|||
|
|||
var filteredTransaction: [ResendTransactionModel] = [] |
|||
|
|||
weak var view: ResendViewInterface? |
|||
var interactor: ResendInteractorInput? |
|||
var wireframe: ResendWireframeInput? |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: Resend module interface |
|||
|
|||
extension ResendPresenter: ResendModuleInterface { |
|||
|
|||
func fetchList(fromDate: String, toDate: String) { |
|||
self.interactor?.fetchList(fromDate: fromDate, toDate: toDate) |
|||
} |
|||
|
|||
func viewIsReady() { |
|||
self.view?.showLoading() |
|||
self.interactor?.fetchList(fromDate: nil, toDate: nil) |
|||
} |
|||
|
|||
func filter(searchText: String) { |
|||
if searchText.isEmpty { |
|||
self.filteredTransaction = self.transactions |
|||
return |
|||
} |
|||
self.filteredTransaction = self.transactions.filter({ |
|||
return ($0.controlNumber ?? "").lowercased().contains(searchText) || ($0.bankName ?? "").lowercased().contains(searchText) || ($0.recieverName ?? "").lowercased().contains(searchText) |
|||
}).sorted(by: { (model, _) in |
|||
return (model.controlNumber ?? "").lowercased().hasPrefix(searchText) || (model.recieverName ?? "").lowercased().hasPrefix(searchText) || (model.bankName ?? "").lowercased().hasPrefix(searchText) |
|||
}) |
|||
self.view?.show(models: filteredTransaction) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
// MARK: Resend interactor output interface |
|||
|
|||
extension ResendPresenter: ResendInteractorOutput { |
|||
func show(error: Error) { |
|||
self.view?.hideLoading() |
|||
self.view?.hideLoading() |
|||
} |
|||
|
|||
func show(model: ResendListModel) { |
|||
self.view?.hideLoading() |
|||
self.transactions = model.transactions ?? [] |
|||
self.view?.show(model: model) |
|||
} |
|||
} |
@ -1,50 +0,0 @@ |
|||
// |
|||
// ResendTableViewCell.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 19/03/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class ResendTableViewCell: UITableViewCell { |
|||
|
|||
enum Status: String { |
|||
case paid |
|||
case unpaid |
|||
} |
|||
|
|||
@IBOutlet weak var bgView: UIView! |
|||
@IBOutlet weak var dateLabel: UILabel! |
|||
@IBOutlet weak var amountLabel: UILabel! |
|||
@IBOutlet weak var paymentMethodLabel: UILabel! |
|||
@IBOutlet weak var nameLabel: UILabel! |
|||
@IBOutlet weak var transactionNumberLabel: UILabel! |
|||
@IBOutlet weak var controlNumberLabel: UILabel! |
|||
@IBOutlet weak var bankDetailLabel: UILabel! |
|||
|
|||
var model: ResendTransactionModel? |
|||
|
|||
override func awakeFromNib() { |
|||
super.awakeFromNib() |
|||
// Initialization code |
|||
} |
|||
|
|||
func setup() { |
|||
self.dateLabel.text = model?.sendDate |
|||
self.amountLabel.text = (model?.pAmt ?? "") + " " + (model?.pCurrency ?? "") |
|||
self.paymentMethodLabel.text = model?.payOutMode |
|||
self.nameLabel.text = model?.recieverName |
|||
let paystatus = model?.payStatus ?? "" |
|||
self.transactionNumberLabel.text = paystatus.uppercased() // show pay status, paid or unpaid |
|||
self.transactionNumberLabel.textColor = .white |
|||
self.transactionNumberLabel.layer.cornerRadius = 5 |
|||
self.controlNumberLabel.text = self.model?.controlNumber |
|||
let status = Status.init(rawValue: paystatus.lowercased()) ?? .unpaid |
|||
self.transactionNumberLabel.backgroundColor = status == .paid ? .themeBlue : .themeRed |
|||
self.bankDetailLabel.text = model?.bankName |
|||
|
|||
amountLabel.textColor = .themeRed |
|||
} |
|||
} |
@ -1,291 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
|||
<device id="retina4_7" orientation="portrait"> |
|||
<adaptation id="fullscreen"/> |
|||
</device> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="SanFranciscoDisplay-Medium.otf"> |
|||
<string>SanFranciscoDisplay-Medium</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Semibold.otf"> |
|||
<string>SanFranciscoDisplay-Semibold</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--Resend View Controller--> |
|||
<scene sceneID="esg-O8-5fQ"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="ResendViewController" id="ini-e3-PH4" customClass="ResendViewController" customModule="GME_Remit" customModuleProvider="target" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="dvf-dP-nbX"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BQR-ag-XpK"> |
|||
<rect key="frame" x="0.0" y="20" width="375" height="647"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kqy-UM-ppa"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/> |
|||
<subviews> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Search with Control No..." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DUl-wm-L0p"> |
|||
<rect key="frame" x="15" y="7.5" width="311" height="35"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="35" id="ZU1-jY-pl7"/> |
|||
</constraints> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</textField> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rNr-vr-KE8"> |
|||
<rect key="frame" x="341" y="14" width="24" height="22"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="24" id="WSp-vk-uxX"/> |
|||
<constraint firstAttribute="height" constant="22" id="WU5-kc-EnC"/> |
|||
</constraints> |
|||
<state key="normal" image="ic_calender"/> |
|||
<connections> |
|||
<action selector="openSearchFilter:" destination="ini-e3-PH4" eventType="touchUpInside" id="ci9-TE-5eM"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.97647058819999999" green="0.97647058819999999" blue="0.97647058819999999" alpha="1" colorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstItem="DUl-wm-L0p" firstAttribute="leading" secondItem="Kqy-UM-ppa" secondAttribute="leading" constant="15" id="2VX-To-lrq"/> |
|||
<constraint firstItem="rNr-vr-KE8" firstAttribute="leading" secondItem="DUl-wm-L0p" secondAttribute="trailing" constant="15" id="4Gf-H4-L0R"/> |
|||
<constraint firstItem="rNr-vr-KE8" firstAttribute="centerY" secondItem="Kqy-UM-ppa" secondAttribute="centerY" id="IHF-Xl-G93"/> |
|||
<constraint firstItem="DUl-wm-L0p" firstAttribute="centerY" secondItem="Kqy-UM-ppa" secondAttribute="centerY" id="cea-VS-XmO"/> |
|||
<constraint firstAttribute="height" constant="50" id="jcV-RK-Oih"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="39p-cv-uyM"> |
|||
<rect key="frame" x="0.0" y="48" width="375" height="599"/> |
|||
<subviews> |
|||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No Transaction Found" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ujq-FS-I1H"> |
|||
<rect key="frame" x="122" y="277.5" width="131" height="44"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="44" id="lDS-eC-vrU"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="0.70315250880000002" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="s07-ms-I7n"> |
|||
<rect key="frame" x="10" y="55" width="355" height="544"/> |
|||
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/> |
|||
<prototypes> |
|||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="ResendTableViewCell" rowHeight="120" id="IDR-UG-A5a" customClass="ResendTableViewCell" customModule="GME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="0.0" y="28" width="355" height="120"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="IDR-UG-A5a" id="2ii-qB-Cru"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="120"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="n76-t2-wdT"> |
|||
<rect key="frame" x="5" y="5" width="345" height="110"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="8Ky-ya-IdP"> |
|||
<rect key="frame" x="15" y="10" width="315" height="66.5"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xkq-N0-ok7"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="14.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Tue, 19/12/2017" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ik8-JU-GZk"> |
|||
<rect key="frame" x="0.0" y="0.0" width="157.5" height="14.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Amount" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hiE-Xo-tO7"> |
|||
<rect key="frame" x="157.5" y="0.0" width="157.5" height="14.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3kc-yR-MOT"> |
|||
<rect key="frame" x="0.0" y="14.5" width="315" height="36"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="200" verticalCompressionResistancePriority="700" text="To: Dhan Singh Saud To: Dhan Singh Saud" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kNZ-hY-07f"> |
|||
<rect key="frame" x="0.0" y="0.0" width="157.5" height="36"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="30" id="sF3-gW-FNy"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="255" verticalHuggingPriority="251" horizontalCompressionResistancePriority="755" text="-1,000,000" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bim-W1-ROr"> |
|||
<rect key="frame" x="157.5" y="0.0" width="157.5" height="36"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="18"/> |
|||
<color key="textColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3yv-W2-6iD"> |
|||
<rect key="frame" x="0.0" y="50.5" width="315" height="16"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Cash Payment" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pnu-bl-6Sw"> |
|||
<rect key="frame" x="0.0" y="0.0" width="263" height="16"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Unpaid" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bZU-Fy-Wgb"> |
|||
<rect key="frame" x="263" y="0.0" width="52" height="16"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="52" id="WcK-vF-K6m"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="13"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="InP-8f-D97" userLabel="bank"> |
|||
<rect key="frame" x="15" y="83" width="315" height="17"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="GLOBAL BANK PRIAATE LIMITED KATHMANDU" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="brQ-QI-mse"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="17"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.84999999999999998" colorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstItem="InP-8f-D97" firstAttribute="trailing" secondItem="8Ky-ya-IdP" secondAttribute="trailing" id="1bc-0H-tfx"/> |
|||
<constraint firstItem="8Ky-ya-IdP" firstAttribute="top" secondItem="n76-t2-wdT" secondAttribute="top" constant="10" id="9N3-iG-Jjf"/> |
|||
<constraint firstAttribute="trailing" secondItem="8Ky-ya-IdP" secondAttribute="trailing" constant="15" id="HDg-OC-tbl"/> |
|||
<constraint firstItem="InP-8f-D97" firstAttribute="top" secondItem="8Ky-ya-IdP" secondAttribute="bottom" constant="6.5" id="rRZ-3V-Yr9"/> |
|||
<constraint firstItem="8Ky-ya-IdP" firstAttribute="leading" secondItem="n76-t2-wdT" secondAttribute="leading" constant="15" id="rzO-r4-kwb"/> |
|||
<constraint firstItem="InP-8f-D97" firstAttribute="leading" secondItem="8Ky-ya-IdP" secondAttribute="leading" id="xmZ-hR-flv"/> |
|||
<constraint firstAttribute="bottom" secondItem="InP-8f-D97" secondAttribute="bottom" constant="10" id="za4-Ft-OMR"/> |
|||
</constraints> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|||
<integer key="value" value="10"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="n76-t2-wdT" secondAttribute="trailing" constant="5" id="RQJ-Di-USc"/> |
|||
<constraint firstItem="n76-t2-wdT" firstAttribute="leading" secondItem="2ii-qB-Cru" secondAttribute="leading" constant="5" id="iiU-qz-ZjR"/> |
|||
<constraint firstItem="n76-t2-wdT" firstAttribute="top" secondItem="2ii-qB-Cru" secondAttribute="top" constant="5" id="kjN-HZ-zqN"/> |
|||
<constraint firstAttribute="bottom" secondItem="n76-t2-wdT" secondAttribute="bottom" constant="5" id="tdh-kN-YwZ"/> |
|||
</constraints> |
|||
</tableViewCellContentView> |
|||
<connections> |
|||
<outlet property="amountLabel" destination="Bim-W1-ROr" id="i0u-03-gkG"/> |
|||
<outlet property="bankDetailLabel" destination="brQ-QI-mse" id="7RU-BP-WF8"/> |
|||
<outlet property="bgView" destination="n76-t2-wdT" id="1Oa-Y0-Ijr"/> |
|||
<outlet property="controlNumberLabel" destination="hiE-Xo-tO7" id="Xxe-gc-Khr"/> |
|||
<outlet property="dateLabel" destination="Ik8-JU-GZk" id="gH1-LL-Dd1"/> |
|||
<outlet property="nameLabel" destination="kNZ-hY-07f" id="Apv-hN-G3z"/> |
|||
<outlet property="paymentMethodLabel" destination="pnu-bl-6Sw" id="oeG-wi-hDw"/> |
|||
<outlet property="transactionNumberLabel" destination="bZU-Fy-Wgb" id="te7-JB-C8j"/> |
|||
</connections> |
|||
</tableViewCell> |
|||
</prototypes> |
|||
</tableView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="v7J-ZH-GHp"> |
|||
<rect key="frame" x="10" y="10" width="355" height="35"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDh-dH-fw4"> |
|||
<rect key="frame" x="0.0" y="0.0" width="170" height="35"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b2R-UN-TUl"> |
|||
<rect key="frame" x="175" y="0.0" width="5.5" height="35"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="5.5" id="jgo-Hd-56n"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<nil key="textColor"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uLQ-0q-P97"> |
|||
<rect key="frame" x="185.5" y="0.0" width="169.5" height="35"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="mDh-dH-fw4" firstAttribute="width" secondItem="uLQ-0q-P97" secondAttribute="width" id="EtE-2N-T5i"/> |
|||
<constraint firstAttribute="height" constant="35" id="eOh-zH-x3P"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstItem="s07-ms-I7n" firstAttribute="leading" secondItem="39p-cv-uyM" secondAttribute="leading" constant="10" id="0wn-Vo-dZK"/> |
|||
<constraint firstItem="s07-ms-I7n" firstAttribute="top" secondItem="v7J-ZH-GHp" secondAttribute="bottom" constant="10" id="ANh-9w-DOY"/> |
|||
<constraint firstItem="Ujq-FS-I1H" firstAttribute="centerY" secondItem="39p-cv-uyM" secondAttribute="centerY" id="LeD-fH-Lyq"/> |
|||
<constraint firstItem="v7J-ZH-GHp" firstAttribute="trailing" secondItem="s07-ms-I7n" secondAttribute="trailing" id="dBc-Iq-t4O"/> |
|||
<constraint firstItem="v7J-ZH-GHp" firstAttribute="leading" secondItem="s07-ms-I7n" secondAttribute="leading" id="dVs-eD-2gc"/> |
|||
<constraint firstItem="Ujq-FS-I1H" firstAttribute="centerX" secondItem="39p-cv-uyM" secondAttribute="centerX" id="jw6-m8-Nbu"/> |
|||
<constraint firstAttribute="trailing" secondItem="s07-ms-I7n" secondAttribute="trailing" constant="10" id="oyJ-mB-sel"/> |
|||
<constraint firstAttribute="bottom" secondItem="s07-ms-I7n" secondAttribute="bottom" id="q8g-38-hD1"/> |
|||
<constraint firstItem="v7J-ZH-GHp" firstAttribute="top" secondItem="39p-cv-uyM" secondAttribute="top" constant="10" id="vi5-3J-wx4"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="rNr-vr-KE8" firstAttribute="trailing" secondItem="s07-ms-I7n" secondAttribute="trailing" id="FZW-fs-p3W"/> |
|||
<constraint firstItem="39p-cv-uyM" firstAttribute="leading" secondItem="BQR-ag-XpK" secondAttribute="leading" id="WL3-sn-Dxd"/> |
|||
<constraint firstAttribute="trailing" secondItem="39p-cv-uyM" secondAttribute="trailing" id="bwb-XA-oQ6"/> |
|||
<constraint firstItem="39p-cv-uyM" firstAttribute="top" secondItem="Kqy-UM-ppa" secondAttribute="bottom" constant="-2" id="h1G-D1-tht"/> |
|||
<constraint firstItem="Kqy-UM-ppa" firstAttribute="top" secondItem="BQR-ag-XpK" secondAttribute="top" id="lho-d4-gas"/> |
|||
<constraint firstItem="Kqy-UM-ppa" firstAttribute="leading" secondItem="BQR-ag-XpK" secondAttribute="leading" id="o6C-np-hAn"/> |
|||
<constraint firstAttribute="trailing" secondItem="Kqy-UM-ppa" secondAttribute="trailing" id="xgA-X8-KqY"/> |
|||
<constraint firstAttribute="bottom" secondItem="39p-cv-uyM" secondAttribute="bottom" id="yyC-o4-sbn"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="BQR-ag-XpK" firstAttribute="bottom" secondItem="vGv-NT-vse" secondAttribute="bottom" id="5x5-S8-LuL"/> |
|||
<constraint firstItem="BQR-ag-XpK" firstAttribute="trailing" secondItem="vGv-NT-vse" secondAttribute="trailing" id="Czi-pe-eDI"/> |
|||
<constraint firstItem="BQR-ag-XpK" firstAttribute="top" secondItem="vGv-NT-vse" secondAttribute="top" id="OOR-r0-cCn"/> |
|||
<constraint firstItem="BQR-ag-XpK" firstAttribute="leading" secondItem="vGv-NT-vse" secondAttribute="leading" id="V8b-R2-ptS"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="vGv-NT-vse"/> |
|||
</view> |
|||
<connections> |
|||
<outlet property="dateRangeLabelHeightConstraint" destination="eOh-zH-x3P" id="3UR-tj-HGn"/> |
|||
<outlet property="emptyLabel" destination="Ujq-FS-I1H" id="Kcr-7p-lCi"/> |
|||
<outlet property="fromDateLabel" destination="mDh-dH-fw4" id="8k8-Zj-4Ji"/> |
|||
<outlet property="searchTextField" destination="DUl-wm-L0p" id="rHS-xg-UjX"/> |
|||
<outlet property="tableView" destination="s07-ms-I7n" id="oOe-nf-8aE"/> |
|||
<outlet property="toDateLabel" destination="uLQ-0q-P97" id="FTX-qu-5IO"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="DTQ-QR-ENp" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="629.60000000000002" y="75.112443778110944"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="ic_calender" width="25" height="25"/> |
|||
</resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
@ -1,255 +0,0 @@ |
|||
// |
|||
// ResendViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import Localize_Swift |
|||
// func getParams(model: SendMoneyRequestModel, reciepient: Recipient) -> [String: String] { // last api call |
|||
|
|||
class ResendRequestModel { |
|||
var exchangeRateDetail: SendMoneyExchangeRateModel? |
|||
var autoDebitAccount: Account? |
|||
|
|||
var paymemtMode: SendMoneyPayoutMode? |
|||
var bankAgent: SendMoneyBank? |
|||
var branch: SendMoneyBankBranch? |
|||
var accountNumber: String? |
|||
var payingAmount: String? |
|||
var transactionPassword: String? |
|||
|
|||
var transaction: ResendTransactionModel? |
|||
var reciepient: Recipient? |
|||
|
|||
} |
|||
|
|||
class ResendViewController: UIViewController { |
|||
|
|||
struct Constant { |
|||
static let heightOfDateRangeLabel: CGFloat = 35 |
|||
} |
|||
|
|||
struct StringConstants { |
|||
let searchPlaceholderText = "resend_search_hint_text".localized() |
|||
|
|||
} |
|||
|
|||
// MARK: IBOutlets |
|||
@IBOutlet weak var tableView: UITableView! |
|||
@IBOutlet weak var dateRangeLabelHeightConstraint: NSLayoutConstraint! |
|||
@IBOutlet weak var emptyLabel: UILabel! |
|||
@IBOutlet weak var fromDateLabel: UILabel! |
|||
@IBOutlet weak var toDateLabel: UILabel! |
|||
|
|||
|
|||
|
|||
@IBOutlet weak var searchTextField: UITextField! |
|||
|
|||
|
|||
// MARK: Properties |
|||
|
|||
var requestModel: ResendRequestModel? |
|||
|
|||
|
|||
var from: String? |
|||
var to: String? |
|||
|
|||
var model: ResendListModel? { |
|||
didSet { |
|||
self.transactions = model?.transactions ?? [] |
|||
self.accounts = model?.account ?? [] |
|||
} |
|||
} |
|||
|
|||
var accounts: [Account] = [] |
|||
|
|||
var transactions: [ResendTransactionModel] = [] { |
|||
didSet { |
|||
self.filteredTransaction = transactions |
|||
} |
|||
} |
|||
|
|||
var filteredTransaction: [ResendTransactionModel] = [] { |
|||
didSet { |
|||
self.emptyLabel.isHidden = !transactions.isEmpty |
|||
self.tableView.reloadData() |
|||
guard let fromDate = from, let toDate = to else { |
|||
self.dateRangeLabelHeightConstraint.constant = 0 |
|||
return |
|||
} |
|||
|
|||
self.fromDateLabel.text = self.getHUmanReadableDate(date: fromDate) |
|||
self.toDateLabel.text = self.getHUmanReadableDate(date: toDate) |
|||
UIView.animate(withDuration: 0.33, animations: { |
|||
self.dateRangeLabelHeightConstraint.constant = Constant.heightOfDateRangeLabel |
|||
}) |
|||
} |
|||
} |
|||
|
|||
|
|||
var selectedIndex: Int? |
|||
|
|||
var presenter: ResendModuleInterface? |
|||
|
|||
|
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
self.setupNormalNavigation() |
|||
self.setup() |
|||
self.presenter?.viewIsReady() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
self.navigationItem.title = "resend_money_text".localized() |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
self.navigationItem.title = "" |
|||
self.view.endEditing(true) |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
@IBAction func openSearchFilter(_ sender: UIButton) { |
|||
// open search filter |
|||
let viewController = UIStoryboard.init(name: "TransactionHistoryDatePicker", bundle: nil).instantiateViewController(withIdentifier: "DatePickerViewController") as! DatePickerViewController |
|||
viewController.completion = self.selectedDate |
|||
self.present(viewController, animated: true, completion: nil) |
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
|
|||
private func setup() { |
|||
// all setup should be done here |
|||
self.requestModel = ResendRequestModel() |
|||
setupSearchTextField() |
|||
setupDelegates() |
|||
self.dateRangeLabelHeightConstraint.constant = 0 |
|||
} |
|||
|
|||
private func selectedDate(from: String?, to: String?) { |
|||
self.from = from |
|||
self.to = to |
|||
self.fetchList(fromDate: from, toDate: to) |
|||
// TODO |
|||
|
|||
} |
|||
|
|||
private func fetchList(fromDate: String? = nil, toDate: String? = nil) { |
|||
guard let fromDate = fromDate, let toDate = toDate else { return } |
|||
self.presenter?.fetchList(fromDate: fromDate, toDate: toDate) |
|||
} |
|||
|
|||
private func setupSearchTextField() { |
|||
searchTextField.placeholder = StringConstants().searchPlaceholderText |
|||
let imageview = UIImageView(image: #imageLiteral(resourceName: "ic_search")) |
|||
self.searchTextField.leftView = imageview |
|||
self.searchTextField.leftViewMode = .always |
|||
self.searchTextField.addTarget(self, action: #selector(search(sender:)), for: UIControl.Event.editingChanged) |
|||
} |
|||
|
|||
@objc func search(sender: UITextField) { |
|||
let searchText = sender.text!.lowercased() |
|||
self.presenter?.filter(searchText: searchText) |
|||
} |
|||
|
|||
private func setupDelegates() { |
|||
self.tableView.delegate = self |
|||
self.tableView.dataSource = self |
|||
} |
|||
|
|||
private func showMethodSelection(for index: Int) { |
|||
self.selectedIndex = index |
|||
// let wireframe = PaymentSelectionWireframe() |
|||
// wireframe.openPaymentSelection(accounts: self.accounts ?? [], onSelection: self.selectedAcunt, source: self) |
|||
let wireframe = SelectPaymentWireframe() |
|||
wireframe.delegate = self |
|||
wireframe.openSelectPaymentUsingPanModal(with: self.accounts, in: self) |
|||
|
|||
} |
|||
|
|||
func selectedAcunt(acunt: Account) { |
|||
guard let index = self.selectedIndex, let transaction = self.filteredTransaction.elementAt(index: index), let requestModel = self.requestModel, let transactionId = self.filteredTransaction.elementAt(index: index)?.transactionId else {return} |
|||
|
|||
requestModel.autoDebitAccount = acunt |
|||
requestModel.transaction = transaction |
|||
|
|||
if let navigation = self.navigationController { |
|||
let wireframe = ResendExchangeWireframe() |
|||
wireframe.openExchangeWireFrame(model: requestModel, transactionId: transactionId , source: navigation) |
|||
} |
|||
} |
|||
|
|||
private func getHUmanReadableDate(date: String?) -> String? { |
|||
if let date = DateFormatter.toDate(dateString: date ?? "", format: AppConstants.dateFormat) { |
|||
let dateString = DateFormatter.toString(date: date, format: AppConstants.humanReadableDateFormat) |
|||
return dateString |
|||
} |
|||
return nil |
|||
} |
|||
} |
|||
|
|||
// MARK: TransactionHistoryViewInterface |
|||
extension ResendViewController: ResendViewInterface { |
|||
func show(model: ResendListModel) { |
|||
self.model = model |
|||
} |
|||
|
|||
func showLoading() { |
|||
self.showProgressHud() |
|||
} |
|||
|
|||
func hideLoading() { |
|||
self.hideProgressHud() |
|||
} |
|||
|
|||
func show(error: String) { |
|||
self.alert(type: .error, message: error) |
|||
} |
|||
|
|||
func show(models: [ResendTransactionModel]) { |
|||
self.filteredTransaction = models |
|||
} |
|||
} |
|||
|
|||
// MARK: TableViewDelegate |
|||
extension ResendViewController: UITableViewDelegate { |
|||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
|||
self.selectedIndex = indexPath.row |
|||
self.showMethodSelection(for: indexPath.row) |
|||
} |
|||
} |
|||
|
|||
// MARK: TableViewDatasource |
|||
extension ResendViewController: UITableViewDataSource { |
|||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
|||
return filteredTransaction.count |
|||
} |
|||
|
|||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
|||
let cell = tableView.dequeueReusableCell(withIdentifier: "ResendTableViewCell") as! ResendTableViewCell |
|||
cell.model = self.filteredTransaction.elementAt(index: indexPath.row) |
|||
cell.setup() |
|||
return cell |
|||
} |
|||
} |
|||
|
|||
extension ResendViewController: SelectPaymentDelegate { |
|||
func selectPayment(_ viewController: SelectPaymentViewController, selectedAccount: Account) { |
|||
selectedAcunt(acunt: selectedAccount) |
|||
viewController.dismiss(animated: true, completion: nil) |
|||
} |
|||
|
|||
func selectPayment(_ viewController: SelectPaymentViewController, error: Error) { |
|||
viewController.dismiss(animated: true, completion: nil) |
|||
} |
|||
|
|||
|
|||
} |
@ -1,15 +0,0 @@ |
|||
// |
|||
// ResendViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol ResendViewInterface: class { |
|||
func showLoading() |
|||
func hideLoading() |
|||
func show(model: ResendListModel) |
|||
func show(models: [ResendTransactionModel]) |
|||
func show(error: String) |
|||
} |
@ -1,34 +0,0 @@ |
|||
// |
|||
// ResendWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class ResendWireframe { |
|||
weak var view: UIViewController! |
|||
} |
|||
|
|||
extension ResendWireframe: ResendWireframeInput { |
|||
|
|||
var storyboardName: String {return "Resend"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = ResendService() |
|||
let interactor = ResendInteractor(service: service) |
|||
let presenter = ResendPresenter() |
|||
let viewController = viewControllerFromStoryboard(of: ResendViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
self.view = viewController |
|||
return viewController |
|||
} |
|||
} |
@ -1,13 +0,0 @@ |
|||
// |
|||
// ResendWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol ResendWireframeInput: WireframeInput { |
|||
|
|||
} |
@ -1,90 +0,0 @@ |
|||
// |
|||
// ResendExchangeInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class ResendExchangeInteractor { |
|||
|
|||
struct ApiConstants { |
|||
static let senderAmount = "cAmount" |
|||
static let senderCurrency = "sCurrency" |
|||
static let recieverAmount = "pAmount" |
|||
static let recieverCurrency = "pCurrency" |
|||
static let recieverCountryId = "pCountry" |
|||
static let paymentMethod = "paymentType" |
|||
static let paymentMethodId = "serviceType" |
|||
static let calcBy = "calcBy" |
|||
static let recieverCountryName = "pCountryName" |
|||
static let senderCountryId = "sCountry" |
|||
static let bankId = "pAgent" |
|||
static let payOutPartner = "payOutPartner" |
|||
static let userId = "userId" |
|||
} |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: ResendExchangeInteractorOutput? |
|||
private let service: ResendExchangeServiceType |
|||
var transactionId: String? |
|||
// MARK: Initialization |
|||
|
|||
init(service: ResendExchangeServiceType, transactionId: String?) { |
|||
self.service = service |
|||
self.transactionId = transactionId |
|||
} |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: ResendExchange interactor input interface |
|||
|
|||
extension ResendExchangeInteractor: ResendExchangeInteractorInput { |
|||
func viewIsReady() { |
|||
self.service.fetch(transactionId: self.transactionId ?? "", success: { (model) in |
|||
// ResendDetail |
|||
guard let model = model else {return} |
|||
self.output?.show(model: model) |
|||
}) { (error) in |
|||
self.output?.show(error: error) |
|||
} |
|||
} |
|||
|
|||
|
|||
func calculate(senderAmt: String, senderCurrency: String, recieverAmt: String, recieverCurrency: String, recieverCountryName: String, recieverCountryId: String, paymentMethod: String, paymentMethodId: String, calcBy: String, senderCountryId: String, payoutPartner: String, userId: String, bankId: String) { |
|||
|
|||
|
|||
var param: [String: String] = |
|||
[ |
|||
ApiConstants.senderAmount : senderAmt, |
|||
ApiConstants.senderCurrency : senderCurrency, |
|||
ApiConstants.recieverAmount : recieverAmt, |
|||
ApiConstants.recieverCurrency : recieverCurrency, |
|||
ApiConstants.recieverCountryName: recieverCountryName, |
|||
ApiConstants.recieverCountryId : recieverCountryId, |
|||
ApiConstants.paymentMethod: paymentMethod, |
|||
ApiConstants.paymentMethodId: paymentMethodId, |
|||
ApiConstants.calcBy : calcBy, |
|||
ApiConstants.senderCountryId : senderCountryId, |
|||
// ApiConstants.payOutPartner : payoutPartner, |
|||
ApiConstants.userId : userId, |
|||
ApiConstants.bankId : bankId |
|||
] |
|||
|
|||
if !payoutPartner.isEmpty { |
|||
param[ApiConstants.payOutPartner] = payoutPartner |
|||
} |
|||
|
|||
self.service.calculate(params: param, success: { (model) in |
|||
guard let model = model else {return} |
|||
self.output?.show(model: model) |
|||
}) { (error) in |
|||
self.output?.showExchangeRate(error: error) |
|||
} |
|||
|
|||
} |
|||
} |
@ -1,19 +0,0 @@ |
|||
// |
|||
// ResendExchangeInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol ResendExchangeInteractorInput: class { |
|||
func viewIsReady() |
|||
func calculate(senderAmt: String, senderCurrency: String, recieverAmt: String, recieverCurrency: String, recieverCountryName: String, recieverCountryId: String, paymentMethod: String, paymentMethodId: String, calcBy: String, senderCountryId: String, payoutPartner: String, userId: String, bankId: String) |
|||
} |
|||
|
|||
protocol ResendExchangeInteractorOutput: class { |
|||
func show(model: ResendDetail) |
|||
func show(model: SendMoneyExchangeRateModel) |
|||
func show(error: Error) |
|||
func showExchangeRate(error: Error) |
|||
} |
@ -1,22 +0,0 @@ |
|||
// |
|||
// ResendExchangeService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class ResendExchangeService: ResendExchangeServiceType { |
|||
|
|||
// MARK: Properties |
|||
|
|||
// MARK: Initialization |
|||
|
|||
// MARK: Data management |
|||
} |
|||
|
|||
|
|||
|
|||
|
@ -1,37 +0,0 @@ |
|||
// |
|||
// ResendExchangeServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol ResendExchangeServiceType: class, FetchResendDetailService, FetchSendMoneyExchangeRateService { |
|||
|
|||
} |
|||
|
|||
|
|||
protocol FetchResendDetailService: ApiServiceType { |
|||
func fetch(transactionId: String, success: @escaping (ResendDetail?) -> (), failure: @escaping (Error) -> ()) |
|||
} |
|||
|
|||
|
|||
extension FetchResendDetailService { |
|||
func fetch(transactionId: String, success: @escaping (ResendDetail?) -> (), failure: @escaping (Error) -> ()) { |
|||
let url = baseUrl + "/resend/detail" |
|||
let params = ["tranId": transactionId] |
|||
self.auth.request(method: .post, url: url, params: params, success: { (response: ResendDetailModelContainer) in |
|||
if (response.errorCode ?? "") != "0" { |
|||
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) |
|||
failure(error) |
|||
}else { |
|||
let model = response.data |
|||
success(model) |
|||
} |
|||
}) { (error) in |
|||
failure(error) |
|||
} |
|||
} |
|||
} |
@ -1,15 +0,0 @@ |
|||
// |
|||
// ResendExchangeModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol ResendExchangeModuleInterface: class { |
|||
|
|||
func viewIsReady() |
|||
func calculate(senderAmt: String, senderCurrency: String, recieverAmt: String, recieverCurrency: String, recieverCountryName: String, recieverCountryId: String, paymentMethod: String, paymentMethodId: String, calcBy: String, senderCountryId: String, payoutPartner: String, userId: String, bankId: String) |
|||
|
|||
|
|||
} |
@ -1,57 +0,0 @@ |
|||
// |
|||
// ResendExchangePresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class ResendExchangePresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: ResendExchangeViewInterface? |
|||
var interactor: ResendExchangeInteractorInput? |
|||
var wireframe: ResendExchangeWireframeInput? |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: ResendExchange module interface |
|||
|
|||
extension ResendExchangePresenter: ResendExchangeModuleInterface { |
|||
func viewIsReady() { |
|||
interactor?.viewIsReady() |
|||
} |
|||
|
|||
func calculate(senderAmt: String, senderCurrency: String, recieverAmt: String, recieverCurrency: String, recieverCountryName: String, recieverCountryId: String, paymentMethod: String, paymentMethodId: String, calcBy: String, senderCountryId: String, payoutPartner: String, userId: String, bankId: String) { |
|||
self.view?.showLoading() |
|||
interactor?.calculate(senderAmt: senderAmt, senderCurrency: senderCurrency, recieverAmt: recieverAmt, recieverCurrency: recieverCurrency, recieverCountryName: recieverCountryName, recieverCountryId: recieverCountryId, paymentMethod: paymentMethod, paymentMethodId: paymentMethodId, calcBy: calcBy, senderCountryId: senderCountryId, payoutPartner: payoutPartner, userId: userId, bankId: bankId) |
|||
} |
|||
} |
|||
|
|||
// MARK: ResendExchange interactor output interface |
|||
|
|||
extension ResendExchangePresenter: ResendExchangeInteractorOutput { |
|||
func show(model: ResendDetail) { |
|||
self.view?.hideLoading() |
|||
self.view?.show(model: model) |
|||
} |
|||
|
|||
func show(model: SendMoneyExchangeRateModel) { |
|||
self.view?.hideLoading() |
|||
self.view?.show(model: model) |
|||
} |
|||
|
|||
func showExchangeRate(error: Error) { |
|||
self.view?.hideLoading() |
|||
self.view?.showExchangeRate(error: error.localizedDescription) |
|||
} |
|||
|
|||
func show(error: Error) { |
|||
self.view?.hideLoading() |
|||
self.view?.show(error: error.localizedDescription) |
|||
} |
|||
} |
@ -1,546 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
|||
<device id="retina4_7" orientation="portrait"> |
|||
<adaptation id="fullscreen"/> |
|||
</device> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="SanFranciscoDisplay-Bold.otf"> |
|||
<string>SanFranciscoDisplay-Bold</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Medium.otf"> |
|||
<string>SanFranciscoDisplay-Medium</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Semibold.otf"> |
|||
<string>SanFranciscoDisplay-Semibold</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--Resend Exchange View Controller--> |
|||
<scene sceneID="SMX-ZZ-P09"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="ResendExchangeViewController" id="ipk-bU-HJJ" customClass="ResendExchangeViewController" customModule="GME_Remit" customModuleProvider="target" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="bAP-qa-4a0"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" keyboardDismissMode="onDrag" translatesAutoresizingMaskIntoConstraints="NO" id="UOX-Rk-d2G"> |
|||
<rect key="frame" x="0.0" y="64" width="375" height="603"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ORT-Zx-YgH"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="0dp-2J-x5o"> |
|||
<rect key="frame" x="10" y="20" width="355" height="226"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="QGT-uB-WH5"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="70"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dAt-Rq-Gck"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="70"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S5s-oa-wDv"> |
|||
<rect key="frame" x="8" y="0.0" width="347" height="70"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalCentering" translatesAutoresizingMaskIntoConstraints="NO" id="DKF-dM-GNV"> |
|||
<rect key="frame" x="0.0" y="0.0" width="222" height="70"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="05G-VD-aSJ"> |
|||
<rect key="frame" x="0.0" y="0.0" width="222" height="6"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="6" id="SXi-GB-bCQ"/> |
|||
</constraints> |
|||
<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="You Send" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cUO-HA-FGN"> |
|||
<rect key="frame" x="0.0" y="6" width="222" height="14"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,000,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="RrL-Ia-5PK" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="0.0" y="20" width="222" height="50"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="w3x-rA-gte"/> |
|||
</constraints> |
|||
<color key="textColor" red="0.92941176469999998" green="0.1137254902" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="33"/> |
|||
<textInputTraits key="textInputTraits" keyboardType="decimalPad"/> |
|||
</textField> |
|||
</subviews> |
|||
</stackView> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YmT-Dq-eHM"> |
|||
<rect key="frame" x="222" y="0.0" width="125" height="70"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="3QA-ou-Zac"> |
|||
<rect key="frame" x="25.5" y="22" width="74" height="26"/> |
|||
<subviews> |
|||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Korea" translatesAutoresizingMaskIntoConstraints="NO" id="vZD-fe-l60"> |
|||
<rect key="frame" x="0.0" y="0.0" width="26" height="26"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="26" id="pcX-b5-a5b"/> |
|||
<constraint firstAttribute="height" constant="26" id="zLT-Gu-MXx"/> |
|||
</constraints> |
|||
</imageView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fWD-kn-5nM"> |
|||
<rect key="frame" x="36" y="0.0" width="38" height="26"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="18"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.1764705882" green="0.21176470589999999" blue="0.56078431370000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="125" id="0Bb-Sn-ij1"/> |
|||
<constraint firstItem="3QA-ou-Zac" firstAttribute="centerX" secondItem="YmT-Dq-eHM" secondAttribute="centerX" id="9ab-PX-Wvx"/> |
|||
<constraint firstItem="3QA-ou-Zac" firstAttribute="centerY" secondItem="YmT-Dq-eHM" secondAttribute="centerY" id="zht-Al-MpX"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="S5s-oa-wDv" firstAttribute="leading" secondItem="dAt-Rq-Gck" secondAttribute="leading" constant="8" id="IeD-Oe-4eK"/> |
|||
<constraint firstAttribute="trailing" secondItem="S5s-oa-wDv" secondAttribute="trailing" id="Ngf-uj-axX"/> |
|||
<constraint firstItem="S5s-oa-wDv" firstAttribute="top" secondItem="dAt-Rq-Gck" secondAttribute="top" id="Q3Y-YN-ACx"/> |
|||
<constraint firstAttribute="bottom" secondItem="S5s-oa-wDv" secondAttribute="bottom" id="nqY-jx-pm2"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="70" id="7bz-Ac-p8S"/> |
|||
</constraints> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="AFY-c1-G3T"> |
|||
<rect key="frame" x="0.0" y="90" width="355" height="46"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gUz-OR-U8R"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="20.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p6j-Bv-gbe"> |
|||
<rect key="frame" x="0.0" y="0.0" width="10" height="20.5"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="10" id="CDs-Lk-Zzo"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
|||
<nil key="textColor"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="ZOr-JN-fja"> |
|||
<rect key="frame" x="10" y="0.0" width="345" height="20.5"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="QL4-sy-IsQ"> |
|||
<rect key="frame" x="0.0" y="0.0" width="345" height="20.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text=" - (Transfer Fees Included" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PoS-xP-r27"> |
|||
<rect key="frame" x="0.0" y="0.0" width="345" height="20.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="shr-2X-JiH"> |
|||
<rect key="frame" x="0.0" y="25.5" width="355" height="20.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Djh-8V-b3T"> |
|||
<rect key="frame" x="0.0" y="0.0" width="10" height="20.5"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="10" id="6da-cM-UmC"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
|||
<nil key="textColor"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="2Bk-Q8-XyZ"> |
|||
<rect key="frame" x="10" y="0.0" width="345" height="20.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" - (Transfer Fees Included" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lpd-5g-qAX"> |
|||
<rect key="frame" x="0.0" y="0.0" width="345" height="20.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="txz-Z2-j95"> |
|||
<rect key="frame" x="0.0" y="156" width="355" height="70"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gsA-E3-L0L"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="70"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CEP-Tt-tXC"> |
|||
<rect key="frame" x="8" y="0.0" width="347" height="70"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalCentering" translatesAutoresizingMaskIntoConstraints="NO" id="3gg-1Z-NH4"> |
|||
<rect key="frame" x="0.0" y="0.0" width="222" height="70"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vH0-7i-K9L"> |
|||
<rect key="frame" x="0.0" y="0.0" width="222" height="6"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="6" id="140-1X-yk5"/> |
|||
</constraints> |
|||
<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="Recepient Gets" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D6K-jA-ARY"> |
|||
<rect key="frame" x="0.0" y="6" width="222" height="14"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,00,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3yD-t0-8ha" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="0.0" y="20" width="222" height="50"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="bLT-gY-yAB"/> |
|||
</constraints> |
|||
<color key="textColor" red="0.92941176469999998" green="0.1137254902" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="33"/> |
|||
<textInputTraits key="textInputTraits" keyboardType="decimalPad"/> |
|||
</textField> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="mh1-Er-p1u"> |
|||
<rect key="frame" x="222" y="0.0" width="125" height="70"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iPE-sj-Qsu"> |
|||
<rect key="frame" x="0.0" y="0.0" width="125" height="70"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Js4-zb-lBt"> |
|||
<rect key="frame" x="25.5" y="22" width="74" height="26"/> |
|||
<subviews> |
|||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Korea" translatesAutoresizingMaskIntoConstraints="NO" id="lZL-MP-MUI"> |
|||
<rect key="frame" x="0.0" y="0.0" width="26" height="26"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="26" id="mG0-tZ-KhA"/> |
|||
<constraint firstAttribute="height" constant="26" id="mGg-C4-taF"/> |
|||
</constraints> |
|||
</imageView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VUq-zy-pIx"> |
|||
<rect key="frame" x="36" y="0.0" width="38" height="26"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="18"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.1764705882" green="0.21176470589999999" blue="0.56078431370000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<gestureRecognizers/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="125" id="Rez-4a-vc4"/> |
|||
<constraint firstItem="Js4-zb-lBt" firstAttribute="centerX" secondItem="iPE-sj-Qsu" secondAttribute="centerX" id="TwQ-eD-wnp"/> |
|||
<constraint firstItem="Js4-zb-lBt" firstAttribute="centerY" secondItem="iPE-sj-Qsu" secondAttribute="centerY" id="urS-2e-gxp"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="125" id="zDU-y1-WDk"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="CEP-Tt-tXC" firstAttribute="top" secondItem="gsA-E3-L0L" secondAttribute="top" id="Gv1-CZ-8iF"/> |
|||
<constraint firstItem="CEP-Tt-tXC" firstAttribute="leading" secondItem="gsA-E3-L0L" secondAttribute="leading" constant="8" id="i4H-mu-EJC"/> |
|||
<constraint firstAttribute="trailing" secondItem="CEP-Tt-tXC" secondAttribute="trailing" id="leb-Vx-cZe"/> |
|||
<constraint firstAttribute="bottom" secondItem="CEP-Tt-tXC" secondAttribute="bottom" id="zCj-dA-acL"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="70" id="0WI-rG-nWq"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bpp-Vs-INe"> |
|||
<rect key="frame" x="10" y="276" width="355" height="101"/> |
|||
<subviews> |
|||
<stackView opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Rww-TK-n3N"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="101"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oqH-TI-Y5V" userLabel="SeperateLine"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="0.5"/> |
|||
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="0.5" id="qa2-Bx-0NP"/> |
|||
</constraints> |
|||
</view> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mna-Lg-suC" userLabel="Coupon List"> |
|||
<rect key="frame" x="0.0" y="0.5" width="355" height="50"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="xia-he-n4w"> |
|||
<rect key="frame" x="8" y="0.0" width="339" height="50"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Coupon" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z3L-tm-ozs"> |
|||
<rect key="frame" x="0.0" y="0.0" width="55" height="50"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="55" id="OgV-vX-CKc"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Hc-NZ-tXK"> |
|||
<rect key="frame" x="65" y="0.0" width="274" height="50"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B3d-6T-3Ii"> |
|||
<rect key="frame" x="339" y="0.0" width="20" height="50"/> |
|||
<subviews> |
|||
<imageView opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_dropdownSmall" translatesAutoresizingMaskIntoConstraints="NO" id="Woq-Ek-UZe"> |
|||
<rect key="frame" x="0.0" y="15" width="20" height="20"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="20" id="232-9M-wYh"/> |
|||
<constraint firstAttribute="width" constant="20" id="FJH-yh-4om"/> |
|||
</constraints> |
|||
</imageView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="Woq-Ek-UZe" firstAttribute="centerY" secondItem="B3d-6T-3Ii" secondAttribute="centerY" id="rQm-H0-0Ch"/> |
|||
<constraint firstAttribute="width" constant="20" id="rcz-3W-EMA"/> |
|||
<constraint firstItem="Woq-Ek-UZe" firstAttribute="centerX" secondItem="B3d-6T-3Ii" secondAttribute="centerX" id="tJE-mA-c48"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="xia-he-n4w" firstAttribute="leading" secondItem="mna-Lg-suC" secondAttribute="leading" constant="8" id="7Qt-Yj-oy7"/> |
|||
<constraint firstAttribute="trailing" secondItem="xia-he-n4w" secondAttribute="trailing" constant="8" id="VrE-Os-kyc"/> |
|||
<constraint firstAttribute="height" constant="50" id="c2f-6V-smF"/> |
|||
<constraint firstAttribute="bottom" secondItem="xia-he-n4w" secondAttribute="bottom" id="mJF-5g-4vK"/> |
|||
<constraint firstItem="xia-he-n4w" firstAttribute="top" secondItem="mna-Lg-suC" secondAttribute="top" id="ynM-Eq-JmZ"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dKh-R7-WpZ"> |
|||
<rect key="frame" x="0.0" y="50.5" width="355" height="0.5"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cyc-ut-0jD" userLabel="SeperateLine"> |
|||
<rect key="frame" x="10" y="0.0" width="335" height="0.5"/> |
|||
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="0.5" id="2uV-D1-rm3"/> |
|||
<constraint firstAttribute="bottom" secondItem="Cyc-ut-0jD" secondAttribute="bottom" id="Bno-V0-Z4D"/> |
|||
<constraint firstItem="Cyc-ut-0jD" firstAttribute="leading" secondItem="dKh-R7-WpZ" secondAttribute="leading" constant="10" id="Vyf-bB-WOs"/> |
|||
<constraint firstItem="Cyc-ut-0jD" firstAttribute="top" secondItem="dKh-R7-WpZ" secondAttribute="top" id="a4g-ec-wEf"/> |
|||
<constraint firstAttribute="trailing" secondItem="Cyc-ut-0jD" secondAttribute="trailing" constant="10" id="lT6-gk-Nq7"/> |
|||
</constraints> |
|||
</view> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QUh-C5-hsz"> |
|||
<rect key="frame" x="0.0" y="51" width="355" height="50"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="YaC-Rc-9fv"> |
|||
<rect key="frame" x="8" y="0.0" width="339" height="50"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GP2-vg-WQf"> |
|||
<rect key="frame" x="0.0" y="0.0" width="206" height="50"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Applied Amount" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="INg-pM-FwI"> |
|||
<rect key="frame" x="0.0" y="15" width="206" height="20.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="17"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YmV-df-l8K"> |
|||
<rect key="frame" x="0.0" y="30.5" width="206" height="5"/> |
|||
<color key="backgroundColor" red="0.0" green="0.58980089430000004" blue="1" alpha="0.36601027400000002" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="5" id="KJb-A3-7kk"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="INg-pM-FwI" firstAttribute="centerX" secondItem="GP2-vg-WQf" secondAttribute="centerX" id="GPk-zO-DcP"/> |
|||
<constraint firstItem="INg-pM-FwI" firstAttribute="centerY" secondItem="GP2-vg-WQf" secondAttribute="centerY" id="HHK-bT-WIj"/> |
|||
<constraint firstItem="YmV-df-l8K" firstAttribute="centerX" secondItem="GP2-vg-WQf" secondAttribute="centerX" id="YpQ-MM-PXp"/> |
|||
<constraint firstItem="INg-pM-FwI" firstAttribute="width" secondItem="GP2-vg-WQf" secondAttribute="width" id="pJ8-EV-2k0"/> |
|||
<constraint firstItem="YmV-df-l8K" firstAttribute="width" secondItem="INg-pM-FwI" secondAttribute="width" id="rWn-qy-DHT"/> |
|||
<constraint firstItem="YmV-df-l8K" firstAttribute="top" secondItem="INg-pM-FwI" secondAttribute="bottom" constant="-5" id="wG2-Sn-kh3"/> |
|||
</constraints> |
|||
</view> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1,000,000" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3sE-za-2Ju"> |
|||
<rect key="frame" x="211" y="0.0" width="89" height="50"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="20"/> |
|||
<color key="textColor" red="0.92941176469999998" green="0.1137254902" blue="0.1960784314" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rRf-DW-Gd4"> |
|||
<rect key="frame" x="305" y="0.0" width="34" height="50"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="34" id="kmE-Ah-vGv"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="17"/> |
|||
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="YaC-Rc-9fv" secondAttribute="bottom" id="3r6-ZS-tEK"/> |
|||
<constraint firstItem="YaC-Rc-9fv" firstAttribute="top" secondItem="QUh-C5-hsz" secondAttribute="top" id="KPc-rh-RqA"/> |
|||
<constraint firstAttribute="height" constant="50" id="UTX-uX-Rpo"/> |
|||
<constraint firstItem="YaC-Rc-9fv" firstAttribute="leading" secondItem="QUh-C5-hsz" secondAttribute="leading" constant="8" id="aFS-eR-1TJ"/> |
|||
<constraint firstAttribute="trailing" secondItem="YaC-Rc-9fv" secondAttribute="trailing" constant="8" id="hrk-Dl-Jr2"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="QUh-C5-hsz" firstAttribute="top" secondItem="dKh-R7-WpZ" secondAttribute="bottom" id="c05-r7-MDP"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="Rww-TK-n3N" firstAttribute="leading" secondItem="bpp-Vs-INe" secondAttribute="leading" id="3HA-nL-a33"/> |
|||
<constraint firstAttribute="bottom" secondItem="Rww-TK-n3N" secondAttribute="bottom" id="5ES-dk-NWJ"/> |
|||
<constraint firstItem="Rww-TK-n3N" firstAttribute="top" secondItem="bpp-Vs-INe" secondAttribute="top" id="bbu-RH-lFc"/> |
|||
<constraint firstAttribute="trailing" secondItem="Rww-TK-n3N" secondAttribute="trailing" id="fbK-sK-zop"/> |
|||
</constraints> |
|||
</view> |
|||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lj4-R8-JCO"> |
|||
<rect key="frame" x="87.5" y="407" width="200" height="50"/> |
|||
<color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="200" id="Pc3-2B-fh6"/> |
|||
<constraint firstAttribute="height" constant="50" id="gi1-Me-gOb"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="18"/> |
|||
<state key="normal" title="Calculate"> |
|||
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> |
|||
</state> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|||
<integer key="value" value="25"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
<connections> |
|||
<action selector="continueButton:" destination="ipk-bU-HJJ" eventType="touchUpInside" id="ag8-ct-uvy"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="lj4-R8-JCO" firstAttribute="centerX" secondItem="ORT-Zx-YgH" secondAttribute="centerX" id="1rQ-Te-Tc2"/> |
|||
<constraint firstItem="lj4-R8-JCO" firstAttribute="top" secondItem="bpp-Vs-INe" secondAttribute="bottom" constant="30" id="3Rp-e2-QVE"/> |
|||
<constraint firstAttribute="trailing" secondItem="0dp-2J-x5o" secondAttribute="trailing" constant="10" id="XpX-rY-Tkz"/> |
|||
<constraint firstItem="0dp-2J-x5o" firstAttribute="top" secondItem="ORT-Zx-YgH" secondAttribute="top" constant="20" id="cra-Vv-yvJ"/> |
|||
<constraint firstAttribute="trailing" secondItem="bpp-Vs-INe" secondAttribute="trailing" constant="10" id="lwP-FI-1ni"/> |
|||
<constraint firstItem="0dp-2J-x5o" firstAttribute="leading" secondItem="ORT-Zx-YgH" secondAttribute="leading" constant="10" id="qPu-pO-RIt"/> |
|||
<constraint firstItem="bpp-Vs-INe" firstAttribute="top" secondItem="0dp-2J-x5o" secondAttribute="bottom" constant="30" id="ryq-gz-rH8"/> |
|||
<constraint firstItem="bpp-Vs-INe" firstAttribute="leading" secondItem="ORT-Zx-YgH" secondAttribute="leading" constant="10" id="sFp-UH-2TK"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="ORT-Zx-YgH" secondAttribute="trailing" id="Oap-ih-xjc"/> |
|||
<constraint firstItem="ORT-Zx-YgH" firstAttribute="leading" secondItem="UOX-Rk-d2G" secondAttribute="leading" id="XW4-zi-G8A"/> |
|||
<constraint firstAttribute="bottom" secondItem="ORT-Zx-YgH" secondAttribute="bottom" id="Y3V-bL-5T9"/> |
|||
<constraint firstItem="ORT-Zx-YgH" firstAttribute="top" secondItem="UOX-Rk-d2G" secondAttribute="top" id="a18-DW-IUE"/> |
|||
<constraint firstAttribute="bottom" secondItem="ORT-Zx-YgH" secondAttribute="bottom" id="mpp-ab-osB"/> |
|||
</constraints> |
|||
</scrollView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="Ywq-XZ-hJD" firstAttribute="trailing" secondItem="UOX-Rk-d2G" secondAttribute="trailing" id="0Zo-hc-Ale"/> |
|||
<constraint firstItem="Ywq-XZ-hJD" firstAttribute="bottom" secondItem="UOX-Rk-d2G" secondAttribute="bottom" id="1gS-qs-aeu"/> |
|||
<constraint firstItem="ORT-Zx-YgH" firstAttribute="height" secondItem="bAP-qa-4a0" secondAttribute="height" id="Hh3-xH-4S8"/> |
|||
<constraint firstItem="UOX-Rk-d2G" firstAttribute="top" secondItem="Ywq-XZ-hJD" secondAttribute="top" id="RGg-ak-3GB"/> |
|||
<constraint firstItem="UOX-Rk-d2G" firstAttribute="leading" secondItem="Ywq-XZ-hJD" secondAttribute="leading" id="Xfb-Ll-IxY"/> |
|||
<constraint firstItem="ORT-Zx-YgH" firstAttribute="width" secondItem="bAP-qa-4a0" secondAttribute="width" id="zpn-DG-veu"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="Ywq-XZ-hJD"/> |
|||
</view> |
|||
<navigationItem key="navigationItem" id="KSv-F1-hGm"/> |
|||
<connections> |
|||
<outlet property="backgroundViewCountryLabel1" destination="YmT-Dq-eHM" id="37u-Xd-TNL"/> |
|||
<outlet property="backgroundViewCountryLabel2" destination="iPE-sj-Qsu" id="yLp-Uc-xx3"/> |
|||
<outlet property="continueButton" destination="lj4-R8-JCO" id="9vU-Fc-bC8"/> |
|||
<outlet property="countryCodeLabel" destination="VUq-zy-pIx" id="SFm-9W-HMx"/> |
|||
<outlet property="countryFlagImage" destination="lZL-MP-MUI" id="7mc-z6-Ush"/> |
|||
<outlet property="countryListStackView" destination="mh1-Er-p1u" id="LoB-Hw-hj9"/> |
|||
<outlet property="couponBackgroundView" destination="bpp-Vs-INe" id="Qzb-wX-0DI"/> |
|||
<outlet property="couponDropDownImageView" destination="Woq-Ek-UZe" id="uEW-uA-jQw"/> |
|||
<outlet property="couponNameLabel" destination="5Hc-NZ-tXK" id="D07-QE-1rl"/> |
|||
<outlet property="couponNameTitleLabel" destination="z3L-tm-ozs" id="gex-ac-wvs"/> |
|||
<outlet property="exchangeBackground1" destination="dAt-Rq-Gck" id="1zO-bH-rdx"/> |
|||
<outlet property="exchangeBackground2" destination="gsA-E3-L0L" id="o7l-Uc-dCS"/> |
|||
<outlet property="exchangeInfoStackView" destination="AFY-c1-G3T" id="8ro-yb-2wQ"/> |
|||
<outlet property="exchangeRateLabel" destination="Lpd-5g-qAX" id="DsQ-1u-31H"/> |
|||
<outlet property="realSenderLabel" destination="3sE-za-2Ju" id="9Of-bA-WtF"/> |
|||
<outlet property="realSenderTitleLabel" destination="INg-pM-FwI" id="Y3j-af-BTU"/> |
|||
<outlet property="realSenderView" destination="QUh-C5-hsz" id="DLi-Jf-AYq"/> |
|||
<outlet property="reciepientTextField" destination="3yD-t0-8ha" id="ZYV-4K-A47"/> |
|||
<outlet property="recipientGetsTitleLabel" destination="D6K-jA-ARY" id="vMC-Eb-LRK"/> |
|||
<outlet property="senderTextField" destination="RrL-Ia-5PK" id="jbG-Od-mna"/> |
|||
<outlet property="transferFeeInfoLabel" destination="PoS-xP-r27" id="eu0-6H-stO"/> |
|||
<outlet property="youSendTitleLabel" destination="cUO-HA-FGN" id="HUC-Co-c9Y"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="4am-Xm-AE7" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="1181.5999999999999" y="-42.728635682158924"/> |
|||
</scene> |
|||
<!--Navigation Controller--> |
|||
<scene sceneID="Mn8-yH-U12"> |
|||
<objects> |
|||
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="faB-ae-ahc" sceneMemberID="viewController"> |
|||
<toolbarItems/> |
|||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="atM-sS-DEv"> |
|||
<rect key="frame" x="0.0" y="20" width="375" height="44"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
</navigationBar> |
|||
<nil name="viewControllers"/> |
|||
<connections> |
|||
<segue destination="ipk-bU-HJJ" kind="relationship" relationship="rootViewController" id="U6Q-DF-oVD"/> |
|||
</connections> |
|||
</navigationController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="RN1-zh-MZl" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="108" y="-80"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="Korea" width="40" height="40"/> |
|||
<image name="ic_dropdownSmall" width="6" height="3"/> |
|||
</resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
@ -1,453 +0,0 @@ |
|||
// |
|||
// ResendExchangeViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class ResendExchangeViewController: UIViewController { |
|||
|
|||
|
|||
// MARK: IBOutlets |
|||
|
|||
@IBOutlet weak var exchangeBackground1: UIView! |
|||
@IBOutlet weak var exchangeBackground2: UIView! |
|||
@IBOutlet weak var backgroundViewCountryLabel1: UIView! |
|||
@IBOutlet weak var backgroundViewCountryLabel2: UIView! |
|||
@IBOutlet weak var countryListStackView: UIStackView! |
|||
@IBOutlet weak var countryCodeLabel: UILabel! |
|||
@IBOutlet weak var countryFlagImage: UIImageView! |
|||
|
|||
@IBOutlet weak var continueButton: UIButton! |
|||
|
|||
@IBOutlet weak var senderTextField: GMENumberTextField! |
|||
@IBOutlet weak var reciepientTextField: GMENumberTextField! |
|||
|
|||
@IBOutlet weak var transferFeeInfoLabel: UILabel! |
|||
@IBOutlet weak var exchangeRateLabel: UILabel! |
|||
@IBOutlet weak var exchangeInfoStackView: UIStackView! |
|||
|
|||
@IBOutlet weak var youSendTitleLabel: UILabel! |
|||
@IBOutlet weak var recipientGetsTitleLabel: UILabel! |
|||
|
|||
@IBOutlet weak var couponBackgroundView: UIView! |
|||
@IBOutlet weak var couponNameTitleLabel: UILabel! |
|||
@IBOutlet weak var couponNameLabel: UILabel! |
|||
@IBOutlet weak var couponDropDownImageView: UIImageView! |
|||
|
|||
@IBOutlet weak var realSenderLabel: UILabel! |
|||
@IBOutlet weak var realSenderTitleLabel: UILabel! |
|||
@IBOutlet weak var realSenderView: UIView! |
|||
|
|||
// MARK: Properties |
|||
|
|||
var reciepient: Recipient? { |
|||
didSet { |
|||
self.requestModel?.reciepient = reciepient |
|||
} |
|||
} |
|||
var requestModel: ResendRequestModel? |
|||
var transactionId: String? |
|||
|
|||
var resendInfoModel: ResendDetail? { |
|||
didSet { |
|||
self.senderTextField.text = Utility.getCommaSeperatedStringWithDecimal( |
|||
numberString: resendInfoModel?.exchangeRate?.cAmount ?? "" |
|||
) |
|||
|
|||
self.reciepientTextField.text = Utility.getCommaSeperatedStringWithDecimal( |
|||
numberString: resendInfoModel?.exchangeRate?.pAmount ?? "" |
|||
) |
|||
|
|||
self.calcBy = resendInfoModel?.exchangeRate?.calcBy ?? "" |
|||
guard let reciever = resendInfoModel?.receiver else {return} |
|||
self.reciepient = self.convertReciepient(model: reciever) |
|||
self.setCountryFlag(countryCode: self.resendInfoModel?.receiver?.rCountryCode ?? "") |
|||
|
|||
senderTextField.receiverNativeCountry = reciever.rCountryCode ?? "" |
|||
reciepientTextField.receiverNativeCountry = reciever.rCountryCode ?? "" |
|||
|
|||
} |
|||
} |
|||
|
|||
var exchangeRateModel: SendMoneyExchangeRateModel? { |
|||
didSet { |
|||
self.reciepientTextField.text = Utility.getCommaSeperatedStringWithDecimal( |
|||
numberString: self.exchangeRateModel?.recipientAmount ?? "" |
|||
) |
|||
|
|||
self.senderTextField.text = Utility.getCommaSeperatedStringWithDecimal( |
|||
numberString: self.exchangeRateModel?.senderAmount ?? "" |
|||
) |
|||
|
|||
let serviceCharge = exchangeRateModel?.transferFee?.likeCommaMoney() ?? |
|||
exchangeRateModel?.transferFee ?? |
|||
"0.00" |
|||
|
|||
let transferFee = serviceCharge != "0.00" ? "-\(serviceCharge)" : "\(serviceCharge)" |
|||
|
|||
self.transferFeeInfoLabel.text = transferFee + " (" + "transfer_fee_included_text".localized() + ")" |
|||
|
|||
let exchangeRate = self.exchangeRateModel?.exchangeRate ?? "" |
|||
self.exchangeRateLabel.text = exchangeRate + " (" + "current_exchange_rate_text".localized() + ")" |
|||
self.countryCodeLabel.text = exchangeRateModel?.reciepientCurrency |
|||
|
|||
setCoupon() |
|||
|
|||
UIView.animate(withDuration: 0.33) { |
|||
self.transferFeeInfoLabel.isHidden = false |
|||
self.exchangeRateLabel.isHidden = false |
|||
self.exchangeInfoStackView.isHidden = false |
|||
self.transferFeeInfoLabel.alpha = 1 |
|||
self.exchangeRateLabel.alpha = 1 |
|||
self.exchangeInfoStackView.alpha = 1 |
|||
|
|||
self.couponBackgroundView.isHidden = false |
|||
self.couponBackgroundView.alpha = 1 |
|||
} |
|||
|
|||
self.action = .continue |
|||
self.requestModel?.exchangeRateDetail = exchangeRateModel |
|||
} |
|||
} |
|||
|
|||
var presenter: ResendExchangeModuleInterface? |
|||
var calcBy = "" |
|||
|
|||
var action: ActionBehaviour? { |
|||
didSet { |
|||
if let action = action { |
|||
switch action { |
|||
case .calculate: |
|||
self.continueButton.setTitle("calculate_text".localized(), for: .normal) |
|||
case .continue: |
|||
self.continueButton.setTitle("continue_text".localized(), for: .normal) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
weak var actionDelegate: SendMoneyExchangeRateActionDelegate? |
|||
var selectedCurrencyViewModel: SendMoneyExchangeRateCurrencyViewModel? |
|||
|
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
self.setup() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
self.navigationItem.title = "resend_money_text".localized() |
|||
initialSetup() |
|||
self.presenter?.viewIsReady() |
|||
self.action = ActionBehaviour.calculate |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
self.navigationItem.title = "" |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
@IBAction func continueButton(_ sender: UIButton) { |
|||
self.view.endEditing(true) |
|||
if let action = action { |
|||
switch action { |
|||
case .calculate: |
|||
self.calculate() |
|||
case .continue: |
|||
// todo |
|||
self.showReceiverDetailPage() |
|||
} |
|||
} |
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
|
|||
private func setup() { |
|||
// all setup should be done here |
|||
initialSetup() |
|||
setupTargets() |
|||
setupView() |
|||
configureLanguage() |
|||
|
|||
senderTextField.delegate = self |
|||
reciepientTextField.delegate = self |
|||
} |
|||
|
|||
private func configureLanguage() { |
|||
self.recipientGetsTitleLabel.text = "recepient_gets_text".localized() |
|||
self.youSendTitleLabel.text = "you_send_text".localized() |
|||
|
|||
let dropDownImage = #imageLiteral(resourceName: "dropdown_white").withRenderingMode(UIImage.RenderingMode.alwaysTemplate) |
|||
|
|||
couponDropDownImageView.image = dropDownImage |
|||
couponDropDownImageView.tintColor = .themeRed |
|||
couponNameLabel.text = "" |
|||
} |
|||
|
|||
func setupView() { |
|||
[backgroundViewCountryLabel1, backgroundViewCountryLabel2].forEach({ |
|||
$0?.layer.cornerRadius = 5 |
|||
}) |
|||
|
|||
[exchangeBackground1, exchangeBackground2, couponBackgroundView].forEach({ |
|||
$0?.layer.borderWidth = 1 |
|||
$0?.layer.borderColor = UIColor.init(hex: "#E0E0E0").cgColor |
|||
$0?.layer.cornerRadius = 5 |
|||
}) |
|||
} |
|||
|
|||
private func showReceiverDetailPage() { |
|||
|
|||
let sendmoneyModel = self.convertModel() |
|||
if let navigation = self.navigationController, let reciepient = self.reciepient { |
|||
let wireframe = SendMoneyVerificationWireframe() |
|||
wireframe.openVerification(reciepient: reciepient, model: sendmoneyModel, source: navigation) |
|||
} |
|||
} |
|||
|
|||
private func setCoupon(){ |
|||
couponNameTitleLabel.text = "coupon_text".localized() |
|||
couponNameLabel.text = exchangeRateModel?.formattedCouponName |
|||
realSenderTitleLabel.text = "applied_amount_text".localized() |
|||
|
|||
if let schemeId = exchangeRateModel?.schemeId, |
|||
schemeId != "" { |
|||
guard |
|||
let discountText = exchangeRateModel?.discountValue, |
|||
let senderText = senderTextField.text?.stringRemovingComma(), |
|||
let senderValue = Int(senderText), |
|||
let discountValue = Int(discountText) else { |
|||
realSenderLabel.text = senderTextField.text |
|||
return |
|||
} |
|||
|
|||
realSenderView.isHidden = false |
|||
realSenderView.alpha = 1 |
|||
realSenderLabel.text = "\(senderValue - discountValue)".likeCommaMoney() |
|||
|
|||
} else { |
|||
realSenderView.isHidden = true |
|||
realSenderView.alpha = 0 |
|||
realSenderLabel.text = "0" |
|||
} |
|||
} |
|||
|
|||
func convertReciepient(model: ResendReceiver) -> Recipient { |
|||
var reciepient = Recipient() |
|||
reciepient.firstName = model.rFullName |
|||
reciepient.receiverID = self.resendInfoModel?.remitDetial?.receiverId |
|||
reciepient.purposeOfRemitID = self.resendInfoModel?.remitDetial?.purposeOfRemittance |
|||
reciepient.relationshipID = self.resendInfoModel?.remitDetial?.relWithSender |
|||
reciepient.address = model.rAddress |
|||
reciepient.country = model.rCountry |
|||
reciepient.mobile = model.rMobile |
|||
return reciepient |
|||
} |
|||
|
|||
private func convertModel() -> SendMoneyRequestModel { |
|||
let model = SendMoneyRequestModel() |
|||
self.exchangeRateModel?.calcBy = self.calcBy |
|||
self.exchangeRateModel?.autodebitSendingAmount = self.senderTextField.text!.stringRemovingComma() |
|||
model.exchangeRateDetail = self.exchangeRateModel |
|||
model.autoDebitAccount = self.requestModel?.autoDebitAccount |
|||
|
|||
/* SendMoneyPayoutMode */ |
|||
|
|||
// "deliveryMethodId": model.paymemtMode?.id ?? "", |
|||
// "payOutPartner": model.paymemtMode?.payoutPartner ?? "", |
|||
// "ReceiverAccountNo": model.paymemtMode?.accountNumber ?? "", |
|||
|
|||
let paymentMode = SendMoneyPayoutMode() |
|||
paymentMode.id = self.resendInfoModel?.remitDetial?.deliveryMethodId |
|||
paymentMode.payoutPartner = self.resendInfoModel?.remitDetial?.payOutPartner |
|||
paymentMode.accountNumber = self.resendInfoModel?.remitDetial?.receiverAccountNo |
|||
paymentMode.mode = self.resendInfoModel?.receiver?.deliveryMethod |
|||
model.paymemtMode = paymentMode |
|||
|
|||
/* SendMoneyBank */ |
|||
// "pAgent": model.bank?.id ?? "", |
|||
|
|||
let bank = SendMoneyBank() |
|||
bank.id = self.resendInfoModel?.remitDetial?.pAgent |
|||
bank.name = self.requestModel?.transaction?.bankName |
|||
model.bank = bank |
|||
|
|||
/* SendMoneyBankBranch */ |
|||
// branch |
|||
// "pBranch": model.branch?.id ?? "", |
|||
let branch = SendMoneyBankBranch() |
|||
branch.id = self.resendInfoModel?.remitDetial?.pBranch |
|||
model.branch = branch |
|||
return model |
|||
} |
|||
|
|||
private func initialSetup() { |
|||
self.exchangeRateModel = nil |
|||
self.exchangeRateLabel.isHidden = true |
|||
self.exchangeRateLabel.alpha = 0 |
|||
self.transferFeeInfoLabel.isHidden = true |
|||
self.transferFeeInfoLabel.alpha = 0 |
|||
self.exchangeInfoStackView.isHidden = true |
|||
exchangeInfoStackView.alpha = 0 |
|||
self.setCountryFlag(countryCode: self.reciepient?.countryCode ?? "") |
|||
} |
|||
|
|||
private func setCountryFlag(countryCode: String) { |
|||
let flag = CountryInfo().getFlag(for: countryCode) |
|||
self.countryFlagImage.image = flag |
|||
} |
|||
|
|||
private func setupTargets() { |
|||
self.reciepientTextField.addTarget( |
|||
self, |
|||
action: #selector(self.textChanged(sender:)), |
|||
for: UIControl.Event.editingChanged |
|||
) |
|||
|
|||
self.senderTextField.addTarget( |
|||
self, |
|||
action: #selector(self.textChanged(sender:)), |
|||
for: UIControl.Event.editingChanged |
|||
) |
|||
} |
|||
|
|||
func calculate() { |
|||
let senderAmount = self.senderTextField.text! |
|||
let reciepientAmount = self.reciepientTextField.text! |
|||
self.calculateExchangeRate( |
|||
senderAmount: senderAmount, |
|||
reciepientAmount: reciepientAmount, |
|||
calcBy: self.calcBy |
|||
) |
|||
} |
|||
|
|||
func calculateExchangeRate(senderAmount: String, reciepientAmount: String, calcBy: String) { |
|||
let senderAmount = senderAmount.stringRemovingComma() // send sAmt amount |
|||
let reciepientAmount = reciepientAmount.stringRemovingComma() |
|||
let recipientCurrency = self.resendInfoModel?.exchangeRate?.pCurrency |
|||
let reciepientCountryId = self.resendInfoModel?.exchangeRate?.pCountryId |
|||
let paymentMethod = self.requestModel?.autoDebitAccount?.type |
|||
let paymentMethodId = self.resendInfoModel?.exchangeRate?.serviceType |
|||
let payoutPartner = self.resendInfoModel?.exchangeRate?.payoutPartner |
|||
let myUsername = Utility.getMyUserName() |
|||
let bankId = self.resendInfoModel?.exchangeRate?.payoutAgent |
|||
let reciepientCountryName = self.resendInfoModel?.exchangeRate?.pCountryName |
|||
|
|||
self.calculate( |
|||
senderAmt: senderAmount, |
|||
recieverAmt: reciepientAmount, |
|||
recieverCurrency: recipientCurrency, |
|||
recieverCountryName: reciepientCountryName, |
|||
recieverCountryId: reciepientCountryId, |
|||
paymentMethod: paymentMethod, |
|||
paymentMethodId: paymentMethodId, |
|||
calcBy: calcBy, |
|||
payoutPartner: payoutPartner, |
|||
userId: myUsername, |
|||
bankId: bankId |
|||
) |
|||
} |
|||
|
|||
func calculate( |
|||
senderAmt: String?, |
|||
senderCurrency: String? = "KRW", |
|||
recieverAmt: String?, |
|||
recieverCurrency: String?, |
|||
recieverCountryName: String?, |
|||
recieverCountryId: String?, |
|||
paymentMethod: String?, |
|||
paymentMethodId: String?, |
|||
calcBy: String?, |
|||
senderCountryId: String? = "118", |
|||
payoutPartner: String?, |
|||
userId: String?, |
|||
bankId: String? |
|||
) { |
|||
self.presenter?.calculate( |
|||
senderAmt: senderAmt ?? "", |
|||
senderCurrency: senderCurrency ?? "", |
|||
recieverAmt: recieverAmt ?? "", |
|||
recieverCurrency: recieverCurrency ?? "", |
|||
recieverCountryName: recieverCountryName ?? "", |
|||
recieverCountryId: recieverCountryId ?? "", |
|||
paymentMethod: paymentMethod ?? "", |
|||
paymentMethodId: paymentMethodId ?? "", |
|||
calcBy: calcBy ?? "", |
|||
senderCountryId: senderCountryId ?? "", |
|||
payoutPartner: payoutPartner ?? "", |
|||
userId: userId ?? "", |
|||
bankId: bankId ?? "" |
|||
) |
|||
} |
|||
|
|||
@objc private func textChanged(sender: UITextField) { |
|||
self.action = .calculate |
|||
switch sender { |
|||
case senderTextField: |
|||
self.reciepientTextField.text = "" |
|||
self.calcBy = "c" |
|||
senderTextField.text = Utility.getCommaSeperatedString(numberString: senderTextField.text!) |
|||
case reciepientTextField: |
|||
self.senderTextField.text = "" |
|||
self.calcBy = "p" |
|||
reciepientTextField.text = Utility.getCommaSeperatedString(numberString: reciepientTextField.text!) |
|||
default: |
|||
break |
|||
} |
|||
self.exchangeRateModel?.calcBy = calcBy |
|||
} |
|||
} |
|||
|
|||
// MARK: ResendExchangeViewInterface |
|||
extension ResendExchangeViewController: ResendExchangeViewInterface { |
|||
func show(model: ResendDetail) { |
|||
self.resendInfoModel = model |
|||
self.calculateExchangeRate(senderAmount: self.senderTextField.text!, reciepientAmount: self.reciepientTextField.text!, calcBy: self.calcBy) |
|||
} |
|||
|
|||
func showExchangeRate(error: String) { |
|||
self.alert(type: .error, message: error) |
|||
} |
|||
|
|||
func show(error: String) { |
|||
self.alert(type: .error, message: error) { |
|||
self.navigationController?.popViewController(animated: true) |
|||
} |
|||
} |
|||
|
|||
func showLoading() { |
|||
self.showProgressHud() |
|||
} |
|||
|
|||
func hideLoading() { |
|||
self.hideProgressHud() |
|||
} |
|||
|
|||
func show(model: SendMoneyExchangeRateModel) { |
|||
self.exchangeRateModel = model |
|||
} |
|||
} |
|||
|
|||
extension ResendExchangeViewController: FetchSendMoneyExchangeRateService { |
|||
|
|||
} |
|||
|
|||
// MARK: - UITextFieldDelegate |
|||
extension ResendExchangeViewController: UITextFieldDelegate { |
|||
func textFieldDidEndEditing(_ textField: UITextField) { |
|||
switch textField { |
|||
case senderTextField, reciepientTextField: |
|||
if senderTextField.text != "" || reciepientTextField.text != "" { |
|||
calculate() |
|||
} |
|||
default: |
|||
break |
|||
} |
|||
} |
|||
} |
@ -1,16 +0,0 @@ |
|||
// |
|||
// ResendExchangeViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol ResendExchangeViewInterface: class { |
|||
func showLoading() |
|||
func hideLoading() |
|||
func show(model: ResendDetail) |
|||
func show(model: SendMoneyExchangeRateModel) |
|||
func show(error: String) |
|||
func showExchangeRate(error: String) |
|||
} |
@ -1,41 +0,0 @@ |
|||
// |
|||
// ResendExchangeWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class ResendExchangeWireframe { |
|||
weak var view: UIViewController! |
|||
var model: ResendRequestModel? |
|||
var transactionId: String? |
|||
} |
|||
|
|||
extension ResendExchangeWireframe: ResendExchangeWireframeInput { |
|||
|
|||
var storyboardName: String {return "ResendExchange"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = ResendExchangeService() |
|||
let interactor = ResendExchangeInteractor(service: service, transactionId: self.transactionId) |
|||
let presenter = ResendExchangePresenter() |
|||
let viewController = viewControllerFromStoryboard(of: ResendExchangeViewController.self) |
|||
viewController.requestModel = self.model |
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
self.view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func openExchangeWireFrame(model: ResendRequestModel, transactionId: String, source: UINavigationController) { |
|||
self.model = model |
|||
self.transactionId = transactionId |
|||
self.pushMainView(in: source) |
|||
} |
|||
} |
@ -1,13 +0,0 @@ |
|||
// |
|||
// ResendExchangeWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by gme_2 on 18/03/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol ResendExchangeWireframeInput: WireframeInput { |
|||
|
|||
} |
@ -1,59 +0,0 @@ |
|||
// |
|||
// SendMoneyPaymentModeInteractor.swift |
|||
// GMERemittance |
|||
// |
|||
// Created by gme_2 on 28/08/2018. |
|||
//Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class SendMoneyPaymentModeInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: SendMoneyPaymentModeInteractorOutput? |
|||
private let service: SendMoneyPaymentModeServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: SendMoneyPaymentModeServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
// MARK: Converting entities |
|||
|
|||
// MARK: Private Functions |
|||
} |
|||
|
|||
// MARK: SendMoneyPaymentMode interactor input interface |
|||
|
|||
extension SendMoneyPaymentModeInteractor: SendMoneyPaymentModeInteractorInput { |
|||
func viewIsReady(for reciepient: Recipient) { |
|||
let countryCode = reciepient.countryCode ?? "" |
|||
let id = reciepient.receiverID ?? "" |
|||
self.service.fetchInformations(countryCode: countryCode, id: id, success: { (model) in |
|||
self.output?.show(model: model?.payoutMode ?? []) |
|||
}) { (error) in |
|||
self.output?.show(error: error) |
|||
} |
|||
} |
|||
|
|||
func validateAccountNumber(params: [String : String]) { |
|||
self.service.validate(params: params, success: { |
|||
self.output?.success() |
|||
}) { (error) in |
|||
self.output?.show(error: error) |
|||
} |
|||
} |
|||
|
|||
func fetchBranch(countryCode code: String, bankID id: String) { |
|||
service.fetchBranch( |
|||
countryCode: code, |
|||
bankId: id, |
|||
branchName: "", |
|||
success: { self.output?.setBranches(with: $0)}, |
|||
failure: { self.output?.show(error: $0) } |
|||
) |
|||
} |
|||
} |
@ -1,20 +0,0 @@ |
|||
// |
|||
// SendMoneyPaymentModeInteractorIO.swift |
|||
// GMERemittance |
|||
// |
|||
// Created by gme_2 on 28/08/2018. |
|||
//Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol SendMoneyPaymentModeInteractorInput: class { |
|||
func viewIsReady(for reciepient: Recipient) |
|||
func validateAccountNumber(params: [String: String]) |
|||
func fetchBranch(countryCode: String, bankID: String) |
|||
} |
|||
|
|||
protocol SendMoneyPaymentModeInteractorOutput: class { |
|||
func setBranches(with model: [SendMoneyBankBranch]?) |
|||
func show(model: [SendMoneyPayoutMode]) |
|||
func show(error: Error) |
|||
func success() |
|||
} |
@ -1,18 +0,0 @@ |
|||
// |
|||
// SendMoneyPaymentModeService.swift |
|||
// GMERemittance |
|||
// |
|||
// Created by gme_2 on 28/08/2018. |
|||
//Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class SendMoneyPaymentModeService: SendMoneyPaymentModeServiceType { |
|||
|
|||
// MARK: Properties |
|||
|
|||
// MARK: Initialization |
|||
|
|||
// MARK: Data management |
|||
} |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue